nixpkgs: init config as separate file
This commit is contained in:
parent
4ed696e5b1
commit
4c07feb21a
|
@ -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
14
common/nixpkgs.nix
Normal 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 ];
|
||||
};
|
||||
}
|
18
flake.nix
18
flake.nix
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue