2020-12-29 04:10:08 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
cfg = config.sconfig;
|
|
|
|
in
|
|
|
|
{
|
2020-12-29 21:31:36 +00:00
|
|
|
options.sconfig.profile = mkOption {
|
|
|
|
type = types.enum [ "server" "desktop-gnome" "desktop-sway" ];
|
2020-12-29 04:10:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
config = mkMerge [
|
|
|
|
|
|
|
|
(mkIf (cfg.profile == "server") (mkMerge [
|
|
|
|
{ services.openssh.enable = true; }
|
|
|
|
(import ./modules/auto-update.nix { })
|
|
|
|
]))
|
|
|
|
|
2020-12-30 04:57:20 +00:00
|
|
|
(mkIf (cfg.profile == "desktop-sway") (import ./modules/sway.nix { inherit pkgs; }))
|
|
|
|
(mkIf (cfg.profile == "desktop-gnome") (import ./modules/gnome.nix { inherit pkgs; }))
|
2020-12-29 04:10:08 +00:00
|
|
|
|
|
|
|
(mkIf ("desktop-" == builtins.substring 0 8 cfg.profile) (mkMerge [
|
|
|
|
(import ./modules/security-tools.nix { inherit pkgs; })
|
|
|
|
(import ./modules/graphical.nix { inherit pkgs; })
|
|
|
|
]))
|
|
|
|
|
|
|
|
];
|
|
|
|
|
2020-12-29 04:50:52 +00:00
|
|
|
imports = [
|
|
|
|
./modules/alacritty.nix
|
2020-12-29 18:58:59 +00:00
|
|
|
./modules/baseline.nix
|
|
|
|
./modules/cli.nix
|
2020-12-29 21:31:36 +00:00
|
|
|
./modules/scroll-boost
|
2020-12-29 21:21:22 +00:00
|
|
|
./modules/status-on-console.nix
|
2020-12-29 04:50:52 +00:00
|
|
|
];
|
2020-12-29 04:10:08 +00:00
|
|
|
}
|