diff --git a/modules/features/default.nix b/modules/features/default.nix index bac376b..7ca891e 100644 --- a/modules/features/default.nix +++ b/modules/features/default.nix @@ -13,7 +13,7 @@ channel.enable = false; settings = { experimental-features = [ "nix-command" "flakes" ]; - builders-use-substitutes = lib.mkIf true; + builders-use-substitutes = (config.sops.secrets ? "remoteBuildKey"); substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"]; trusted-substituters = lib.mkIf config.programs.hyprland.enable ["https://hyprland.cachix.org"]; diff --git a/modules/hosts/container/configuration.nix b/modules/hosts/container/configuration.nix index 7321005..8b379b2 100644 --- a/modules/hosts/container/configuration.nix +++ b/modules/hosts/container/configuration.nix @@ -113,29 +113,6 @@ }; };*/ - programs.fuse.userAllowOther = true; - - home-manager = { - backupFileExtension = "backup"; - extraSpecialArgs = {inherit inputs;}; - users = { - "nathan" = lib.mkMerge [ - inputs.nathan-home-manager - { - config.homeconfig = { - minimal = false; - hyprland.enable = false; - wal.enable = false; - mpd.enable = true; - calcurse.enable = true; - rofi.enable = true; - firefox.enable = true; - }; - } - ]; - }; - }; - fonts.packages = with pkgs; [ nerd-fonts.fira-code ]; }; diff --git a/modules/hosts/homebox/configuration.nix b/modules/hosts/homebox/configuration.nix index 2029b8e..04b3c0e 100644 --- a/modules/hosts/homebox/configuration.nix +++ b/modules/hosts/homebox/configuration.nix @@ -32,6 +32,9 @@ nixpkgs.config.allowUnfree = true; networking = { + + hostName = "homebox"; + nameservers = lib.mkDefault [ "1.1.1.1" "1.0.0.1" ]; networkmanager = { enable = true; diff --git a/modules/hosts/homebox/default.nix b/modules/hosts/homebox/default.nix index a00ec79..d278b2c 100644 --- a/modules/hosts/homebox/default.nix +++ b/modules/hosts/homebox/default.nix @@ -2,9 +2,10 @@ flake.nixosConfigurations."homebox" = inputs.nixpkgs.lib.nixosSystem { - modules = [ - self.nixosModules.homebox - self.nixosModules.homebox-hardware + modules = with self.nixosModules; [ + (user-nathan "laptop") + homebox + homebox-hardware self.diskoConfigurations.homebox ]; }; diff --git a/modules/hosts/laptop/configuration.nix b/modules/hosts/laptop/configuration.nix index 17f444e..e633155 100644 --- a/modules/hosts/laptop/configuration.nix +++ b/modules/hosts/laptop/configuration.nix @@ -7,6 +7,7 @@ imports = with self.nixosModules; [ inputs.home-manager.nixosModules.default + self.nixosModules.default self.nixosModules.default aurora-greeter hyprland @@ -71,6 +72,9 @@ programs.zsh.enable = true; networking = { + + hostName = "laptop"; + nameservers = [ "1.1.1.1" "1.0.0.1" diff --git a/modules/hosts/laptop/default.nix b/modules/hosts/laptop/default.nix index 89cad64..b99c9a9 100644 --- a/modules/hosts/laptop/default.nix +++ b/modules/hosts/laptop/default.nix @@ -2,9 +2,10 @@ flake.nixosConfigurations."laptop" = inputs.nixpkgs.lib.nixosSystem { - modules = [ - self.nixosModules.laptop - self.nixosModules.laptop-hardware + modules = with self.nixosModules; [ + user-nathan + laptop + laptop-hardware ]; }; diff --git a/modules/users/nathan/home-manager/default.nix b/modules/users/nathan/home-manager/default.nix index eb1278d..5256132 100644 --- a/modules/users/nathan/home-manager/default.nix +++ b/modules/users/nathan/home-manager/default.nix @@ -6,71 +6,29 @@ inputs.sops-nix.homeManagerModules.sops ]; - options.homeconfig = with lib; { - - name = mkOption { - type = with types; nullOr str; - default = null; - }; - - graphical = mkOption { - type = with types; bool; - default = true; - }; - - standalone = mkOption { - type = with types; bool; - default = false; - }; - - virtual-machines = mkOption { - type = with types; bool; - default = false; - }; - }; - - config = { - homeconfig = { - name = "nathan"; - - mpd.enable = lib.mkDefault true; - calcurse.enable = lib.mkDefault true; - git.enable = lib.mkDefault true; - nh.enable = lib.mkDefault true; - - minimal = lib.mkDefault false; - hyprland.enable = lib.mkDefault config.homeconfig.graphical; - hypridle.enable = lib.mkDefault config.homeconfig.hyprland.enable; - wal.enable = lib.mkDefault config.homeconfig.graphical; - rofi.enable = lib.mkDefault config.homeconfig.hyprland.enable; - firefox.enable = lib.mkDefault config.homeconfig.graphical; - - aurora.enable = lib.mkDefault config.homeconfig.hyprland.enable; - }; - - home.username = lib.mkDefault config.homeconfig.name; + home.username = "nathan"; home.homeDirectory = lib.mkDefault "/home/${config.home.username}"; home.stateVersion = "23.11"; - home.pointerCursor = lib.mkIf config.homeconfig.graphical { + home.pointerCursor = { gtk.enable = true; package = pkgs.bibata-cursors; name = "Bibata-Modern-Classic"; size = 16; }; - dconf.settings = lib.mkIf config.homeconfig.virtual-machines { + dconf.settings = { "org/virt-manager/virt-manager/connections" = { autoconnect = ["qemu:///system"]; uris = ["qemu:///system"]; }; }; - gtk = lib.mkIf (config.homeconfig.graphical && config.homeconfig.hyprland.enable) { + gtk = { enable = true; theme.name = "Tokyonight-Dark"; theme.package = pkgs.tokyonight-gtk-theme; @@ -108,7 +66,7 @@ }; }; - home.packages = lib.mkIf (!config.homeconfig.wal.enable) [ + home.packages = lib.mkIf (!(builtins.any (x: x == pkgs.pywal16) config.home.packages)) [ inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.default ]; diff --git a/modules/users/nathan/home-manager/dotfiles/default.nix b/modules/users/nathan/home-manager/dotfiles/default.nix index 956fb05..0f3da72 100644 --- a/modules/users/nathan/home-manager/dotfiles/default.nix +++ b/modules/users/nathan/home-manager/dotfiles/default.nix @@ -1,12 +1,12 @@ { ... }: { - flake.homeModules.nathan = { config, lib, ... }: { + flake.homeModules.nathan = { config, lib, pkgs, ... }: { home.file = { - ".config/hypr" = lib.mkIf config.homeconfig.hyprland.enable { source = ./hypr; recursive = true; }; - ".config/wal/templates" = lib.mkIf config.homeconfig.wal.enable { source = ./wal/templates; recursive = true; }; + ".config/hypr" = lib.mkIf config.wayland.windowManager.hyprland.enable { source = ./hypr; recursive = true; }; + ".config/wal/templates" = lib.mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) { source = ./wal/templates; recursive = true; }; ".config/ohmyposh" = { source = ./ohmyposh; recursive = true; }; - "Pictures/Wallpaper" = lib.mkIf config.homeconfig.graphical { source = ./Wallpaper; recursive = true; }; + "Pictures/Wallpaper" = lib.mkIf config.wayland.windowManager.hyprland.enable { source = ./Wallpaper; recursive = true; }; }; }; diff --git a/modules/users/nathan/home-manager/features/aurora.nix b/modules/users/nathan/home-manager/features/aurora.nix index a9d197b..e6b20ea 100644 --- a/modules/users/nathan/home-manager/features/aurora.nix +++ b/modules/users/nathan/home-manager/features/aurora.nix @@ -1,17 +1,12 @@ { inputs, ... }: { - flake.homeModules.nathan = { config, lib, ... }: { + flake.homeModules.nathan-aurora = { config, lib, ... }: { imports = [ inputs.aurora.homeModules.default ]; - options.homeconfig.aurora.enable = with lib; mkOption { - type = with types; bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.aurora.enable { + config = { programs.aurora = { enable = true; diff --git a/modules/users/nathan/home-manager/features/bash.nix b/modules/users/nathan/home-manager/features/bash.nix index d75d106..5be8a62 100644 --- a/modules/users/nathan/home-manager/features/bash.nix +++ b/modules/users/nathan/home-manager/features/bash.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-bash = { config, lib, pkgs, ... }: { home.packages = with pkgs; [ oh-my-posh ]; @@ -24,12 +24,16 @@ source ${pkgs.blesh}/share/blesh/ble.sh ''; - initExtra = if config.homeconfig.wal.enable then (lib.mkBefore '' - cat ${config.home.homeDirectory}/.cache/wal/sequences - eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)" - '') else (lib.mkBefore '' - eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)" - ''); + initExtra = lib.mkMerge [ + (lib.mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) (lib.mkBefore '' + cat ${config.home.homeDirectory}/.cache/wal/sequences + eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)" + '')) + + (lib.mkIf (!(builtins.any (x: x == pkgs.pywal16) config.home.packages)) (lib.mkBefore '' + eval "$(oh-my-posh init bash --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)" + '')) + ]; }; }; } diff --git a/modules/users/nathan/home-manager/features/bat.nix b/modules/users/nathan/home-manager/features/bat.nix index 8c37762..50bc1d4 100644 --- a/modules/users/nathan/home-manager/features/bat.nix +++ b/modules/users/nathan/home-manager/features/bat.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-bat = { config, lib, pkgs, ... }: { programs.bat = { diff --git a/modules/users/nathan/home-manager/features/calcurse.nix b/modules/users/nathan/home-manager/features/calcurse.nix index 36b1dc3..3ed474b 100644 --- a/modules/users/nathan/home-manager/features/calcurse.nix +++ b/modules/users/nathan/home-manager/features/calcurse.nix @@ -1,13 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-calcurse = { config, lib, pkgs, ... }: { - options.homeconfig.calcurse.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.calcurse.enable { + config = { home.packages = with pkgs; [ calcurse libnotify diff --git a/modules/users/nathan/home-manager/features/eza.nix b/modules/users/nathan/home-manager/features/eza.nix index 025442f..49270e0 100644 --- a/modules/users/nathan/home-manager/features/eza.nix +++ b/modules/users/nathan/home-manager/features/eza.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-eza = { config, lib, pkgs, ... }: { programs.eza = { diff --git a/modules/users/nathan/home-manager/features/firefox.nix b/modules/users/nathan/home-manager/features/firefox.nix index b45fb19..cdb36e6 100644 --- a/modules/users/nathan/home-manager/features/firefox.nix +++ b/modules/users/nathan/home-manager/features/firefox.nix @@ -1,17 +1,12 @@ { inputs, ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-firefox = { config, lib, pkgs, ... }: { - options.homeconfig.firefox.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.firefox.enable { + config = { home.sessionVariables.BROWSER = "${config.programs.firefox.package}/bin/firefox"; - home.packages = lib.mkIf config.homeconfig.wal.enable [ + home.packages = lib.mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) [ pkgs.pywalfox-native ]; diff --git a/modules/users/nathan/home-manager/features/fzf.nix b/modules/users/nathan/home-manager/features/fzf.nix index f9d2bd8..89404e4 100644 --- a/modules/users/nathan/home-manager/features/fzf.nix +++ b/modules/users/nathan/home-manager/features/fzf.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-fzf = { config, lib, pkgs, ... }: { programs.fzf = { diff --git a/modules/users/nathan/home-manager/features/git.nix b/modules/users/nathan/home-manager/features/git.nix index 14cc5e2..d45faf5 100644 --- a/modules/users/nathan/home-manager/features/git.nix +++ b/modules/users/nathan/home-manager/features/git.nix @@ -1,13 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, ... }: { + flake.homeModules.nathan-git = { config, lib, ... }: { - options.homeconfig.git.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.git.enable { + config = { sops = { secrets = { diff --git a/modules/users/nathan/home-manager/features/hypridle.nix b/modules/users/nathan/home-manager/features/hypridle.nix index f16445f..d2378c5 100644 --- a/modules/users/nathan/home-manager/features/hypridle.nix +++ b/modules/users/nathan/home-manager/features/hypridle.nix @@ -1,13 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-hypridle = { config, lib, pkgs, ... }: { - options.homeconfig.hypridle.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.hypridle.enable { + config = { services.hypridle = { enable = true; diff --git a/modules/users/nathan/home-manager/features/hyprland.nix b/modules/users/nathan/home-manager/features/hyprland.nix index ed0878e..1e2ab2f 100644 --- a/modules/users/nathan/home-manager/features/hyprland.nix +++ b/modules/users/nathan/home-manager/features/hyprland.nix @@ -1,13 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-hyprland = { config, lib, pkgs, ... }: { - options.homeconfig.hyprland.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.hyprland.enable { + config = { home.sessionVariables.NIX_OZONE_WL = "1"; diff --git a/modules/users/nathan/home-manager/features/kitty.nix b/modules/users/nathan/home-manager/features/kitty.nix index 612de76..e9a9037 100644 --- a/modules/users/nathan/home-manager/features/kitty.nix +++ b/modules/users/nathan/home-manager/features/kitty.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, ... }: { + flake.homeModules.nathan-kitty = { config, ... }: { programs.kitty = { diff --git a/modules/users/nathan/home-manager/features/mpd.nix b/modules/users/nathan/home-manager/features/mpd.nix index e60c807..bf257d9 100644 --- a/modules/users/nathan/home-manager/features/mpd.nix +++ b/modules/users/nathan/home-manager/features/mpd.nix @@ -1,15 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-mpd = { config, lib, pkgs, ... }: { - options = { - homeconfig.mpd.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - }; - - config = lib.mkIf config.homeconfig.mpd.enable { + config = { services.mpd = { enable = true; network.startWhenNeeded = true; diff --git a/modules/users/nathan/home-manager/features/nh.nix b/modules/users/nathan/home-manager/features/nh.nix index 97a89ac..030ed7f 100644 --- a/modules/users/nathan/home-manager/features/nh.nix +++ b/modules/users/nathan/home-manager/features/nh.nix @@ -1,13 +1,8 @@ { inputs, ... }: { - flake.homeModules.nathan = { config, lib, ... }: { + flake.homeModules.nathan-nh = { config, lib, ... }: { - options.homeconfig.nh.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.nh.enable { + config = { programs.nh = { enable = true; diff --git a/modules/users/nathan/home-manager/features/ohmyposh.nix b/modules/users/nathan/home-manager/features/ohmyposh.nix index 974880f..39a0245 100644 --- a/modules/users/nathan/home-manager/features/ohmyposh.nix +++ b/modules/users/nathan/home-manager/features/ohmyposh.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-ohmyposh = { config, lib, pkgs, ... }: { home.packages = with pkgs; [ oh-my-posh @@ -9,7 +9,7 @@ programs.zsh = { initContent = with lib; mkMerge [ - (mkIf config.homeconfig.wal.enable (mkBefore '' + (mkIf (builtins.any (x: x == pkgs.pywal16) config.home.packages) (mkBefore '' cat ${config.home.homeDirectory}/.cache/wal/sequences eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.cache/wal/ohmyposh.toml)" @@ -21,7 +21,7 @@ bindkey '\r' _colorRefresh '')) - (mkIf (!config.homeconfig.wal.enable) (mkBefore '' + (mkIf (!(builtins.any (x: x == pkgs.pywal16) config.home.packages)) (mkBefore '' eval "$(oh-my-posh init zsh --config ${config.home.homeDirectory}/.config/ohmyposh/ohmyposh.toml)" '')) ]; diff --git a/modules/users/nathan/home-manager/features/opencode.nix b/modules/users/nathan/home-manager/features/opencode.nix index 83148e6..62591e8 100644 --- a/modules/users/nathan/home-manager/features/opencode.nix +++ b/modules/users/nathan/home-manager/features/opencode.nix @@ -1,13 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, ... }: { + flake.homeModules.nathan-opencode = { config, lib, ... }: { - options.homeconfig.opencode.enable = with lib; mkOption { - type = with types; bool; - default = true; - }; - - config = lib.mkIf config.homeconfig.opencode.enable { + config = { programs.opencode = { enable = true; diff --git a/modules/users/nathan/home-manager/features/packages.nix b/modules/users/nathan/home-manager/features/packages.nix index e89e247..dcd9c7e 100644 --- a/modules/users/nathan/home-manager/features/packages.nix +++ b/modules/users/nathan/home-manager/features/packages.nix @@ -1,19 +1,6 @@ -{ inputs, ... }: { +{ ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: let - system = pkgs.stdenv.hostPlatform; - - pkgs-us = import inputs.nixpkgs-us { - inherit system; - config.allowUnfree = true; - }; - - in { - - options.homeconfig.minimal = with lib; options.mkOption { - type = with types; bool; - default = false; - }; + flake.homeModules.nathan = { config, lib, pkgs, ... }: { config = with lib; mkMerge [ { @@ -41,11 +28,27 @@ pyusb requests ])) + + cava + android-tools + neovim-remote + zulu + fastfetch + ncmpcpp + playerctl + mpc + ffmpeg ]; } - (mkIf config.homeconfig.graphical { + (mkIf config.wayland.windowManager.hyprland.enable { + + nixpkgs.config = { + allowUnfree = true; + }; + + home.packages = with pkgs; [ grim @@ -53,30 +56,6 @@ wl-clipboard xfce.thunar blueberry - ]; - }) - - (mkIf (!config.homeconfig.minimal) { - home.packages = with pkgs; [ - cava - android-tools - neovim-remote - zulu - fastfetch - ncmpcpp - playerctl - mpc - ffmpeg - ]; - }) - - (mkIf (!config.homeconfig.minimal && config.homeconfig.graphical) { - - nixpkgs.config = { - allowUnfree = true; - }; - - home.packages = with pkgs; [ handbrake quickemu @@ -111,7 +90,7 @@ #games prismlauncher ]; - }) + }) ]; }; } diff --git a/modules/users/nathan/home-manager/features/pywal.nix b/modules/users/nathan/home-manager/features/pywal.nix index d3f16f4..e8764c6 100644 --- a/modules/users/nathan/home-manager/features/pywal.nix +++ b/modules/users/nathan/home-manager/features/pywal.nix @@ -1,19 +1,13 @@ { inputs, ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-pywal = { config, lib, pkgs, ... }: { - options.homeconfig.wal.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.wal.enable { + config = { home.packages = with pkgs; [ inputs.nixvim.packages.${pkgs.stdenv.hostPlatform.system}.pywal - - pywal16 - imagemagick + pywal16 + imagemagick ]; diff --git a/modules/users/nathan/home-manager/features/ripgrep.nix b/modules/users/nathan/home-manager/features/ripgrep.nix index c473482..9c4a6c2 100644 --- a/modules/users/nathan/home-manager/features/ripgrep.nix +++ b/modules/users/nathan/home-manager/features/ripgrep.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { ... }: { + flake.homeModules.nathan-ripgrep = { ... }: { programs.ripgrep = { enable = true; diff --git a/modules/users/nathan/home-manager/features/rofi.nix b/modules/users/nathan/home-manager/features/rofi.nix index 7c62c16..8699102 100644 --- a/modules/users/nathan/home-manager/features/rofi.nix +++ b/modules/users/nathan/home-manager/features/rofi.nix @@ -1,13 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-rofi = { config, lib, pkgs, ... }: { - options.homeconfig.rofi.enable = lib.options.mkOption { - type = lib.types.bool; - default = false; - }; - - config = lib.mkIf config.homeconfig.rofi.enable { + config = { programs.rofi = { enable = true; diff --git a/modules/users/nathan/home-manager/features/scripts.nix b/modules/users/nathan/home-manager/features/scripts.nix index ba3f3a6..664a597 100644 --- a/modules/users/nathan/home-manager/features/scripts.nix +++ b/modules/users/nathan/home-manager/features/scripts.nix @@ -1,17 +1,8 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-scripts = { config, lib, pkgs, ... }: { - options = { - homeconfig.scripts.enable = lib.options.mkOption { - type = lib.types.bool; - default = true; - }; - }; - - config = lib.mkMerge [ - - (lib.mkIf config.homeconfig.scripts.enable { + config = { home.packages = [ #scripts @@ -64,8 +55,7 @@ '') ]; - }) - ]; + }; }; } diff --git a/modules/users/nathan/home-manager/features/ssh.nix b/modules/users/nathan/home-manager/features/ssh.nix index 74bf70b..7aa09e4 100644 --- a/modules/users/nathan/home-manager/features/ssh.nix +++ b/modules/users/nathan/home-manager/features/ssh.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { ... }: { + flake.homeModules.nathan-ssh = { ... }: { programs.ssh = { diff --git a/modules/users/nathan/home-manager/features/tmux.nix b/modules/users/nathan/home-manager/features/tmux.nix index 6e3521a..1f1828b 100644 --- a/modules/users/nathan/home-manager/features/tmux.nix +++ b/modules/users/nathan/home-manager/features/tmux.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { config, lib, pkgs, ... }: { + flake.homeModules.nathan-tmux = { config, lib, pkgs, ... }: { programs.tmux = { diff --git a/modules/users/nathan/home-manager/features/yazi.nix b/modules/users/nathan/home-manager/features/yazi.nix index e31d3d9..39e9bc2 100644 --- a/modules/users/nathan/home-manager/features/yazi.nix +++ b/modules/users/nathan/home-manager/features/yazi.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { ... }: { + flake.homeModules.nathan-yazi = { ... }: { config = { programs.yazi = { enable = true; diff --git a/modules/users/nathan/home-manager/features/zoxide.nix b/modules/users/nathan/home-manager/features/zoxide.nix index 2e2db6e..5169443 100644 --- a/modules/users/nathan/home-manager/features/zoxide.nix +++ b/modules/users/nathan/home-manager/features/zoxide.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { ... }: { + flake.homeModules.nathan-zoxide = { ... }: { programs.zoxide = { diff --git a/modules/users/nathan/home-manager/features/zsh.nix b/modules/users/nathan/home-manager/features/zsh.nix index a13e2a2..321d2f2 100644 --- a/modules/users/nathan/home-manager/features/zsh.nix +++ b/modules/users/nathan/home-manager/features/zsh.nix @@ -1,6 +1,6 @@ { ... }: { - flake.homeModules.nathan = { lib, ... }: { + flake.homeModules.nathan-zsh = { lib, ... }: { programs.zsh = { diff --git a/modules/users/nathan/nathan.nix b/modules/users/nathan/nathan.nix index 9463186..002cb7d 100644 --- a/modules/users/nathan/nathan.nix +++ b/modules/users/nathan/nathan.nix @@ -1,13 +1,13 @@ { self, inputs, ... }: { - flake.nixosModules.user-nathan = host: { config, lib, pkgs, ... }: { + flake.nixosModules.user-nathan = { config, lib, pkgs, ... }: { config = { sops.secrets."nathan/pass".neededForUsers = true; users.users.nathan = { - shell = lib.mkDefault pkgs.zsh; + shell = pkgs.zsh; name = lib.mkDefault "nathan"; isNormalUser = lib.mkDefault true; #hashedPasswordFile = lib.mkIf (cfg.hashedPasswordFile != null) cfg.hashedPasswordFile; @@ -20,11 +20,18 @@ packages = lib.mkIf (false) [ pkgs.home-manager ]; }; - wayland.windowManager.hyprland.extraConfig = if host == "laptop" then '' - monitor=eDP-1,1920x1080@60,0x0,1 - bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi' - bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi - '' else ''''; + + home-manager.users.nathan = lib.mkMerge [ + self.homeModules.nathan + + (lib.mkIf (config.networking.hostName == "laptop") { + wayland.windowManager.hyprland.extraConfig = '' + monitor=eDP-1,1920x1080@60,0x0,1 + bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi' + bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi + ''; + }) + ]; }; }; @@ -33,14 +40,7 @@ { config = { - homeconfig = { - graphical = lib.mkDefault false; - minimal = lib.mkDefault false; - - hyprland.enable = lib.mkDefault false; - }; - - + nix = { nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; settings = {