From 64d0ab200264be49387aec211295d83c50ec8a8e Mon Sep 17 00:00:00 2001 From: tulg Date: Fri, 8 May 2026 23:16:31 +0300 Subject: [PATCH] overlord/ nfs,smb --- config/zellij/themes/rose-pine.kdl | 120 ++++++++++++++++++++ hosts/overlord/configuration.nix | 9 +- hosts/virgil/hardware-configuration.nix | 3 +- modules/home-manager/cli/default.nix | 1 + modules/home-manager/cli/zellij.nix | 11 ++ modules/home-manager/desktop/symlink.nix | 4 + modules/home-manager/pkgs.nix | 1 - modules/servers/per-host/overlord/share.nix | 40 +++++++ 8 files changed, 186 insertions(+), 3 deletions(-) create mode 100644 config/zellij/themes/rose-pine.kdl create mode 100644 modules/home-manager/cli/zellij.nix create mode 100644 modules/servers/per-host/overlord/share.nix diff --git a/config/zellij/themes/rose-pine.kdl b/config/zellij/themes/rose-pine.kdl new file mode 100644 index 0000000..e9f75a8 --- /dev/null +++ b/config/zellij/themes/rose-pine.kdl @@ -0,0 +1,120 @@ +themes { + rose-pine { + text_unselected { + base 224 222 244 + background 33 32 46 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + text_selected { + base 224 222 244 + background 64 61 82 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + ribbon_selected { + base 33 32 46 + background 49 116 143 + emphasis_0 246 193 119 + emphasis_1 235 188 186 + emphasis_2 196 167 231 + emphasis_3 156 207 216 + } + ribbon_unselected { + base 25 23 36 + background 224 222 244 + emphasis_0 246 193 119 + emphasis_1 235 188 186 + emphasis_2 196 167 231 + emphasis_3 156 207 216 + } + table_title { + base 49 116 143 + background 0 0 0 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + table_cell_selected { + base 224 222 244 + background 64 61 82 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + table_cell_unselected { + base 224 222 244 + background 33 32 46 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + list_selected { + base 224 222 244 + background 64 61 82 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + list_unselected { + base 224 222 244 + background 33 32 46 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 49 116 143 + emphasis_3 196 167 231 + } + frame_selected { + base 49 116 143 + background 0 0 0 + emphasis_0 235 188 186 + emphasis_1 156 207 216 + emphasis_2 196 167 231 + emphasis_3 0 0 0 + } + frame_highlight { + base 235 188 186 + background 0 0 0 + emphasis_0 235 188 186 + emphasis_1 235 188 186 + emphasis_2 235 188 186 + emphasis_3 235 188 186 + } + exit_code_success { + base 49 116 143 + background 0 0 0 + emphasis_0 156 207 216 + emphasis_1 33 32 46 + emphasis_2 196 167 231 + emphasis_3 49 116 143 + } + exit_code_error { + base 235 111 146 + background 0 0 0 + emphasis_0 246 193 119 + emphasis_1 0 0 0 + emphasis_2 0 0 0 + emphasis_3 0 0 0 + } + multiplayer_user_colors { + player_1 196 167 231 + player_2 49 116 143 + player_3 235 188 186 + player_4 246 193 119 + player_5 156 207 216 + player_6 235 111 146 + player_7 0 0 0 + player_8 0 0 0 + player_9 0 0 0 + player_10 0 0 0 + } + } +} diff --git a/hosts/overlord/configuration.nix b/hosts/overlord/configuration.nix index b87a37f..b3f12bf 100644 --- a/hosts/overlord/configuration.nix +++ b/hosts/overlord/configuration.nix @@ -11,8 +11,15 @@ ../../modules/nixos/users/tulg.nix ../../modules/servers/common.nix ../../modules/servers/per-host/overlord/nixarr.nix + ../../modules/servers/per-host/overlord/share.nix ]; - + programs.tmux = { + enable = true; + clock24 = true; + extraConfig = '' # used for less common options, intelligently combines if defined in multiple places. + ... + ''; + }; networking.hostName = "overlord"; system.stateVersion = "25.05"; } diff --git a/hosts/virgil/hardware-configuration.nix b/hosts/virgil/hardware-configuration.nix index c63286d..4551d83 100644 --- a/hosts/virgil/hardware-configuration.nix +++ b/hosts/virgil/hardware-configuration.nix @@ -44,7 +44,7 @@ boot.extraModulePackages = []; fileSystems."/mnt/share" = { - device = "192.168.1.200:/mnt/hdds/Main"; + device = "192.168.1.69:/export/share"; fsType = "nfs"; options = [ "_netdev" @@ -53,6 +53,7 @@ "x-systemd.mount-timeout=10" "timeo=14" "x-systemd.idle-timeout=600" + "nofail" ]; }; diff --git a/modules/home-manager/cli/default.nix b/modules/home-manager/cli/default.nix index 109623f..891c57a 100644 --- a/modules/home-manager/cli/default.nix +++ b/modules/home-manager/cli/default.nix @@ -2,5 +2,6 @@ imports = [ ./yazi.nix ./shell.nix + ./zellij.nix ]; } diff --git a/modules/home-manager/cli/zellij.nix b/modules/home-manager/cli/zellij.nix new file mode 100644 index 0000000..a7e5460 --- /dev/null +++ b/modules/home-manager/cli/zellij.nix @@ -0,0 +1,11 @@ +{pkgs, ...}: { + programs.zellij = { + enable = true; + enableBashIntegration = true; # Or zsh + settings = { + theme = "rose-pine"; + pane_frames = false; + default_layout = "compact"; + }; + }; +} diff --git a/modules/home-manager/desktop/symlink.nix b/modules/home-manager/desktop/symlink.nix index 21afd1c..130e8f2 100644 --- a/modules/home-manager/desktop/symlink.nix +++ b/modules/home-manager/desktop/symlink.nix @@ -22,4 +22,8 @@ in { source = link "${dots}/mako"; recursive = true; }; + xdg.configFile."zellij" = { + source = link "${dots}/zellij"; + recursive = true; + }; } diff --git a/modules/home-manager/pkgs.nix b/modules/home-manager/pkgs.nix index 9011297..d2b8669 100644 --- a/modules/home-manager/pkgs.nix +++ b/modules/home-manager/pkgs.nix @@ -20,7 +20,6 @@ mpv vulkan-tools pkgs.looking-glass-client - tmux btop nicotine-plus diff --git a/modules/servers/per-host/overlord/share.nix b/modules/servers/per-host/overlord/share.nix new file mode 100644 index 0000000..1dd9884 --- /dev/null +++ b/modules/servers/per-host/overlord/share.nix @@ -0,0 +1,40 @@ +{ + fileSystems."/export/share" = { + device = "/mnt/2tbhdd"; + fsType = "nfs"; + options = ["bind"]; + }; + services.nfs.server = { + enable = true; + # fixed rpc.statd port; for firewall + lockdPort = 4001; + mountdPort = 4002; + statdPort = 4000; + extraNfsdConfig = ''''; + exports = '' + /export/share *(rw,sync,no_subtree_check,all_squash,insecure,anonuid=1000,anongid=100) + ''; + }; + users.users.tulg = { + createHome = false; + shell = "/run/current-system/sw/bin/nologin"; + }; + networking.firewall = { + enable = true; + # for NFSv3; view with `rpcinfo -p` + allowedTCPPorts = [111 2049 4000 4001 4002 20048 445]; + allowedUDPPorts = [111 2049 4000 4001 4002 20048]; + }; + services.samba = { + enable = true; + + shares.share = { + path = "/mnt/2tbhdd/smb/"; + browseable = "yes"; + writable = "yes"; + "guest ok" = "yes"; + "read only" = "no"; + "force user" = "nobody"; + }; + }; +}