add initial nixos modules
All checks were successful
buildbot/nix-eval Build done.
buildbot/nix-build gitea:ops/nix-cache-login#checks.x86_64-linux.devShell Build done.
buildbot/nix-build gitea:ops/nix-cache-login#checks.x86_64-linux.tests Build done.
buildbot/nix-build Build done.
buildbot/nix-effects Build done.

This commit is contained in:
Abel Luck 2026-02-26 19:11:53 +01:00
parent 164a8e9aa9
commit 07bd576628
3 changed files with 123 additions and 0 deletions

View file

@ -44,5 +44,37 @@
];
};
});
nixosModules = {
# Workstation: systemd user timer+service running `nix-cache-login refresh`
default =
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./nixos-module.nix ];
services.nix-cache-login.package =
lib.mkDefault
self.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
# Server: system-level timer+service running `nix-cache-login service-account`
server =
{
config,
lib,
pkgs,
...
}:
{
imports = [ ./nixos-module-server.nix ];
services.nix-cache-login-server.package =
lib.mkDefault
self.packages.${pkgs.stdenv.hostPlatform.system}.default;
};
};
};
}