lift nix-serve out of servo

i'm going to enable it on desktop
This commit is contained in:
colin 2022-09-14 14:30:35 -07:00
parent 08bd619ef9
commit cdbde672d8
4 changed files with 30 additions and 16 deletions

View File

@ -14,7 +14,6 @@
./services/matrix.nix
./services/navidrome.nix
./services/nginx.nix
./services/nix-serve.nix
./services/pleroma.nix
./services/postfix.nix
./services/postgres.nix
@ -28,6 +27,7 @@
];
sane.impermanence.enable = true;
sane.services.duplicity.enable = true;
sane.services.nixserve.enable = true;
# TODO: look into the EFI stuff
boot.loader.grub.enable = false;

View File

@ -1,15 +0,0 @@
# docs: https://nixos.wiki/wiki/Binary_Cache
# to copy something to this machine's nix cache, do:
# nix copy --to ssh://nixcache.uninsane.org PACKAGE
{ config, ... }:
{
services.nix-serve = {
enable = true;
secretKeyFile = config.sops.secrets.nix_serve_privkey.path;
};
sops.secrets.nix_serve_privkey = {
sopsFile = ../../../secrets/servo.yaml;
};
}

View File

@ -8,6 +8,7 @@
./impermanence.nix
./nixcache.nix
./services/duplicity.nix
./services/nixserve.nix
./universal
];
}

View File

@ -0,0 +1,28 @@
# docs: https://nixos.wiki/wiki/Binary_Cache
# to copy something to this machine's nix cache, do:
# nix copy --to ssh://nixcache.uninsane.org PACKAGE
{ config, lib, ... }:
with lib;
let
cfg = config.sane.services.nixserve;
in
{
options = {
sane.services.nixserve.enable = mkOption {
default = false;
type = types.bool;
};
};
config = mkIf cfg.enable {
services.nix-serve = {
enable = true;
secretKeyFile = config.sops.secrets.nix_serve_privkey.path;
};
sops.secrets.nix_serve_privkey = {
sopsFile = ../../secrets/servo.yaml;
};
};
}