test out sshserve

This commit is contained in:
Kopatz
2026-03-07 11:38:50 +01:00
parent 72fca2829c
commit 698947999d
5 changed files with 29 additions and 10 deletions

View File

@@ -5,5 +5,6 @@
./ld.nix
./settings.nix
./latest.nix
./sshServe.nix
];
}

View File

@@ -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"

25
modules/nix/sshServe.nix Normal file
View File

@@ -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"
];
};
};
}