diff --git a/hosts/nil/hardware.nix b/hosts/nil/hardware.nix index 0fcfdde..578a409 100644 --- a/hosts/nil/hardware.nix +++ b/hosts/nil/hardware.nix @@ -26,7 +26,7 @@ # ├─rpool/root/nixos zfs / # └─rpool/home zfs /home { self, config, lib, pkgs, modulesPath, ... }: { - this.system = { + my.system = { zfs.enable = true; yubikey.enable = true; }; diff --git a/modules/applications/1password.nix b/modules/applications/1password.nix index fed6b97..770e90a 100644 --- a/modules/applications/1password.nix +++ b/modules/applications/1password.nix @@ -1,15 +1,15 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.onepassword; - graphical = config.this.graphical; + cfg = config.my.application.onepassword; + graphical = config.my.graphical; enable = (cfg.gui.enable || cfg.cli.enable); in with lib; { options = { - this.application.onepassword.gui.enable = mkOption { + my.application.onepassword.gui.enable = mkOption { default = graphical.enable; type = with types; bool; }; - this.application.onepassword.cli.enable = mkOption { + my.application.onepassword.cli.enable = mkOption { default = (graphical.enable || cfg.gui.enable); type = with types; bool; }; diff --git a/modules/applications/blueman.nix b/modules/applications/blueman.nix index 4489aca..347f813 100644 --- a/modules/applications/blueman.nix +++ b/modules/applications/blueman.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.blueman; - graphical = config.this.graphical; + cfg = config.my.application.blueman; + graphical = config.my.graphical; in with lib; { options = { - this.application.blueman.enable = mkOption { + my.application.blueman.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/dunst.nix b/modules/applications/dunst.nix index 7f2d48c..f635e11 100644 --- a/modules/applications/dunst.nix +++ b/modules/applications/dunst.nix @@ -1,11 +1,11 @@ { options, config, lib, pkgs, ... }: let - cfg = config.this.application.dunst; - i3 = config.this.application.i3; - graphical = config.this.graphical; + cfg = config.my.application.dunst; + i3 = config.my.application.i3; + graphical = config.my.graphical; in with lib; { options = { - this.application.dunst.enable = mkOption { + my.application.dunst.enable = mkOption { default = i3.enable; type = with types; bool; }; diff --git a/modules/applications/emacs.nix b/modules/applications/emacs.nix index 283f8ec..7dd701f 100644 --- a/modules/applications/emacs.nix +++ b/modules/applications/emacs.nix @@ -2,11 +2,11 @@ # TODO Still need the following dependecies # - Language tools (grammer) let - cfg = config.this.application.emacs; - graphical = config.this.graphical; + cfg = config.my.application.emacs; + graphical = config.my.graphical; in with lib; { options = { - this.application.emacs.enable = mkOption { + my.application.emacs.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/firefox/default.nix b/modules/applications/firefox/default.nix index 5f49e1d..b167796 100644 --- a/modules/applications/firefox/default.nix +++ b/modules/applications/firefox/default.nix @@ -1,9 +1,9 @@ { config, pkgs, lib, ... }: let - cfg = config.this.application.firefox; - graphical = config.this.graphical; + cfg = config.my.application.firefox; + graphical = config.my.graphical; in with lib; { - options.this.application.firefox = { + options.my.application.firefox = { enable = mkOption { default = graphical.enable; type = with types; bool; diff --git a/modules/applications/firefox/tridactyl.nix b/modules/applications/firefox/tridactyl.nix index 721a0bd..10f7d33 100644 --- a/modules/applications/firefox/tridactyl.nix +++ b/modules/applications/firefox/tridactyl.nix @@ -1,10 +1,10 @@ { config, pkgs, lib, ... }: let - cfg = config.this.application.firefox.tridactyl; - firefox = config.this.application.firefox; + cfg = config.my.application.firefox.tridactyl; + firefox = config.my.application.firefox; in with lib; { options = { - this.application.firefox.tridactyl.enable = mkOption { + my.application.firefox.tridactyl.enable = mkOption { default = firefox.enable; type = with types; bool; description = ""; diff --git a/modules/applications/gammastep.nix b/modules/applications/gammastep.nix index 766d8c2..2184537 100644 --- a/modules/applications/gammastep.nix +++ b/modules/applications/gammastep.nix @@ -1,10 +1,10 @@ { options, config, lib, pkgs, ... }: let - cfg = config.this.application.gammastep; - i3 = config.this.application.i3; + cfg = config.my.application.gammastep; + i3 = config.my.application.i3; in with lib; { options = { - this.application.gammastep.enable = mkOption { + my.application.gammastep.enable = mkOption { default = i3.enable; type = with types; bool; }; diff --git a/modules/applications/gnome-common.nix b/modules/applications/gnome-common.nix index 1627369..a93a913 100644 --- a/modules/applications/gnome-common.nix +++ b/modules/applications/gnome-common.nix @@ -1,8 +1,8 @@ { config, lib, pkgs, ... }: let - graphical = config.this.graphical; - power = config.this.system.power; - keyring = config.this.system.keyring; + graphical = config.my.graphical; + power = config.my.system.power; + keyring = config.my.system.keyring; in with lib; { config = mkIf graphical.enable { services.gvfs.enable = true; diff --git a/modules/applications/i3/i3.nix b/modules/applications/i3/i3.nix index acc211a..4abccd4 100644 --- a/modules/applications/i3/i3.nix +++ b/modules/applications/i3/i3.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.i3; - graphical = config.this.graphical; + cfg = config.my.application.i3; + graphical = config.my.graphical; modifier = "Mod4"; wallpaper = pkgs.fetchurl { url = "https://i.imgur.com/6B4Hgw0.jpeg"; @@ -10,7 +10,7 @@ let in with lib; { options = { - this.application.i3.enable = mkOption { + my.application.i3.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/i3/picom.nix b/modules/applications/i3/picom.nix index ad848ad..8df0717 100644 --- a/modules/applications/i3/picom.nix +++ b/modules/applications/i3/picom.nix @@ -1,11 +1,11 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.i3.picom; - i3 = config.this.application.i3; + cfg = config.my.application.i3.picom; + i3 = config.my.application.i3; in with lib; { options = { - this.application.i3.picom.enable = mkOption { + my.application.i3.picom.enable = mkOption { default = i3.enable; type = with types; bool; }; diff --git a/modules/applications/i3/polybar.nix b/modules/applications/i3/polybar.nix index 78e40c0..cbb3c46 100644 --- a/modules/applications/i3/polybar.nix +++ b/modules/applications/i3/polybar.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.i3.polybar; - i3 = config.this.application.i3; + cfg = config.my.application.i3.polybar; + i3 = config.my.application.i3; colors = { alert = "#A54242"; background = "#000000"; @@ -13,7 +13,7 @@ let }; in with lib; { options = { - this.application.i3.polybar.enable = mkOption { + my.application.i3.polybar.enable = mkOption { default = i3.enable; type = with types; bool; }; diff --git a/modules/applications/i3/rofi.nix b/modules/applications/i3/rofi.nix index 6fb1170..4d9b40f 100644 --- a/modules/applications/i3/rofi.nix +++ b/modules/applications/i3/rofi.nix @@ -1,11 +1,11 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.i3.rofi; - i3 = config.this.application.i3; + cfg = config.my.application.i3.rofi; + i3 = config.my.application.i3; in with lib; { options = { - this.application.i3.rofi.enable = mkOption { + my.application.i3.rofi.enable = mkOption { default = i3.enable; type = with types; bool; }; diff --git a/modules/applications/kdeconnect.nix b/modules/applications/kdeconnect.nix index efb97d2..a50adca 100644 --- a/modules/applications/kdeconnect.nix +++ b/modules/applications/kdeconnect.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.kdeconnect; - graphical = config.this.graphical; + cfg = config.my.application.kdeconnect; + graphical = config.my.graphical; in with lib; { options = { - this.application.kdeconnect.enable = mkOption { + my.application.kdeconnect.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/kitty.nix b/modules/applications/kitty.nix index 579cd06..f57bde3 100644 --- a/modules/applications/kitty.nix +++ b/modules/applications/kitty.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.kitty; - graphical = config.this.graphical; + cfg = config.my.application.kitty; + graphical = config.my.graphical; in with lib; { options = { - this.application.kitty.enable = mkOption { + my.application.kitty.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/media.nix b/modules/applications/media.nix index fc2a92f..1ae27a1 100644 --- a/modules/applications/media.nix +++ b/modules/applications/media.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.media; - graphical = config.this.graphical; + cfg = config.my.application.media; + graphical = config.my.graphical; in with lib; { options = { - this.application.media.enable = mkOption { + my.application.media.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/nextcloud.nix b/modules/applications/nextcloud.nix index 684126f..ac2b461 100644 --- a/modules/applications/nextcloud.nix +++ b/modules/applications/nextcloud.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.nextcloud; - graphical = config.this.graphical; + cfg = config.my.application.nextcloud; + graphical = config.my.graphical; in with lib; { options = { - this.application.nextcloud.enable = mkOption { + my.application.nextcloud.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/spotify.nix b/modules/applications/spotify.nix index f464c37..f185990 100644 --- a/modules/applications/spotify.nix +++ b/modules/applications/spotify.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.spotify; - graphical = config.this.graphical; + cfg = config.my.application.spotify; + graphical = config.my.graphical; in with lib; { options = { - this.application.spotify.enable = mkOption { + my.application.spotify.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/zathura.nix b/modules/applications/zathura.nix index 2199b5d..7c0e52b 100644 --- a/modules/applications/zathura.nix +++ b/modules/applications/zathura.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.zathura; - graphical = config.this.graphical; + cfg = config.my.application.zathura; + graphical = config.my.graphical; in with lib; { options = { - this.application.zathura.enable = mkOption { + my.application.zathura.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/applications/zeal.nix b/modules/applications/zeal.nix index e0a5b64..765b576 100644 --- a/modules/applications/zeal.nix +++ b/modules/applications/zeal.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.application.zeal; - graphical = config.this.graphical; + cfg = config.my.application.zeal; + graphical = config.my.graphical; in with lib; { options = { - this.application.zeal.enable = mkOption { + my.application.zeal.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/lang/bash.nix b/modules/lang/bash.nix index 442a908..a9d3226 100644 --- a/modules/lang/bash.nix +++ b/modules/lang/bash.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.lang.bash; - graphical = config.this.graphical; + cfg = config.my.lang.bash; + graphical = config.my.graphical; in with lib; { options = { - this.lang.bash.enable = mkOption { + my.lang.bash.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/lang/golang.nix b/modules/lang/golang.nix index 874d0d3..12eca0f 100644 --- a/modules/lang/golang.nix +++ b/modules/lang/golang.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.lang.golang; - graphical = config.this.graphical; + cfg = config.my.lang.golang; + graphical = config.my.graphical; in with lib; { options = { - this.lang.golang.enable = mkOption { + my.lang.golang.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/lang/javascript.nix b/modules/lang/javascript.nix index 825c217..e769a9e 100644 --- a/modules/lang/javascript.nix +++ b/modules/lang/javascript.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.lang.bash; - graphical = config.this.graphical; + cfg = config.my.lang.bash; + graphical = config.my.graphical; in with lib; { options = { - this.lang.javascript.enable = mkOption { + my.lang.javascript.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/options.nix b/modules/options.nix index 629f16a..6b56869 100644 --- a/modules/options.nix +++ b/modules/options.nix @@ -1,6 +1,6 @@ { config, pkgs, lib, ... }: { - options.this.graphical = { + options.my.graphical = { enable = lib.mkEnableOption "Does this actually need X/Wayland"; }; diff --git a/modules/system/boot.nix b/modules/system/boot.nix index eb485c8..7a12b51 100644 --- a/modules/system/boot.nix +++ b/modules/system/boot.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: -let cfg = config.this.system.boot; +let cfg = config.my.system.boot; in with lib; { - options.this.system.boot.enable = mkOption { + options.my.system.boot.enable = mkOption { default = true; type = with types; bool; description = "Is there a physical power button?"; diff --git a/modules/system/displaymanager.nix b/modules/system/displaymanager.nix index 56f5a97..edcd464 100644 --- a/modules/system/displaymanager.nix +++ b/modules/system/displaymanager.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.this.system.displaymanager; - graphical = config.this.graphical; + cfg = config.my.system.displaymanager; + graphical = config.my.graphical; in with lib; { options = { - this.system.displaymanager.enable = mkOption { + my.system.displaymanager.enable = mkOption { default = graphical.enable; type = with types; bool; }; diff --git a/modules/system/flatpak.nix b/modules/system/flatpak.nix index a02fcec..8cd00d1 100644 --- a/modules/system/flatpak.nix +++ b/modules/system/flatpak.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: let cfg = config.system.flatpak; - graphical = config.this.graphical; + graphical = config.my.graphical; in with lib; { options = { system.flatpak.enable = mkOption { diff --git a/modules/system/fonts.nix b/modules/system/fonts.nix index 8d61bf9..90e3de5 100644 --- a/modules/system/fonts.nix +++ b/modules/system/fonts.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -let graphical = config.this.graphical; +let graphical = config.my.graphical; in { config = lib.mkIf graphical.enable { fonts = { diff --git a/modules/system/gtk.nix b/modules/system/gtk.nix index 52ea786..3192e21 100644 --- a/modules/system/gtk.nix +++ b/modules/system/gtk.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: -let graphical = config.this.graphical; +let graphical = config.my.graphical; in with lib; { config = mkIf graphical.enable { home-manager.users.james = { diff --git a/modules/system/keyring.nix b/modules/system/keyring.nix index cc9f4d8..3bdd016 100644 --- a/modules/system/keyring.nix +++ b/modules/system/keyring.nix @@ -1,13 +1,13 @@ { config, lib, pkgs, ... }: -let cfg = config.this.system.keyring; +let cfg = config.my.system.keyring; in with lib; { - options.this = { + options.my = { system.keyring.enable = mkOption { default = true; type = with types; bool; }; }; - # options.this.system.keyring.enable = mkEnableOption "keyring"; + # options.my.system.keyring.enable = mkEnableOption "keyring"; config = mkIf cfg.enable { services.gnome.gnome-keyring.enable = true; }; } diff --git a/modules/system/power.nix b/modules/system/power.nix index 11df7a9..fc9b31a 100644 --- a/modules/system/power.nix +++ b/modules/system/power.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: -let cfg = config.this.system.power; +let cfg = config.my.system.power; in with lib; { - options.this.system.power.enable = mkEnableOption "Power Management"; + options.my.system.power.enable = mkEnableOption "Power Management"; config = mkIf cfg.enable { # fan control modules diff --git a/modules/system/yubikey.nix b/modules/system/yubikey.nix index 3e41dc4..638198d 100644 --- a/modules/system/yubikey.nix +++ b/modules/system/yubikey.nix @@ -1,9 +1,9 @@ { config, lib, pkgs, ... }: let - cfg = config.this.system.yubikey; - graphical = config.this.graphical; + cfg = config.my.system.yubikey; + graphical = config.my.graphical; in with lib; { - options.this.system.yubikey.enable = mkEnableOption "Yubikey"; + options.my.system.yubikey.enable = mkEnableOption "Yubikey"; config = mkIf cfg.enable { services.udev.packages = with pkgs; [ yubikey-personalization ]; diff --git a/modules/system/zfs.nix b/modules/system/zfs.nix index 2e87148..0813912 100644 --- a/modules/system/zfs.nix +++ b/modules/system/zfs.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: -let cfg = config.this.system.zfs; +let cfg = config.my.system.zfs; in with lib; { - options.this.system.zfs.enable = mkEnableOption "zfs"; + options.my.system.zfs.enable = mkEnableOption "zfs"; config = mkIf cfg.enable { boot = { diff --git a/profiles/graphical.nix b/profiles/graphical.nix index 272a36f..1b8969a 100644 --- a/profiles/graphical.nix +++ b/profiles/graphical.nix @@ -1,7 +1,7 @@ { config, lib, pkgs, ... }: { imports = [ ./minimal.nix ]; - this = { + my = { graphical.enable = true; system.power.enable = true; }; diff --git a/profiles/laptop.nix b/profiles/laptop.nix index 7603126..3503682 100644 --- a/profiles/laptop.nix +++ b/profiles/laptop.nix @@ -1,6 +1,6 @@ { config, lib, pkgs, ... }: { imports = [ ./graphical.nix ]; - this.system.boot.enable = true; + my.system.boot.enable = true; networking.networkmanager.enable = true; users.users.james.extraGroups = [ "networkmanager" ]; }