diff --git a/modules/applications/1password.nix b/modules/applications/1password.nix index 770e90a..b3235cc 100644 --- a/modules/applications/1password.nix +++ b/modules/applications/1password.nix @@ -1,8 +1,8 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.onepassword; + this = config.my.application.onepassword; graphical = config.my.graphical; - enable = (cfg.gui.enable || cfg.cli.enable); + enable = (this.gui.enable || this.cli.enable); in with lib; { options = { my.application.onepassword.gui.enable = mkOption { @@ -10,16 +10,16 @@ in with lib; { type = with types; bool; }; my.application.onepassword.cli.enable = mkOption { - default = (graphical.enable || cfg.gui.enable); + default = (graphical.enable || this.gui.enable); type = with types; bool; }; }; config = mkIf enable (mkMerge [ - (mkIf cfg.cli.enable { + (mkIf this.cli.enable { home-manager.users.james.home.packages = with pkgs; [ _1password ]; }) - (mkIf cfg.gui.enable { + (mkIf this.gui.enable { home-manager.users.james = { home.packages = with pkgs; [ _1password-gui ]; }; diff --git a/modules/applications/blueman.nix b/modules/applications/blueman.nix index 347f813..4db4193 100644 --- a/modules/applications/blueman.nix +++ b/modules/applications/blueman.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.blueman; + this = config.my.application.blueman; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { hardware.bluetooth.enable = true; home-manager.users.james = { home.packages = with pkgs; [ blueman ]; }; fileSystems."var/lib/bluetooth" = { diff --git a/modules/applications/dunst.nix b/modules/applications/dunst.nix index f635e11..03a2569 100644 --- a/modules/applications/dunst.nix +++ b/modules/applications/dunst.nix @@ -1,6 +1,6 @@ { options, config, lib, pkgs, ... }: let - cfg = config.my.application.dunst; + this = config.my.application.dunst; i3 = config.my.application.i3; graphical = config.my.graphical; in with lib; { @@ -11,7 +11,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { systemd.user.startServices = true; services.dunst.enable = true; diff --git a/modules/applications/emacs.nix b/modules/applications/emacs.nix index 7dd701f..5029e19 100644 --- a/modules/applications/emacs.nix +++ b/modules/applications/emacs.nix @@ -2,7 +2,7 @@ # TODO Still need the following dependecies # - Language tools (grammer) let - cfg = config.my.application.emacs; + this = config.my.application.emacs; graphical = config.my.graphical; in with lib; { options = { @@ -12,7 +12,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { nixpkgs.overlays = [ inputs.emacs-overlay.overlay ]; home-manager.users.james = { programs.emacs = { diff --git a/modules/applications/firefox/tridactyl.nix b/modules/applications/firefox/tridactyl.nix index 10f7d33..810b60a 100644 --- a/modules/applications/firefox/tridactyl.nix +++ b/modules/applications/firefox/tridactyl.nix @@ -1,6 +1,6 @@ { config, pkgs, lib, ... }: let - cfg = config.my.application.firefox.tridactyl; + this = config.my.application.firefox.tridactyl; firefox = config.my.application.firefox; in with lib; { options = { @@ -11,9 +11,9 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { # firefox.pkg = - # pkgs.firefox.override { cfg = { enableTridactylNative = true; }; }; + # pkgs.firefox.override { this = { enableTridactylNative = true; }; }; home-manager.users.james = { programs.firefox = { extensions = with pkgs.nur.repos.rycee.firefox-addons; [ tridactyl ]; diff --git a/modules/applications/gammastep.nix b/modules/applications/gammastep.nix index 2184537..1fabcc1 100644 --- a/modules/applications/gammastep.nix +++ b/modules/applications/gammastep.nix @@ -1,6 +1,6 @@ { options, config, lib, pkgs, ... }: let - cfg = config.my.application.gammastep; + this = config.my.application.gammastep; i3 = config.my.application.i3; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { services.gammastep = { enable = true; diff --git a/modules/applications/i3/i3.nix b/modules/applications/i3/i3.nix index 4abccd4..0b938a8 100644 --- a/modules/applications/i3/i3.nix +++ b/modules/applications/i3/i3.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.i3; + this = config.my.application.i3; graphical = config.my.graphical; modifier = "Mod4"; wallpaper = pkgs.fetchurl { @@ -16,7 +16,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { programs.dconf.enable = true; programs.light.enable = true; diff --git a/modules/applications/i3/picom.nix b/modules/applications/i3/picom.nix index 8df0717..72f22e5 100644 --- a/modules/applications/i3/picom.nix +++ b/modules/applications/i3/picom.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.i3.picom; + this = config.my.application.i3.picom; i3 = config.my.application.i3; in with lib; { @@ -11,7 +11,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { services.picom = { enable = true; backend = "glx"; diff --git a/modules/applications/i3/polybar.nix b/modules/applications/i3/polybar.nix index cbb3c46..34eabd0 100644 --- a/modules/applications/i3/polybar.nix +++ b/modules/applications/i3/polybar.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.i3.polybar; + this = config.my.application.i3.polybar; i3 = config.my.application.i3; colors = { alert = "#A54242"; @@ -19,7 +19,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { services.polybar = { enable = true; diff --git a/modules/applications/i3/rofi.nix b/modules/applications/i3/rofi.nix index 4d9b40f..e087feb 100644 --- a/modules/applications/i3/rofi.nix +++ b/modules/applications/i3/rofi.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.i3.rofi; + this = config.my.application.i3.rofi; i3 = config.my.application.i3; in with lib; { @@ -11,7 +11,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { home.packages = with pkgs; [ rofi-systemd rofi-power-menu ]; programs.rofi = { diff --git a/modules/applications/kdeconnect.nix b/modules/applications/kdeconnect.nix index a50adca..686c84c 100644 --- a/modules/applications/kdeconnect.nix +++ b/modules/applications/kdeconnect.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.kdeconnect; + this = config.my.application.kdeconnect; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { # home-manager.users.james = { # services.kdeconnect = { # indicator = true; diff --git a/modules/applications/kitty.nix b/modules/applications/kitty.nix index f57bde3..1b532f8 100644 --- a/modules/applications/kitty.nix +++ b/modules/applications/kitty.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.kitty; + this = config.my.application.kitty; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { home.packages = with pkgs; [ kitty ]; programs.kitty = { diff --git a/modules/applications/media.nix b/modules/applications/media.nix index 1ae27a1..b71d054 100644 --- a/modules/applications/media.nix +++ b/modules/applications/media.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.media; + this = config.my.application.media; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { programs.mpv = { enable = true; diff --git a/modules/applications/nextcloud.nix b/modules/applications/nextcloud.nix index ac2b461..6b5232f 100644 --- a/modules/applications/nextcloud.nix +++ b/modules/applications/nextcloud.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.nextcloud; + this = config.my.application.nextcloud; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { home.packages = with pkgs; [ nextcloud-client ]; }; diff --git a/modules/applications/spotify.nix b/modules/applications/spotify.nix index f185990..4a033e6 100644 --- a/modules/applications/spotify.nix +++ b/modules/applications/spotify.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.spotify; + this = config.my.application.spotify; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { home.packages = with pkgs; [ spotify ]; }; # Local discovery - https://nixos.wiki/wiki/Spotify diff --git a/modules/applications/zathura.nix b/modules/applications/zathura.nix index 7c0e52b..67779cd 100644 --- a/modules/applications/zathura.nix +++ b/modules/applications/zathura.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.zathura; + this = config.my.application.zathura; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { programs.zathura = { enable = true; }; }; }; } diff --git a/modules/applications/zeal.nix b/modules/applications/zeal.nix index 765b576..de51164 100644 --- a/modules/applications/zeal.nix +++ b/modules/applications/zeal.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.application.zeal; + this = config.my.application.zeal; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james.home.packages = with pkgs; [ zeal ]; }; } diff --git a/modules/lang/bash.nix b/modules/lang/bash.nix index a9d3226..2e607e8 100644 --- a/modules/lang/bash.nix +++ b/modules/lang/bash.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.lang.bash; + this = config.my.lang.bash; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { home.packages = with pkgs; [ nodePackages.bash-language-server diff --git a/modules/lang/golang.nix b/modules/lang/golang.nix index 12eca0f..6cae8de 100644 --- a/modules/lang/golang.nix +++ b/modules/lang/golang.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.lang.golang; + this = config.my.lang.golang; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { programs.go = { enable = true; diff --git a/modules/lang/javascript.nix b/modules/lang/javascript.nix index e769a9e..44abeff 100644 --- a/modules/lang/javascript.nix +++ b/modules/lang/javascript.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.lang.bash; + this = config.my.lang.bash; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { home-manager.users.james = { home.packages = with pkgs; [ nodePackages.npm diff --git a/modules/system/boot.nix b/modules/system/boot.nix index 7a12b51..8609cb2 100644 --- a/modules/system/boot.nix +++ b/modules/system/boot.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -let cfg = config.my.system.boot; +let this = config.my.system.boot; in with lib; { options.my.system.boot.enable = mkOption { default = true; @@ -7,7 +7,7 @@ in with lib; { description = "Is there a physical power button?"; }; - config = mkIf cfg.enable { + config = mkIf this.enable { boot = { # Enable bootloader & clear /tmp on boot. cleanTmpDir = true; diff --git a/modules/system/displaymanager.nix b/modules/system/displaymanager.nix index edcd464..1e17744 100644 --- a/modules/system/displaymanager.nix +++ b/modules/system/displaymanager.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.my.system.displaymanager; + this = config.my.system.displaymanager; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { services.xserver = { enable = true; displayManager = { gdm.enable = true; }; diff --git a/modules/system/flatpak.nix b/modules/system/flatpak.nix index 8cd00d1..a217546 100644 --- a/modules/system/flatpak.nix +++ b/modules/system/flatpak.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: let - cfg = config.system.flatpak; + this = config.system.flatpak; graphical = config.my.graphical; in with lib; { options = { @@ -10,7 +10,7 @@ in with lib; { }; }; - config = mkIf cfg.enable { + config = mkIf this.enable { services.flatpak.enable = true; xdg.portal = { enable = true; diff --git a/modules/system/keyring.nix b/modules/system/keyring.nix index 3bdd016..069ff91 100644 --- a/modules/system/keyring.nix +++ b/modules/system/keyring.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -let cfg = config.my.system.keyring; +let this = config.my.system.keyring; in with lib; { options.my = { system.keyring.enable = mkOption { @@ -9,5 +9,5 @@ in with lib; { }; # options.my.system.keyring.enable = mkEnableOption "keyring"; - config = mkIf cfg.enable { services.gnome.gnome-keyring.enable = true; }; + config = mkIf this.enable { services.gnome.gnome-keyring.enable = true; }; } diff --git a/modules/system/power.nix b/modules/system/power.nix index fc9b31a..0adf22a 100644 --- a/modules/system/power.nix +++ b/modules/system/power.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: -let cfg = config.my.system.power; +let this = config.my.system.power; in with lib; { options.my.system.power.enable = mkEnableOption "Power Management"; - config = mkIf cfg.enable { + config = mkIf this.enable { # fan control modules boot.extraModprobeConfig = '' options thinkpad_acpi fan_control=1 experimental=1 diff --git a/modules/system/yubikey.nix b/modules/system/yubikey.nix index 638198d..7884b32 100644 --- a/modules/system/yubikey.nix +++ b/modules/system/yubikey.nix @@ -1,11 +1,11 @@ { config, lib, pkgs, ... }: let - cfg = config.my.system.yubikey; + this = config.my.system.yubikey; graphical = config.my.graphical; in with lib; { options.my.system.yubikey.enable = mkEnableOption "Yubikey"; - config = mkIf cfg.enable { + config = mkIf this.enable { services.udev.packages = with pkgs; [ yubikey-personalization ]; environment.shellInit = '' diff --git a/modules/system/zfs.nix b/modules/system/zfs.nix index 0813912..41258db 100644 --- a/modules/system/zfs.nix +++ b/modules/system/zfs.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: -let cfg = config.my.system.zfs; +let this = config.my.system.zfs; in with lib; { options.my.system.zfs.enable = mkEnableOption "zfs"; - config = mkIf cfg.enable { + config = mkIf this.enable { boot = { supportedFilesystems = [ "zfs" ]; zfs = {