Compare commits

..

No commits in common. "e2861a968aae9d7bbd66e8c3d1628ec586c285ce" and "19a39b89908b724631f9bba54103a8f71c33630c" have entirely different histories.

10 changed files with 35 additions and 156 deletions

View file

@ -19,7 +19,7 @@
./node.nix ./node.nix
./slack.nix ./slack.nix
./spotify.nix ./spotify.nix
# ./starship.nix ./starship.nix
./tofi.nix ./tofi.nix
./variety.nix ./variety.nix
./vscode.nix ./vscode.nix

View file

@ -1,4 +1,4 @@
{ config, lib, ... }: { config, lib, unstable, ... }:
let let
cfg = config.profile.go; cfg = config.profile.go;
in in
@ -9,6 +9,7 @@ in
goPrivate = [ goPrivate = [
"gitlab.bareksa.com" "gitlab.bareksa.com"
]; ];
package = unstable.go_1_22;
}; };
}; };
} }

View file

@ -1,25 +1,15 @@
{ pkgs, lib, config, ... }: { pkgs, ... }:
let
inherit (lib.strings) optionalString concatStrings;
in
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
eza eza
bat bat
gojq gojq
nix-zsh-completions
]; ];
programs.zsh = { programs.zsh = {
enable = true; enable = true;
envExtra = /*bash*/ ''
# Disable loading global RC files in /etc/zsh/*
# Mostly because they are unneeded
# and global rc files has to be small for security reasons (no plugins)
# thus making them saver for Root account to load them.
unsetopt GLOBAL_RCS
'';
autosuggestion.enable = true; autosuggestion.enable = true;
enableCompletion = true; enableCompletion = false;
defaultKeymap = "emacs"; defaultKeymap = "emacs";
dirHashes = { dirHashes = {
docs = "$HOME/Documents"; docs = "$HOME/Documents";
@ -46,90 +36,29 @@ in
expireDuplicatesFirst = true; expireDuplicatesFirst = true;
extended = true; extended = true;
ignoreAllDups = true; ignoreAllDups = true;
ignoreSpace = true;
path = "$HOME/.local/share/zsh/zsh_history"; path = "$HOME/.local/share/zsh/zsh_history";
save = 40000; save = 40000;
size = 40000; size = 40000;
}; };
syntaxHighlighting.enable = true;
initExtraFirst = /*bash*/ '' initExtraFirst = /*bash*/ ''
export ZSH_CACHE_DIR=$HOME/.cache/zsh
fpath+=${pkgs.zsh-completions}/share/zsh/site-functions
if [ -f $HOME/.config/zsh/.p10k.zsh ]; then
source $HOME/.config/zsh/.p10k.zsh
fi
_ZSH_COLOR_SCHEME_FILE=$HOME/.cache/wallust/sequences _ZSH_COLOR_SCHEME_FILE=$HOME/.cache/wallust/sequences
if [ -f "$_ZSH_COLOR_SCHEME_FILE" ]; then if [ -f "$_ZSH_COLOR_SCHEME_FILE" ]; then
(cat "$_ZSH_COLOR_SCHEME_FILE" &) (cat "$_ZSH_COLOR_SCHEME_FILE" &)
fi fi
''; '';
initExtra = concatStrings [ initExtra = /*bash*/ ''
/*bash*/ bindkey '^I' menu-complete
'' bindkey "$terminfo[kcbt]" reverse-menu-complete
packfiles() { '';
find $(nix build "nixpkgs#$1" --no-link --print-out-paths) antidote = {
} enable = true;
# Completion settings
## Case insensitive completion
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}'
# FZF Tab configurations
#
# disable sort when completing `git checkout`
zstyle ':completion:*:git-checkout:*' sort false
# set descriptions format to enable group support
# NOTE: don't use escape sequences here, fzf-tab will ignore them
zstyle ':completion:*:descriptions' format '[%d]'
# set list-colors to enable filename colorizing
zstyle ':completion:*' list-colors ''${(s.:.)LS_COLORS}
# force zsh not to show completion menu, which allows fzf-tab to capture the unambiguous prefix
zstyle ':completion:*' menu no
# preview directory's content with eza when completing cd
zstyle ':fzf-tab:complete:cd:*' fzf-preview 'eza -1 --color=always $realpath'
# switch group using `<` and `>`
zstyle ':fzf-tab:*' switch-group '<' '>'
# Preview fzf
zstyle ':fzf-tab:*' fzf-preview 'eza -1 --color=always $realpath'
''
(optionalString config.profile.podman.enable /*bash*/ ''
zsh-defer source <(podman completion zsh)
'')
];
plugins = [ plugins = [
{ # "zdharma-continuum/fast-syntax-highlighting kind:defer"
name = "fzf-tab"; "zsh-users/zsh-autosuggestions kind:defer"
src = pkgs.zsh-fzf-tab; "zsh-users/zsh-history-substring-search kind:defer"
file = "share/fzf-tab/fzf-tab.plugin.zsh"; "zsh-users/zsh-completions"
} # "marlonrichert/zsh-autocomplete"
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "auto-suggestions";
src = pkgs.zsh-autosuggestions;
file = "share/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh";
}
{
name = "zsh-nix-shell";
src = pkgs.zsh-nix-shell;
file = "share/zsh-nix-shell/nix-shell.plugin.zsh";
}
{
name = "zsh-history-substring-search";
src = pkgs.zsh-history-substring-search;
file = "share/zsh-history-substring-search/zsh-history-substring-search.zsh";
}
{
name = "zsh-defer";
src = pkgs.zsh-defer;
file = "share/zsh-defer/zsh-defer.plugin.zsh";
}
]; ];
}; };
};
} }

View file

@ -62,7 +62,5 @@
microsoft-edge.enable = true; microsoft-edge.enable = true;
nextcloud.enable = false; nextcloud.enable = false;
programs.easyeffects.enable = true;
}; };
} }

View file

@ -33,7 +33,7 @@
redmage-demo.enable = true; redmage-demo.enable = true;
qbittorrent.enable = true; qbittorrent.enable = true;
servarr.enable = true; servarr.enable = true;
servarr.recyclarr.enable = true; servarr.recyclarr.enable = false;
servarr.real-debrid-manager.enable = false; servarr.real-debrid-manager.enable = false;
servarr.rdtclient.enable = true; servarr.rdtclient.enable = true;
}; };

View file

@ -8,6 +8,5 @@
./bazarr.nix ./bazarr.nix
./radarr.nix ./radarr.nix
./rdtclient.nix ./rdtclient.nix
./recyclarr.nix
]; ];
} }

View file

@ -34,45 +34,21 @@ in
owner = user.name; owner = user.name;
path = "${configVolume}/recyclarr.yml"; path = "${configVolume}/recyclarr.yml";
content = builtins.readFile ((pkgs.formats.yaml { }).generate "recyclarr.yml" { content = builtins.readFile ((pkgs.formats.yaml { }).generate "recyclarr.yml" {
radarr.movies = { sonarr = {
base_url = "http://radarr:7878"; tv = {
api_key = config.sops.placeholder."servarr/api_keys/radarr"; base_url = "http://sonarr:8989";
quality_definition.type = "movie"; api_key = config.sops.placeholders."servarr/api_keys/sonarr";
delete_old_custom_formats = true; quality_definition.type = "series";
custom_formats = [ release_profiles = [
{ {
trash_ids = [ trash_ids = [ ];
# x264 only. For 720p and 1080p releases.
"2899d84dc9372de3408e6d8cc18e9666"
];
} }
]; ];
}; };
sonarr = {
# tv = {
# base_url = "http://sonarr:8989";
# api_key = config.sops.placeholder."servarr/api_keys/sonarr";
# quality_definition.type = "series";
# custom_formats = [ ];
# };
anime = { anime = {
base_url = "http://sonarr-anime:8989"; base_url = "http://sonarr-anime:8989";
api_key = config.sops.placeholder."servarr/api_keys/sonarr-anime"; api_key = config.sops.placeholders."servarr/api_keys/sonarr-anime";
quality_definition.type = "anime"; quality_definition.type = "anime";
delete_old_custom_formats = true;
custom_formats = [
# sudo podman run --rm ghcr.io/recyclarr/recyclarr list custom-formats sonarr
{
trash_ids = [
# Anime Web Tier 02 (Top FanSubs)
"19180499de5ef2b84b6ec59aae444696"
# Anime Web Tier 03 (Official Subs)
"c27f2ae6a4e82373b0f1da094e2489ad"
# Anime web tier 04 (Official Subs)
"4fd5528a3a8024e6b49f9c67053ea5f3"
];
}
];
}; };
}; };
}); });

View file

@ -11,7 +11,6 @@ in
services.caddy.virtualHosts."cockpit.tigor.web.id".extraConfig = '' services.caddy.virtualHosts."cockpit.tigor.web.id".extraConfig = ''
reverse_proxy 0.0.0.0:9090 reverse_proxy 0.0.0.0:9090
''; '';
services.udisks2.enable = true;
services.cockpit = { services.cockpit = {
enable = true; enable = true;
openFirewall = true; openFirewall = true;

View file

@ -3,7 +3,7 @@ let
cfg = config.profile.services.jellyfin; cfg = config.profile.services.jellyfin;
dataDir = "/nas/mediaserver/jellyfin"; dataDir = "/nas/mediaserver/jellyfin";
domain = "jellyfin.tigor.web.id"; domain = "jellyfin.tigor.web.id";
domain-jellyseerr = "jellyseerr.tigor.web.id"; domain-jellyseerr = "media.tigor.web.id";
inherit (lib) mkIf; inherit (lib) mkIf;
username = config.profile.user.name; username = config.profile.user.name;
in in

View file

@ -78,29 +78,6 @@ in
id = "WireGuard"; id = "WireGuard";
devices = lib.attrsets.mapAttrsToList (key: _value: key) config.services.syncthing.settings.devices; devices = lib.attrsets.mapAttrsToList (key: _value: key) config.services.syncthing.settings.devices;
}; };
"/nas/photos/mama" = {
label = "Camera Mama";
id = "sm-s906e_8dch-photos";
devices = [ "samsung-s22-mama" ];
};
"/nas/photos/tigor" = {
label = "Camera Tigor";
id = "sm-g780f_yjwa-photos";
devices = [ "s20fe" ];
};
"/nas/Syncthing/Sync/Onyx-Notes" = {
label = "Onyx Notes";
id = "Onyx-Notes";
devices = [ "onyx" ];
};
"/nas/Syncthing/Sync/Japanese-Learning-Materials" = {
label = "Japanese Learning Materials";
id = "Japanese-Learning-Materials";
devices = [
"s20fe"
"work-laptop"
];
};
}; };
devices = { devices = {
s20fe = { s20fe = {
@ -125,8 +102,8 @@ in
}; };
}; };
}; };
overrideFolders = true; overrideFolders = false;
overrideDevices = true; overrideDevices = false;
openDefaultPorts = true; openDefaultPorts = true;
guiAddress = "0.0.0.0:8384"; guiAddress = "0.0.0.0:8384";
user = user.name; user = user.name;