diff --git a/flake.nix b/flake.nix index a0d68b5..f5cefbb 100644 --- a/flake.nix +++ b/flake.nix @@ -90,14 +90,5 @@ inherit user; darwin = true; }; - # darwinConfigurations = { - # "Natalies-MacBook-Air" = darwin.lib.darwinSystem { - # system = "aarch64-darwin"; - # specialArgs = inputs; - # modules = [ - # ./hosts/laptop/configuration.nix - # ]; - # }; - # }; }; } diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix index cae7007..16f9db5 100644 --- a/hosts/desktop/configuration.nix +++ b/hosts/desktop/configuration.nix @@ -9,7 +9,6 @@ # Include the results of the hardware scan. ./hardware-configuration.nix - ../../modules/shared/nix.nix ../../modules/nixos/nvidia.nix ../../modules/nixos/boot.nix ]; diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix index 4030f77..24f59ec 100644 --- a/hosts/desktop/home.nix +++ b/hosts/desktop/home.nix @@ -7,7 +7,7 @@ nix-options-search, ... }: let - shared-programs = import ../shared/home-programs.nix {inherit config pkgs lib;}; + shared-programs = import ../shared/home-programs.nix {inherit inputs config pkgs lib;}; in { home = { username = "nmarks"; diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix index 918d5f1..c3153c9 100644 --- a/hosts/laptop/configuration.nix +++ b/hosts/laptop/configuration.nix @@ -1,13 +1,11 @@ { + inputs, config, pkgs, lib, ... }: { imports = [ - ../../modules/shared/nix.nix - ../../modules/shared/extras.nix - ./modules/icons.nix ]; diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 274f722..9a4950b 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -1,12 +1,14 @@ { + inputs, config, pkgs, lib, ... }: { - programs = import ../shared/home-programs.nix {inherit config pkgs lib;}; + programs = import ../shared/home-programs.nix {inherit inputs config pkgs lib;}; home = { + homeDirectory = "/Users/nmarks/"; # Home Manager needs a bit of information about you and the paths it should # manage. # This value determines the Home Manager release that your configuration is diff --git a/hosts/shared/home-programs.nix b/hosts/shared/home-programs.nix index 5b913c6..a03fb3e 100644 --- a/hosts/shared/home-programs.nix +++ b/hosts/shared/home-programs.nix @@ -1,9 +1,11 @@ { + inputs, config, pkgs, lib, ... }: { + nix-index.enable = true; atuin = { enable = true; enableBashIntegration = true; @@ -56,8 +58,6 @@ }; color_align = { mode = "horizontal"; - # custom_colors = []; - # fore_back = null; }; distro = "nixos"; pride_month_shown = [ diff --git a/lib/mkSystem.nix b/lib/mkSystem.nix index 5d1003d..0bb91cf 100644 --- a/lib/mkSystem.nix +++ b/lib/mkSystem.nix @@ -28,6 +28,7 @@ # The config files for this system. hostConfig = ../hosts/${host}/configuration.nix; + homeConfig = ../hosts/${host}/home.nix; # NixOS vs nix-darwin functions systemFunc = @@ -35,7 +36,7 @@ then inputs.darwin.lib.darwinSystem else nixpkgs.lib.nixosSystem; - home-manager = + hmModules = if darwin then inputs.home-manager.darwinModules else inputs.home-manager.nixosModules; @@ -58,13 +59,15 @@ in hostConfig nixindex - home-manager.home-manager + {programs.nix-index-database.comma.enable = true;} + hmModules.home-manager { home-manager = { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "hm-backup"; extraSpecialArgs = {inherit inputs;}; + users.${user} = homeConfig; }; } diff --git a/modules/shared/extras.nix b/modules/shared/extras.nix index 27c546f..942054d 100644 --- a/modules/shared/extras.nix +++ b/modules/shared/extras.nix @@ -6,6 +6,4 @@ }: { networking = { }; - - inputs.programs.nix-index-database.comma.enable = true; } diff --git a/modules/shared/nix.nix b/modules/shared/nix.nix index 5e8bbf7..292a9aa 100644 --- a/modules/shared/nix.nix +++ b/modules/shared/nix.nix @@ -13,8 +13,11 @@ warn-dirty = false ''; + optimise = { + automatic = true; + }; + settings = { - auto-optimise-store = true; experimental-features = ["nix-command" "flakes"]; substituters = [ "https://cache.nixos.org/?priority=10" @@ -31,8 +34,6 @@ }; gc = { automatic = true; - persistent = true; - dates = "weekly"; options = "--delete-older-than 7d"; }; };