From 698947999d3c8a8e89d0f48f0465aee90463fa5e Mon Sep 17 00:00:00 2001 From: Kopatz <7265381+Kropatz@users.noreply.github.com> Date: Sat, 7 Mar 2026 11:38:50 +0100 Subject: [PATCH] test out sshserve --- modules/nix/default.nix | 1 + modules/nix/settings.nix | 2 +- modules/nix/sshServe.nix | 25 +++++++++++++++++++++++++ systems/laptop/configuration.nix | 1 + systems/pc/configuration.nix | 10 +--------- 5 files changed, 29 insertions(+), 10 deletions(-) create mode 100644 modules/nix/sshServe.nix diff --git a/modules/nix/default.nix b/modules/nix/default.nix index 24b1d53..502273b 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -5,5 +5,6 @@ ./ld.nix ./settings.nix ./latest.nix + ./sshServe.nix ]; } diff --git a/modules/nix/settings.nix b/modules/nix/settings.nix index 06ff531..351eff4 100644 --- a/modules/nix/settings.nix +++ b/modules/nix/settings.nix @@ -25,7 +25,7 @@ in nix = { optimise.automatic = cfg.optimise; - settings.allowed-users = [ "root" "@wheel" "anon" "minecraftserver" ]; + settings.allowed-users = [ "root" "@wheel" "anon" "minecraftserver" "nix-ssh" ]; settings.experimental-features = [ "nix-command" "flakes" diff --git a/modules/nix/sshServe.nix b/modules/nix/sshServe.nix new file mode 100644 index 0000000..cd24c97 --- /dev/null +++ b/modules/nix/sshServe.nix @@ -0,0 +1,25 @@ + +{ + config, + lib, + pkgs, + ... +}: +with lib; +let + cfg = config.custom.nix.sshServe; +in +{ + options.custom.nix.sshServe = { + enable = mkEnableOption "Enable serving the nix cache over ssh"; + }; + + config = mkIf cfg.enable { + nix.sshServe = { + enable = true; + keys = [ + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFeP6qtVqE/gu72ZUZE8cdRi3INiUW9NqDR7SjXIzTw2" + ]; + }; + }; +} diff --git a/systems/laptop/configuration.nix b/systems/laptop/configuration.nix index f32b828..f0b0054 100644 --- a/systems/laptop/configuration.nix +++ b/systems/laptop/configuration.nix @@ -75,6 +75,7 @@ in ld.enable = true; index.enable = true; settings.enable = true; + #sshServe.enable = true; }; misc = { docker.enable = true; diff --git a/systems/pc/configuration.nix b/systems/pc/configuration.nix index ad56d3d..2293bf1 100644 --- a/systems/pc/configuration.nix +++ b/systems/pc/configuration.nix @@ -167,15 +167,7 @@ #kdePackages.qtdeclarative #libimobiledevice #ifuse # optional, to mount using 'ifuse' - (wl-clicker.overrideAttrs (old: { - # wayland autoclicker - src = pkgs.fetchFromGitHub { - owner = "phonetic112"; - repo = "wl-clicker"; - rev = "f0241c374241d6cf74ba3abffb74a3fdcefa6f88"; - hash = "sha256-QwFT9e2FuczC+ew/lDrDnYYccrrfVJi3Rlrurhwk8ZU="; - }; - })) + wl-clicker ]; documentation.man.generateCaches = true;