nixpkgs: init config as separate file
This commit is contained in:
parent
4ed696e5b1
commit
4c07feb21a
3 changed files with 19 additions and 14 deletions
|
@ -5,6 +5,7 @@
|
||||||
./environment.nix
|
./environment.nix
|
||||||
./home-manager.nix
|
./home-manager.nix
|
||||||
./nginx.nix
|
./nginx.nix
|
||||||
|
./nixpkgs.nix
|
||||||
./openssh.nix
|
./openssh.nix
|
||||||
./security.nix
|
./security.nix
|
||||||
./zsh.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 = {
|
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, config, lib, pkgs, ... }: {
|
defaults = { name, nodes, ... }: {
|
||||||
networking.hostName = name;
|
networking.hostName = name;
|
||||||
|
|
||||||
nix.settings.experimental-features = "nix-command flakes";
|
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 = [
|
imports = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue