Compare commits

...

13 commits

10 changed files with 156 additions and 35 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, unstable, ... }: { config, lib, ... }:
let let
cfg = config.profile.go; cfg = config.profile.go;
in in
@ -9,7 +9,6 @@ in
goPrivate = [ goPrivate = [
"gitlab.bareksa.com" "gitlab.bareksa.com"
]; ];
package = unstable.go_1_22;
}; };
}; };
} }

View file

@ -1,15 +1,25 @@
{ pkgs, ... }: { pkgs, lib, config, ... }:
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 = false; enableCompletion = true;
defaultKeymap = "emacs"; defaultKeymap = "emacs";
dirHashes = { dirHashes = {
docs = "$HOME/Documents"; docs = "$HOME/Documents";
@ -36,29 +46,90 @@
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 = /*bash*/ '' initExtra = concatStrings [
bindkey '^I' menu-complete /*bash*/
bindkey "$terminfo[kcbt]" reverse-menu-complete ''
''; packfiles() {
antidote = { find $(nix build "nixpkgs#$1" --no-link --print-out-paths)
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" {
"zsh-users/zsh-autosuggestions kind:defer" name = "fzf-tab";
"zsh-users/zsh-history-substring-search kind:defer" src = pkgs.zsh-fzf-tab;
"zsh-users/zsh-completions" file = "share/fzf-tab/fzf-tab.plugin.zsh";
# "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,5 +62,7 @@
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 = false; servarr.recyclarr.enable = true;
servarr.real-debrid-manager.enable = false; servarr.real-debrid-manager.enable = false;
servarr.rdtclient.enable = true; servarr.rdtclient.enable = true;
}; };

View file

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

View file

@ -34,21 +34,45 @@ 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" {
sonarr = { radarr.movies = {
tv = { base_url = "http://radarr:7878";
base_url = "http://sonarr:8989"; api_key = config.sops.placeholder."servarr/api_keys/radarr";
api_key = config.sops.placeholders."servarr/api_keys/sonarr"; quality_definition.type = "movie";
quality_definition.type = "series"; delete_old_custom_formats = true;
release_profiles = [ custom_formats = [
{ {
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.placeholders."servarr/api_keys/sonarr-anime"; api_key = config.sops.placeholder."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,6 +11,7 @@ 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 = "media.tigor.web.id"; domain-jellyseerr = "jellyseerr.tigor.web.id";
inherit (lib) mkIf; inherit (lib) mkIf;
username = config.profile.user.name; username = config.profile.user.name;
in in

View file

@ -78,6 +78,29 @@ 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 = {
@ -102,8 +125,8 @@ in
}; };
}; };
}; };
overrideFolders = false; overrideFolders = true;
overrideDevices = false; overrideDevices = true;
openDefaultPorts = true; openDefaultPorts = true;
guiAddress = "0.0.0.0:8384"; guiAddress = "0.0.0.0:8384";
user = user.name; user = user.name;