nixpkgs: init config as separate file

This commit is contained in:
Katherina Walshe-Grey 2024-08-29 19:27:30 +01:00
parent 4ed696e5b1
commit 4c07feb21a
3 changed files with 19 additions and 14 deletions

View file

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

14
common/nixpkgs.nix Normal file
View file

@ -0,0 +1,14 @@
{ 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,25 +27,15 @@
nodeNixpkgs = {
kalessin = import nixpkgs { system = "aarch64-linux"; }; # TODO: this should be generated from the host config somehow
};
specialArgs = {
inherit inputs;
};
};
defaults = { name, nodes, config, lib, pkgs, ... }: {
defaults = { name, nodes, ... }: {
networking.hostName = name;
nix.settings.experimental-features = "nix-command flakes";
nixpkgs.flake.source = nixpkgs;
nix.nixPath = [ "nixpkgs=flake:nixpkgs" ];
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
agenix = agenix.packages.${config.nixpkgs.hostPlatform.system}.default;
};
};
overlays = [ nur.overlay ];
};
imports = [
home-manager.nixosModules.home-manager