diff --git a/hosts/nixos/default.nix b/hosts/nixos/default.nix index e7d22eb..2bb07bc 100644 --- a/hosts/nixos/default.nix +++ b/hosts/nixos/default.nix @@ -135,46 +135,17 @@ ]; }; - mini = lib.nixosSystem { - pkgs = import nixpkgs { - system = "x86_64-linux"; - config.allowUnfree = true; - overlays = [ - (import ../../overlay/overlay.nix) - ]; - }; + mini = lib.nixosSystem rec { + system = "x86_64-linux"; specialArgs = { - inherit user username darkmode; + inherit inputs user darkmode username system nixpkgs; }; modules = [ - ../../modules/options.nix ./config-common.nix - ./networking.nix ./mini/configuration.nix - { - environment.systemPackages = [ - helix-flake.packages."x86_64-linux".default - ]; - } attic.nixosModules.atticd sops-nix.nixosModules.sops home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = {inherit user username darkmode;}; - home-manager.users."${user}" = { - home.stateVersion = "23.11"; - imports = [ - ../../modules/options.nix - ../../modules/shell/starship.nix - ../../modules/shell/git.nix - ../../modules/common.nix - ../../modules/rust.nix - ../../modules/k8s.nix - ]; - }; - } ]; }; diff --git a/hosts/nixos/mini/configuration.nix b/hosts/nixos/mini/configuration.nix index 0f8b92f..72ac1bb 100644 --- a/hosts/nixos/mini/configuration.nix +++ b/hosts/nixos/mini/configuration.nix @@ -3,10 +3,19 @@ # and in the NixOS manual (accessible by running ‘nixos-help’). { config, - pkgs, user, + nixpkgs, + system, ... -}: { +}: let + pkgs = import nixpkgs { + config.allowUnfree = true; + system = "${system}"; + overlays = [ + (import ../../../overlay/overlay.nix) + ]; + }; +in { imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix @@ -20,6 +29,20 @@ ./logging.nix ]; + home-manager = { + extraSpecialArgs = {inherit pkgs;}; + users."${user}" = { + imports = [ + ../../../modules/options.nix + ../../../modules/shell/starship.nix + ../../../modules/shell/git.nix + ../../../modules/common.nix + ../../../modules/rust.nix + ../../../modules/k8s.nix + ]; + }; + }; + # nixpkgs.overlays = [ # (final: prev: { # yazi = prev.yazi.overrideAttrs (oldAttrs: {