diff options
Diffstat (limited to 'users/seth/custom')
| -rw-r--r-- | users/seth/custom/adw-gtk3.nix | 44 | ||||
| -rw-r--r-- | users/seth/custom/default.nix | 7 | ||||
| -rw-r--r-- | users/seth/custom/nix-override.nix | 25 | ||||
| -rw-r--r-- | users/seth/custom/standalone.nix | 36 |
4 files changed, 112 insertions, 0 deletions
diff --git a/users/seth/custom/adw-gtk3.nix b/users/seth/custom/adw-gtk3.nix new file mode 100644 index 0000000..aad0d1a --- /dev/null +++ b/users/seth/custom/adw-gtk3.nix @@ -0,0 +1,44 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.seth.adw-gtk3; +in + +{ + options.seth.adw-gtk3 = { + enable = lib.mkEnableOption "the use of the `adw-gtk3` GTK theme"; + + mode = lib.mkOption { + type = lib.types.enum [ + "light" + "dark" + ]; + default = "dark"; + description = "Mode of the adw-gtk3 theme"; + example = "light"; + }; + }; + + config = lib.mkIf cfg.enable { + assertions = [ + { + assertion = config.gtk.enable; + message = "`gtk.enable` must be `true` to apply the adw-gtk3 theme"; + } + ]; + + gtk = { + enable = true; + + theme = { + name = "adw-gtk3-dark"; + package = pkgs.adw-gtk3; + }; + }; + }; +} diff --git a/users/seth/custom/default.nix b/users/seth/custom/default.nix new file mode 100644 index 0000000..f7545cb --- /dev/null +++ b/users/seth/custom/default.nix @@ -0,0 +1,7 @@ +{ + imports = [ + ./adw-gtk3.nix + ./nix-override.nix + ./standalone.nix + ]; +} diff --git a/users/seth/custom/nix-override.nix b/users/seth/custom/nix-override.nix new file mode 100644 index 0000000..7457cdd --- /dev/null +++ b/users/seth/custom/nix-override.nix @@ -0,0 +1,25 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.seth.nix-override; +in + +{ + options.seth.nix-override = { + enable = lib.mkEnableOption "the use of a non-default implementation of Nix"; + package = lib.mkPackageOption pkgs "lix" { }; + }; + + config = lib.mkIf cfg.enable { + nix.package = cfg.package; + + programs = { + direnv.nix-direnv.package = pkgs.nix-direnv.override { nix = cfg.package; }; + }; + }; +} diff --git a/users/seth/custom/standalone.nix b/users/seth/custom/standalone.nix new file mode 100644 index 0000000..6bb85a1 --- /dev/null +++ b/users/seth/custom/standalone.nix @@ -0,0 +1,36 @@ +{ + config, + lib, + pkgs, + ... +}: + +let + cfg = config.seth.standalone; + + inherit (pkgs.stdenv.hostPlatform) isDarwin; +in + +{ + + options.seth.standalone = { + enable = lib.mkEnableOption "standalone configuration mode"; + }; + + config = lib.mkIf cfg.enable { + # This won't be set in standalone configurations + _module.args.osConfig = { }; + + # Make sure we can switch & update + programs.home-manager.enable = true; + + home = { + username = "seth"; + homeDirectory = (if isDarwin then "/Users" else "/home") + "/${config.home.username}"; + }; + + nix = { + package = lib.mkDefault pkgs.nix; + }; + }; +} |
