public-inbox: fix to support the current nixpkgs
[sourcephile-nix.git] / hosts / losurdo / system.nix
index 385e72ed1535412b32a8e9288b4325ed33505f88..091e65d3f3b5643972b7312b89aed64a88b96edc 100644 (file)
@@ -1,68 +1,48 @@
-{ pkgs, lib, config, ... }:
-let
-  inherit (config) networking;
-in
+{ pkgs, 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 = "24.11"; # Did you read the comment?
 
-nix.gc.dates = "weekly";
-nix.gc.options = "--delete-older-than 7d";
+  boot.initrd.systemd = {
+    enable = true;
+    emergencyAccess = true; # FIXME: use a password
+  };
 
-/*
-boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
-nix.binaryCaches = [
-  "https://nixcache.reflex-frp.org"
-  "https://arm.cachix.org"
-];
-nix.binaryCachePublicKeys = [
-  "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI="
-  "arm.cachix.org-1:5BZ2kjoL1q6nWhlnrbAl+G7ThY7+HaBRD9PZzqZkbnM="
-];
-*/
+  nix.gc.dates = "weekly";
+  nix.gc.options = "--delete-older-than 7d";
 
-# Avoid the use of systemd-run --user --scope tmux
-# and let mosh work smoothly.
-services.logind.killUserProcesses = false;
+  /*
+    boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
+    nix.binaryCaches = [
+    "https://nixcache.reflex-frp.org"
+    "https://arm.cachix.org"
+    ];
+    nix.binaryCachePublicKeys = [
+    "ryantrinkle.com-1:JJiAKaRv9mWgpVAz8dwewnZe0AzzEAzPkagE9SP5NWI="
+    "arm.cachix.org-1:5BZ2kjoL1q6nWhlnrbAl+G7ThY7+HaBRD9PZzqZkbnM="
+    ];
+  */
 
-hardware.bluetooth.enable = true;
-#services.blueman.enable = true;
+  # Avoid the use of systemd-run --user --scope tmux
+  # and let mosh work smoothly.
+  services.logind.killUserProcesses = false;
 
-documentation.nixos = {
-  enable = false; # NOTE: useless on a server, and CPU intensive.
-};
+  hardware.bluetooth.enable = true;
+  #services.blueman.enable = true;
 
-boot.kernelParams = [
-  # Rotate the consoles anti-clockwise.
-  #"fbcon=rotate:3"
-];
+  documentation.nixos = {
+    enable = false; # NOTE: useless on a server, and CPU intensive.
+  };
 
-# 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; [
-  bluez
-  cryptsetup
-  direnv
-  # f3 # broken
-  file
-  fio
-  gdb
-  git
-  gptfdisk
-  #hey
-  home-manager
-  lm_sensors
-  rsync
-  socat
-  sanoid
-  #iptables-nftables-compat
-  pkgs.gnupg
-  miniupnpc
-  audit
-  python
-];
+  boot.kernelParams = [
+    # Rotate the consoles anti-clockwise.
+    #"fbcon=rotate:3"
+  ];
+
+  # 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;
 }