2021-03-10 03:50:54 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.sconfig.profile;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
options.sconfig.profile = mkOption {
|
2021-03-30 01:16:19 +00:00
|
|
|
type = types.enum [ "server" "desktop" ];
|
2021-03-10 03:50:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkMerge [
|
|
|
|
|
2021-03-30 00:21:02 +00:00
|
|
|
(mkIf (cfg == "server") {
|
|
|
|
services.openssh.enable = true;
|
2021-04-21 20:05:55 +00:00
|
|
|
documentation.nixos.enable = false;
|
2021-03-30 00:21:02 +00:00
|
|
|
nix.gc = {
|
|
|
|
automatic = true;
|
|
|
|
options = "--delete-older-than 30d";
|
|
|
|
};
|
|
|
|
})
|
2021-03-10 03:50:54 +00:00
|
|
|
|
2021-04-30 18:32:27 +00:00
|
|
|
(mkIf (cfg == "desktop") (import ./graphical.nix { inherit pkgs config; }))
|
2021-03-10 03:50:54 +00:00
|
|
|
|
|
|
|
];
|
|
|
|
}
|