Unified nixPath

This commit is contained in:
Craige McWhirter 2020-06-23 12:31:05 +10:00
parent 373d80a455
commit 0b85ed20e8
Signed by: sercanto
GPG key ID: 7DBA9F5689EFB6AA
9 changed files with 28 additions and 61 deletions

View file

@ -15,9 +15,5 @@
networking.hostName = "airgead"; # Define your hostname. networking.hostName = "airgead"; # Define your hostname.
nix.nixPath = [
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "20.03"; # The version of NixOS originally installed system.stateVersion = "20.03"; # The version of NixOS originally installed
} }

View file

@ -25,9 +25,5 @@
networking.hostName = "cuallaidh"; # Define your hostname. networking.hostName = "cuallaidh"; # Define your hostname.
nix.nixPath = [
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "19.03"; # The version of NixOS originally installed system.stateVersion = "19.03"; # The version of NixOS originally installed
} }

View file

@ -17,22 +17,6 @@
deployment.targetHost = "10.69.0.158"; deployment.targetHost = "10.69.0.158";
networking.hostName = "iolear-beag"; # Define your hostname. networking.hostName = "iolear-beag"; # Define your hostname.
# Adapted from gchristensen
nix.nixPath = [
# Ruin the config so we don't accidentally run
# nixos-rebuild switch on the host
(let
cfg = pkgs.writeText "configuration.nix"
''
assert builtins.trace "This system is managed by NixOps." false;
{}
'';
in "nixos-config=${cfg}")
# Copy the channel version from the deploy host to the target
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "18.09"; # The version of NixOS originally installed system.stateVersion = "18.09"; # The version of NixOS originally installed
} }

View file

@ -14,9 +14,5 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];
nix.nixPath = [
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "19.09"; # The version of NixOS originally installed system.stateVersion = "19.09"; # The version of NixOS originally installed
} }

View file

@ -14,9 +14,5 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
]; ];
nix.nixPath = [
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "19.09"; # The version of NixOS originally installed system.stateVersion = "19.09"; # The version of NixOS originally installed
} }

View file

@ -17,9 +17,5 @@
nixops # NixOS cloud provisioning and deployment tool nixops # NixOS cloud provisioning and deployment tool
]; ];
nix.nixPath = [
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "19.09"; # The version of NixOS originally installed system.stateVersion = "19.09"; # The version of NixOS originally installed
} }

View file

@ -17,22 +17,6 @@
deployment.targetHost = "10.69.0.121"; deployment.targetHost = "10.69.0.121";
networking.hostName = "sithlainnir"; # Define your hostname. networking.hostName = "sithlainnir"; # Define your hostname.
# Adapted from gchristensen
nix.nixPath = [
# Ruin the config so we don't accidentally run
# nixos-rebuild switch on the host
(let
cfg = pkgs.writeText "configuration.nix"
''
assert builtins.trace "This system is managed by NixOps." false;
{}
'';
in "nixos-config=${cfg}")
# Copy the channel version from the deploy host to the target
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "18.09"; # The version of NixOS originally installed system.stateVersion = "18.09"; # The version of NixOS originally installed
} }

View file

@ -19,10 +19,6 @@
deployment.targetHost = "10.69.0.141"; deployment.targetHost = "10.69.0.141";
networking.hostName = "teintidh"; # Define your hostname. networking.hostName = "teintidh"; # Define your hostname.
nix.nixPath = [
"nixpkgs=https://nixos.org/channels/nixos-20.03/nixexprs.tar.xz"
];
system.stateVersion = "18.09"; # The version of NixOS originally installed system.stateVersion = "18.09"; # The version of NixOS originally installed
} }

View file

@ -37,11 +37,34 @@
powerline-fonts # Required for Powerline prompts powerline-fonts # Required for Powerline prompts
]; ];
# Enable Nix garbage collection: # Adapted from gchristensen and clever
nix.gc.automatic = true; nix = {
nix.gc.dates = "weekly"; nixPath = [
nix.gc.options = "--delete-older-than 90d"; # Ruin the config so we don't accidentally run
nix.autoOptimiseStore = true; # nixos-rebuild switch on the host
(let
cfg = pkgs.writeText "configuration.nix"
''
assert builtins.trace "This system is managed by NixOps." false;
{}
'';
in "nixos-config=${cfg}")
# Copy the channel version from the deploy host to the target
"nixpkgs=/run/current-system/nixpkgs"
];
gc = {
automatic = true; # Enable Nix garbage collection:
dates = "weekly";
options = "--delete-older-than 90d";
};
autoOptimiseStore = true;
};
system.extraSystemBuilderCmds = ''
ln -sv ${pkgs.path} $out/nixpkgs
'';
environment.etc.host-nix-channel.source = pkgs.path;
# Set the system-wide environment # Set the system-wide environment
environment = { environment = {