Extract configuration to own module
This commit is contained in:
parent
9ce6478c7b
commit
fbb85bc1da
3 changed files with 31 additions and 29 deletions
|
|
@ -7,17 +7,12 @@ let
|
||||||
extIface = "ens3";
|
extIface = "ens3";
|
||||||
ledgerVHost = "ledger.failco.de";
|
ledgerVHost = "ledger.failco.de";
|
||||||
in {
|
in {
|
||||||
imports = [ # Include the results of the hardware scan.
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../modules/upgrade-pg-cluster.nix
|
../../modules/upgrade-pg-cluster.nix
|
||||||
|
../../modules/nix-config.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.package = pkgs.nixUnstable;
|
|
||||||
nix.extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes repl-flake ca-derivations
|
|
||||||
'';
|
|
||||||
# nix.registry.nixpkgs.flake = nixpkgs;
|
|
||||||
|
|
||||||
# Binary Cache for Haskell.nix
|
# Binary Cache for Haskell.nix
|
||||||
nix.settings.trusted-public-keys =
|
nix.settings.trusted-public-keys =
|
||||||
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
|
[ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{config, pkgs, inputs, ...}:
|
{ config, pkgs, inputs, ... }: {
|
||||||
{
|
imports = [ ./nix-config.nix ];
|
||||||
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
time.timeZone = "Europe/Berlin";
|
time.timeZone = "Europe/Berlin";
|
||||||
|
|
||||||
|
|
@ -21,25 +22,9 @@
|
||||||
networking.firewall.enable = true;
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
gc = {
|
registry = {
|
||||||
automatic = true;
|
nixpkgs.flake = inputs.nixpkgs;
|
||||||
dates = "weekly";
|
nixpkgs-unstable.flake = inputs.nixpkgs-unstable;
|
||||||
options = "--delete-older-than 30d";
|
};
|
||||||
};
|
|
||||||
|
|
||||||
registry = {
|
|
||||||
nixpkgs.flake = inputs.nixpkgs;
|
|
||||||
nixpkgs-unstable.flake = inputs.nixpkgs-unstable;
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
auto-optimise-store = true;
|
|
||||||
experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
warn-dirty = false;
|
|
||||||
|
|
||||||
# avoid unwanted garbage collection when using direnv
|
|
||||||
keep-outputs = true;
|
|
||||||
keep-derivations = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
modules/nix-config.nix
Normal file
22
modules/nix-config.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
package = pkgs.nixUnstable;
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 30d";
|
||||||
|
};
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
experimental-features = [ "nix-command" "flakes" "repl-flake" ];
|
||||||
|
warn-dirty = false;
|
||||||
|
|
||||||
|
# avoid unwanted garbage collection when using direnv
|
||||||
|
keep-outputs = true;
|
||||||
|
keep-derivations = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue