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-10 03:54:12 +00:00
|
|
|
type = types.enum [ "server" "desktop-gnome" "desktop-sway" "desktop-plasma" ];
|
2021-03-10 03:50:54 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkMerge [
|
|
|
|
|
|
|
|
(mkIf (cfg == "server") (mkMerge [
|
|
|
|
{ services.openssh.enable = true; }
|
|
|
|
(import ./auto-update.nix { })
|
|
|
|
]))
|
|
|
|
|
|
|
|
(mkIf (cfg == "desktop-sway") (import ./sway.nix { inherit pkgs; }))
|
|
|
|
(mkIf (cfg == "desktop-gnome") (import ./gnome.nix { inherit pkgs; }))
|
2021-03-10 03:54:12 +00:00
|
|
|
(mkIf (cfg == "desktop-plasma") (import ./plasma.nix { inherit pkgs; }))
|
2021-03-10 03:50:54 +00:00
|
|
|
|
|
|
|
(mkIf ("desktop-" == builtins.substring 0 8 cfg) (mkMerge [
|
|
|
|
(import ./security-tools.nix { inherit pkgs; })
|
|
|
|
(import ./graphical.nix { inherit pkgs; })
|
|
|
|
]))
|
|
|
|
|
|
|
|
];
|
|
|
|
}
|