nixos/modules/nixos/default.nix

31 lines
874 B
Nix

{
lib,
config,
...
}: let
cfg = config.myConfig;
in {
imports = [./bootloader.nix ./locale.nix ./greetd.nix ./rebuild.nix ./sops.nix ./sway.nix ./wifi.nix ./music.nix ./cups.nix ./gpu/amd.nix];
options.myConfig = {
enable = lib.mkEnableOption "my custom config";
desktop = lib.mkEnableOption "custom config with desktop support";
laptop = lib.mkEnableOption "extra stuff for laptops like wifi";
};
config.myConfig = lib.mkIf cfg.enable {
bootloader.enable = true;
locale.enable = true;
rebuild.enable = true;
greetd.enable = lib.mkIf cfg.desktop true;
sway.enable = lib.mkIf cfg.desktop true;
music.enable = lib.mkIf cfg.desktop true;
cups.enable = lib.mkIf cfg.desktop true;
wifi.tray = lib.mkIf cfg.desktop true;
sway.laptop = lib.mkIf cfg.laptop true;
wifi.enable = lib.mkIf cfg.laptop true;
};
}