shell: fix nixos-enter
[sourcephile-nix.git] / hosts / mermet / system.nix
index 0c96533ae5736a5f775157efec7a9bc088625c17..bd4e330256c085311a7f8cb424fc3cef8001643c 100644 (file)
@@ -1,33 +1,29 @@
-{ pkgs, lib, config, inputs, hostName, ... }:
-let inherit (config) networking; in
+{ pkgs, lib, config, ... }:
 {
-# This value determines the NixOS release with which your system is to be
-# compatible, in order to avoid breaking some software such as database servers.
-# You should change this only after NixOS release notes say you should.
-system.stateVersion = "19.09"; # Did you read the comment?
+  # This value determines the NixOS release with which your system is to be
+  # compatible, in order to avoid breaking some software such as database servers.
+  # You should change this only after NixOS release notes say you should.
+  system.stateVersion = "19.09"; # Did you read the comment?
 
-services.unbound.enable = true;
+  services.unbound.enable = true;
 
-nix.gc.dates = "daily";
-nix.gc.options = "--delete-older-than 2d";
-nix.binaryCaches = [ "http://nix-extracache.losurdo.wg" ];
-nix.binaryCachePublicKeys = [ (builtins.readFile (inputs.secrets + "/hosts/losurdo/nix/binary-cache-key/1.pub")) ];
+  nix.gc.dates = "daily";
+  nix.gc.options = "--delete-older-than 2d";
+  nix.registry = lib.mkForce { };
 
-environment.systemPackages = with pkgs; [
-  cryptsetup
-  direnv
-  file
-  fio
-  gdb
-  git
-  gptfdisk
-  #hey
-  home-manager
-  lm_sensors
-  rsync
-  smartctl-tbw
-  socat
-  #thttpd
-  #iptables-nftables-compat
-];
+  # Setting the machine-id avoids to reencrypt all credentials
+  # when reinstalling NixOS on a new drive.
+  # Manually generated with : uuidgen | tr -d -
+  environment.etc.machine-id.source = ./machine-id.clear;
+
+  environment.systemPackages = with pkgs; [
+    cryptsetup
+    fio
+    git
+    gptfdisk
+    #hey
+    lm_sensors
+    rsync
+    socat
+  ];
 }