diff --git a/modules/apps/dev.nix b/modules/apps/dev.nix index 3676070..b6296f0 100644 --- a/modules/apps/dev.nix +++ b/modules/apps/dev.nix @@ -16,7 +16,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { home-manager.users.${homeCfg.username} = { programs = { gh.enable = true; diff --git a/modules/apps/terminal.nix b/modules/apps/terminal.nix index fbeed97..bed93ec 100644 --- a/modules/apps/terminal.nix +++ b/modules/apps/terminal.nix @@ -16,7 +16,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { home-manager.users.${homeCfg.username} = { imports = [./terminal/neovim.nix]; }; diff --git a/modules/apps/visual.nix b/modules/apps/visual.nix index 169cba6..ad65c15 100644 --- a/modules/apps/visual.nix +++ b/modules/apps/visual.nix @@ -16,7 +16,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { horseman.apps.visual = { firefox.enable = true; }; diff --git a/modules/apps/visual/firefox.nix b/modules/apps/visual/firefox.nix index 107a400..e3929c0 100644 --- a/modules/apps/visual/firefox.nix +++ b/modules/apps/visual/firefox.nix @@ -24,7 +24,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { programs.firefox = { enable = true; policies = { diff --git a/modules/base/locale.nix b/modules/base/locale.nix index 50d21c6..04dd3d8 100644 --- a/modules/base/locale.nix +++ b/modules/base/locale.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { time.timeZone = "Europe/Amsterdam"; }; } diff --git a/modules/base/nix.nix b/modules/base/nix.nix index 906480a..a252b4c 100644 --- a/modules/base/nix.nix +++ b/modules/base/nix.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { nixpkgs = { config.allowUnfree = true; }; diff --git a/modules/boot/greeter/sddm.nix b/modules/boot/greeter/sddm.nix index 4a2993c..1465987 100644 --- a/modules/boot/greeter/sddm.nix +++ b/modules/boot/greeter/sddm.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { services.displayManager.sddm.enable = true; }; } diff --git a/modules/boot/loader/grub.nix b/modules/boot/loader/grub.nix index cb18c2f..b0ba6fc 100644 --- a/modules/boot/loader/grub.nix +++ b/modules/boot/loader/grub.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; boot.loader.grub.configurationLimit = 10; diff --git a/modules/boot/loader/systemd.nix b/modules/boot/loader/systemd.nix index d873ac2..e0f0a60 100644 --- a/modules/boot/loader/systemd.nix +++ b/modules/boot/loader/systemd.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { boot.loader.systemd-boot.enable = true; boot.loader.systemd-boot.configurationLimit = 10; }; diff --git a/modules/boot/refind.nix b/modules/boot/refind.nix index c05f7d0..029d876 100644 --- a/modules/boot/refind.nix +++ b/modules/boot/refind.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { environment.systemPackages = with pkgs; [ refind efibootmgr diff --git a/modules/hardware/audio.nix b/modules/hardware/audio.nix index 13ccc17..78d30be 100644 --- a/modules/hardware/audio.nix +++ b/modules/hardware/audio.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { hardware.pulseaudio.enable = false; services.jack = { jackd.enable = false; diff --git a/modules/hardware/bluetooth.nix b/modules/hardware/bluetooth.nix index adfa8f1..834fdf9 100644 --- a/modules/hardware/bluetooth.nix +++ b/modules/hardware/bluetooth.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { hardware.bluetooth.enable = true; }; } diff --git a/modules/hardware/gpu/nvidia.nix b/modules/hardware/gpu/nvidia.nix index 343297c..8506c82 100644 --- a/modules/hardware/gpu/nvidia.nix +++ b/modules/hardware/gpu/nvidia.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { hardware.graphics.enable32Bit = true; hardware.graphics.enable = true; services.xserver.videoDrivers = ["nvidia"]; diff --git a/modules/hardware/wifi.nix b/modules/hardware/wifi.nix index 00cf995..0afae2f 100644 --- a/modules/hardware/wifi.nix +++ b/modules/hardware/wifi.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { networking.networkmanager.enable = true; users.users.horseman.extraGroups = ["networkmanager"]; }; diff --git a/modules/network/mullvad.nix b/modules/network/mullvad.nix index 8fb6041..5b4de55 100644 --- a/modules/network/mullvad.nix +++ b/modules/network/mullvad.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { services = { mullvad-vpn = { enable = true; diff --git a/modules/network/ssh.nix b/modules/network/ssh.nix index 26871d3..d117d5f 100644 --- a/modules/network/ssh.nix +++ b/modules/network/ssh.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { services.openssh = { banner = '' ================================================================== diff --git a/modules/network/syncthing.nix b/modules/network/syncthing.nix index 6aa2df5..27184b3 100644 --- a/modules/network/syncthing.nix +++ b/modules/network/syncthing.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { services.syncthing = { enable = true; user = "horseman"; diff --git a/modules/network/tailscale.nix b/modules/network/tailscale.nix index e917177..b5b573f 100644 --- a/modules/network/tailscale.nix +++ b/modules/network/tailscale.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { services.tailscale.enable = true; }; } diff --git a/modules/template.nix b/modules/template.nix index dabd470..e247a53 100644 --- a/modules/template.nix +++ b/modules/template.nix @@ -15,6 +15,6 @@ in { }; }; - config = { + config = mkIf cfg.enable { }; } diff --git a/modules/terminal/zsh.nix b/modules/terminal/zsh.nix index 0ec0dfc..34a219e 100644 --- a/modules/terminal/zsh.nix +++ b/modules/terminal/zsh.nix @@ -15,7 +15,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { users.defaultUserShell = pkgs.zsh; environment.shells = with pkgs; [zsh]; diff --git a/modules/users/default.nix b/modules/users/default.nix index 9c49d99..a90c875 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -16,7 +16,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { home-manager = { extraSpecialArgs = {inherit inputs outputs;}; users.${homeCfg.username} = { diff --git a/modules/wm/gnome/default.nix b/modules/wm/gnome/default.nix index d5c3db2..787da70 100644 --- a/modules/wm/gnome/default.nix +++ b/modules/wm/gnome/default.nix @@ -10,12 +10,12 @@ cfg = config.horseman.wm.gnome; in { options = { - horseman.desktop.gnome = { + horseman.wm.gnome = { enable = mkEnableOption "Gnome"; }; }; - config = { + config = mkIf cfg.enable { services.xserver = { enable = true; desktopManager.gnome.enable = true; diff --git a/modules/wm/plasma/default.nix b/modules/wm/plasma/default.nix index 4f603ca..27c6347 100644 --- a/modules/wm/plasma/default.nix +++ b/modules/wm/plasma/default.nix @@ -17,7 +17,7 @@ in { }; }; - config = { + config = mkIf cfg.enable { services = { xserver.enable = true; diff --git a/modules/wm/qtile/default.nix b/modules/wm/qtile/default.nix index f1ccf51..225eb4b 100644 --- a/modules/wm/qtile/default.nix +++ b/modules/wm/qtile/default.nix @@ -10,12 +10,12 @@ cfg = config.horseman.wm.qtile; in { options = { - horseman.desktop.qtile = { + horseman.wm.qtile = { enable = mkEnableOption "Qtile"; }; }; - config = { + config = mkIf cfg.enable { services.xserver = { enable = true; windowManager.qtile.enable = true;