xsettingsd: enable service for dynamic GTK theme switching
[julm/julm-nix.git] / hosts / aubergine / hardware.nix
index 97e3c07a0f6acaca97511c1dd28c88766cf7b2c9..62da31c3c9405fb04d4088b27bcc9a7205becf7b 100644 (file)
@@ -1,81 +1,96 @@
-{ config, lib, pkgs, hostName, ... }:
+{ pkgs, lib, hostName, ... }:
 {
-imports = [
-  ../../nixos/profiles/hardware/apu6b4.nix
-  ../../nixos/profiles/hardware/ME909u-521.nix
-  ../../nixos/profiles/zfs.nix
-  ../../nixos/profiles/zramSwap.nix
-];
-
-/*
-boot.loader.efi = {
-  canTouchEfiVariables = true;
-  efiSysMountPoint = "/boot/efi";
-};
-*/
-boot.loader.grub = {
-  enable  = true;
-  version = 2;
-  devices = [
-    #"/dev/disk/by-id/mmc-SU08G_0xb0320f0f"
-    "/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
+  imports = [
+    ../../nixos/profiles/hardware/apu6b4.nix
+    ../../nixos/profiles/hardware/ME909u-521.nix
+    ../../nixos/profiles/serial.nix
+    ../../nixos/profiles/zfs.nix
+    ../../nixos/profiles/zramSwap.nix
+    ../../nixos/profiles/pipewire.nix
   ];
-  configurationLimit = 9;
 
-  #zfsSupport = true;
-  #efiSupport = true;
-  #enableCryptodisk = true;
-};
+  # 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;
 
-fileSystems."/" =
-  { device = "/dev/disk/by-partlabel/${hostName}_sd_root";
-    fsType = "ext4";
-  };
-fileSystems."/boot/efi" =
-  { device = "/dev/disk/by-partlabel/${hostName}_sd_efi";
-    fsType = "vfat";
-  };
-/*
-swapDevices = [
-  { device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
-    randomEncryption = {
-      enable = true;
-      cipher = "aes-xts-plain64";
-      source = "/dev/urandom";
+  # The 32-bit host id of the host, formatted as 8 hexadecimal characters.
+  # You should try to make this id unique among your hosts.
+  # Manually generated with : uuidgen | head -c8
+  networking.hostId = "408a404a";
+
+  /*
+    boot.loader.efi = {
+    canTouchEfiVariables = true;
+    efiSysMountPoint = "/boot/efi";
     };
-  }
-];
-*/
+  */
+  boot.loader.grub = {
+    enable = true;
+    devices = [
+      #"/dev/disk/by-id/mmc-SU08G_0xb0320f0f"
+      #"/dev/disk/by-id/usb-Generic-_Multi-Card_20071114173400000-0:0"
+      "/dev/disk/by-id/ata-YMTC_JGS_2201060101833"
+    ];
+    configurationLimit = 9;
 
-# The 32-bit host id of the host, formatted as 8 hexadecimal characters.
-# You should try to make this id unique among your hosts.
-# Manually generated with : head -c4 /dev/urandom | od -A none -t x4 | cut -d ' ' -f 2
-networking.hostId = "408a404a";
+    #zfsSupport = true;
+    #efiSupport = true;
+    #enableCryptodisk = true;
+  };
 
-boot.supportedFilesystems = [ /*"ntfs"*/ "vfat" ];
-boot.extraModulePackages = [
-  #config.boot.kernelPackages.exfat-nofuse
-];
+  boot.supportedFilesystems = [ /*"ntfs"*/ "vfat" ];
+  boot.extraModulePackages = [
+    #config.boot.kernelPackages.exfat-nofuse
+  ];
+  boot.zfs.requestEncryptionCredentials = [ hostName ];
 
-powerManagement.powertop.enable = true;
-#services.fprintd.enable = true;
+  hardware.enableRedistributableFirmware = true;
 
-/*
-fileSystems."/" =
-  { device = "${hostName}/root";
-    fsType = "zfs";
-  };
-fileSystems."/nix" =
-  { device = "${hostName}/nix";
-    fsType = "zfs";
-  };
-fileSystems."/var" =
-  { device = "${hostName}/var";
-    fsType = "zfs";
-  };
-*/
+  powerManagement.powertop.enable = true;
+
+  #services.fprintd.enable = true;
 
-hardware.pulseaudio.enable = lib.mkDefault true;
-#hardware.pulseaudio.tcp.enable = lib.mkDefault true;
+  fileSystems."/" =
+    {
+      device = "${hostName}/root";
+      fsType = "zfs";
+    };
+  fileSystems."/boot" =
+    {
+      device = "/dev/disk/by-partlabel/${hostName}_ssd_boot";
+      fsType = "ext4";
+    };
+  fileSystems."/boot/efi" =
+    {
+      device = "/dev/disk/by-partlabel/${hostName}_ssd_efi";
+      fsType = "vfat";
+    };
+  fileSystems."/nix" =
+    {
+      device = "${hostName}/nix";
+      fsType = "zfs";
+    };
+  fileSystems."/var" =
+    {
+      device = "${hostName}/var";
+      fsType = "zfs";
+    };
+  fileSystems."/home" =
+    {
+      device = "${hostName}/home";
+      fsType = "zfs";
+    };
+  swapDevices =
+    [
+      {
+        device = "/dev/disk/by-partlabel/${hostName}_ssd_swap";
+        randomEncryption = {
+          enable = true;
+          cipher = "aes-xts-plain64";
+          source = "/dev/urandom";
+        };
+      }
+    ];
 
 }