summaryrefslogtreecommitdiff
path: root/users/seth/default.nix
diff options
context:
space:
mode:
authorSeth Flynn <[email protected]>2025-02-14 01:18:47 -0500
committerSeth Flynn <[email protected]>2025-02-14 01:29:06 -0500
commit3e208d20934bedd8cd7769f23f35cfae9d8e7d0d (patch)
tree452399d770df6be2589be3c92771b1999dd1b93a /users/seth/default.nix
parentc1bea770122a7cf2dea5113387265f59010d5a7f (diff)
seth: simplify module structure
Moving to mixins generally reduces the boilerplate in all configurations, and less custom "stuff" These are then enabled by the regular options in programs.nix for example Many of the other options (like desktops) also had little use in being abstracted as there's no situation where I'd *not* want them to be applied when said desktop is in use
Diffstat (limited to 'users/seth/default.nix')
-rw-r--r--users/seth/default.nix70
1 files changed, 6 insertions, 64 deletions
diff --git a/users/seth/default.nix b/users/seth/default.nix
index 2afbbce..31df645 100644
--- a/users/seth/default.nix
+++ b/users/seth/default.nix
@@ -1,69 +1,11 @@
{
- config,
- lib,
- pkgs,
- ...
-}:
-let
- cfg = config.seth;
-in
-{
- options.seth = {
- enable = lib.mkEnableOption "Seth's home configuration";
-
- shellAliases.enable = lib.mkEnableOption "shell aliases" // {
- default = config.seth.enable;
- defaultText = lib.literalExpression "config.seth.enable";
- };
-
- shellVariables.enable = lib.mkEnableOption "shell variables" // {
- default = config.seth.enable;
- defaultText = lib.literalExpression "config.seth.enable";
- };
-
- standalone.enable = lib.mkEnableOption "standalone configuration mode";
- };
-
imports = [
- ./desktop
- ./programs
- ./services
- ./tweaks
+ ./custom
+ ./mixins
+ ./profiles
+ ./programs.nix
+ ./shell.nix
];
- config = lib.mkIf cfg.enable (
- lib.mkMerge [
- { home.stateVersion = "23.11"; }
-
- (lib.mkIf cfg.shellAliases.enable {
- home.shellAliases = {
- diff = "diff --color=auto";
- g = "git";
- gs = "g status";
- };
- })
-
- (lib.mkIf cfg.shellVariables.enable {
- home.sessionVariables = {
- EDITOR = "nvim";
- VISUAL = config.home.sessionVariables.EDITOR;
- CARGO_HOME = "${config.xdg.dataHome}/cargo";
- LESSHISTFILE = "${config.xdg.stateHome}/less/history";
- };
- })
-
- (lib.mkIf cfg.standalone.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 pkgs.stdenv.isDarwin then "/Users" else "/home") + "/${config.home.username}";
- };
- })
- ]
- );
+ home.stateVersion = "23.11";
}