mirror of
https://github.com/buckley310/nixos-config.git
synced 2024-11-09 18:47:02 +00:00
25 lines
488 B
Nix
25 lines
488 B
Nix
{ config, pkgs, lib, ... }:
|
|
with lib;
|
|
let
|
|
cfg = config.sconfig.profile;
|
|
in
|
|
{
|
|
options.sconfig.profile = mkOption {
|
|
type = types.enum [ "server" "desktop" ];
|
|
};
|
|
|
|
config = mkMerge [
|
|
|
|
(mkIf (cfg == "server") {
|
|
services.openssh.enable = true;
|
|
documentation.nixos.enable = false;
|
|
nix.gc = {
|
|
automatic = true;
|
|
options = "--delete-older-than 30d";
|
|
};
|
|
})
|
|
|
|
(mkIf (cfg == "desktop") (import ./graphical.nix { inherit pkgs; }))
|
|
|
|
];
|
|
}
|