about summary refs log tree commit diff
path: root/hosts
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-02-20 18:48:19 -0800
committerFranck Cuny <franck@fcuny.net>2022-02-21 08:43:34 -0800
commitfdf325c76623bf408d4e1ea8181aa678d3aea0f9 (patch)
tree1ec87e4463a1b5c30bb3ffa1f7006acc566fb73c /hosts
parentdocs: more update (diff)
downloadworld-fdf325c76623bf408d4e1ea8181aa678d3aea0f9.tar.gz
hosts: add aptos
aptos is my laptop (dell xps 13'). This adds the initial configuration
for it.
Diffstat (limited to 'hosts')
-rw-r--r--hosts/aptos/default.nix44
-rw-r--r--hosts/aptos/hardware-configuration.nix47
2 files changed, 91 insertions, 0 deletions
diff --git a/hosts/aptos/default.nix b/hosts/aptos/default.nix
new file mode 100644
index 0000000..7501853
--- /dev/null
+++ b/hosts/aptos/default.nix
@@ -0,0 +1,44 @@
+{ config, pkgs, hostname, ... }:
+
+{
+  imports =
+    [ # Include the results of the hardware scan.
+      ./hardware-configuration.nix
+      ../common/desktop
+    ];
+
+  boot = {
+    initrd = {
+      luks.devices."system".allowDiscards = true;
+    };
+  };
+
+  # Use systemd-networkd for networking
+  systemd.network = {
+    enable = true;
+    networks = {
+      wlp0s20f3 = {
+        matchConfig.Name = "wlp0s20f3";
+        networkConfig = {
+          DHCP = "yes";
+        };
+        extraConfig = ''
+         [DHCPv4]
+         UseDNS=yes
+         UseDomains=yes
+        '';
+      };
+    };
+  };
+
+  networking.wireless.enable = true;
+
+  # This value determines the NixOS release from which the default
+  # settings for stateful data, like file locations and database versions
+  # on your system were taken. It‘s perfectly fine and recommended to leave
+  # this value at the release version of the first install of this system.
+  # Before changing this value read the documentation for this option
+  # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
+  system.stateVersion = "21.11"; # Did you read the comment?
+}
+
diff --git a/hosts/aptos/hardware-configuration.nix b/hosts/aptos/hardware-configuration.nix
new file mode 100644
index 0000000..53abf58
--- /dev/null
+++ b/hosts/aptos/hardware-configuration.nix
@@ -0,0 +1,47 @@
+# Do not modify this file!  It was generated by ‘nixos-generate-config’
+# and may be overwritten by future invocations.  Please make changes
+# to /etc/nixos/configuration.nix instead.
+{ config, lib, pkgs, modulesPath, ... }:
+
+{
+  imports =
+    [ (modulesPath + "/installer/scan/not-detected.nix")
+    ];
+
+  boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+  boot.initrd.kernelModules = [ ];
+  boot.kernelModules = [ "kvm-intel" ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" =
+    { device = "/dev/disk/by-uuid/292e07ac-4199-4a97-94a6-bd2fd2a9cf6a";
+      fsType = "btrfs";
+      options = [ "subvol=nixos" ];
+    };
+
+  boot.initrd.luks.devices."system".device = "/dev/disk/by-uuid/c83a8db7-4215-4864-8a46-b8ca839d8c05";
+
+  fileSystems."/home" =
+    { device = "/dev/disk/by-uuid/292e07ac-4199-4a97-94a6-bd2fd2a9cf6a";
+      fsType = "btrfs";
+      options = [ "subvol=home" ];
+    };
+
+  fileSystems."/.snapshots" =
+    { device = "/dev/disk/by-uuid/292e07ac-4199-4a97-94a6-bd2fd2a9cf6a";
+      fsType = "btrfs";
+      options = [ "subvol=snapshots" ];
+    };
+
+  fileSystems."/boot" =
+    { device = "/dev/disk/by-uuid/42D9-6EA8";
+      fsType = "vfat";
+    };
+
+  swapDevices =
+    [ { device = "/dev/disk/by-uuid/24041034-ff39-44bf-a04c-8fd8318b554d"; }
+    ];
+
+  powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
+  hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}