nixpkgs, home-manager: return nixpkgs config to flake.nix

This commit is contained in:
Katherina Walshe-Grey 2024-09-06 02:37:34 +01:00
parent 39d73b4ed7
commit 48a5083a02
4 changed files with 20 additions and 31 deletions

View file

@ -5,7 +5,6 @@
./environment.nix ./environment.nix
./home-manager.nix ./home-manager.nix
./nginx.nix ./nginx.nix
./nixpkgs.nix
./openssh.nix ./openssh.nix
./security.nix ./security.nix
]; ];

View file

@ -1,18 +1,13 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
home-manager = { home-manager.users = {
useUserPackages = true; qenya = { config, lib, pkgs, osConfig, ... }: {
useGlobalPkgs = true; home.homeDirectory = osConfig.users.users.qenya.home;
users = { imports = [
qenya = { config, lib, pkgs, osConfig, ... }: { ../home/qenya
home.homeDirectory = osConfig.users.users.qenya.home; ];
imports = [
../home/qenya
];
};
}; };
}; };
} }

View file

@ -1,14 +0,0 @@
{ config, lib, pkgs, inputs, ... }:
{
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
agenix = inputs.agenix.packages.${config.nixpkgs.hostPlatform.system}.default;
};
};
overlays = [ inputs.nur.overlay ];
};
}

View file

@ -27,15 +27,24 @@
nodeNixpkgs = { nodeNixpkgs = {
kalessin = import nixpkgs { system = "aarch64-linux"; }; # TODO: this should be generated from the host config somehow kalessin = import nixpkgs { system = "aarch64-linux"; }; # TODO: this should be generated from the host config somehow
}; };
specialArgs = {
inherit inputs;
};
}; };
defaults = { name, nodes, ... }: { defaults = { name, nodes, config, ... }: {
networking.hostName = name; networking.hostName = name;
nix.settings.experimental-features = "nix-command flakes"; nix.settings.experimental-features = "nix-command flakes";
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = pkgs: {
agenix = inputs.agenix.packages.${config.nixpkgs.hostPlatform.system}.default;
};
nixpkgs.overlays = [ inputs.nur.overlay ];
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
};
imports = [ imports = [
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
@ -47,7 +56,7 @@
]; ];
}; };
kilgharrah.imports = [ ./hosts/kilgharrah ] ; kilgharrah.imports = [ ./hosts/kilgharrah ];
tohru.imports = [ ./hosts/tohru ]; tohru.imports = [ ./hosts/tohru ];
yevaud = { name, nodes, ... }: { yevaud = { name, nodes, ... }: {