about summary refs log tree commit diff
path: root/hosts/carmel
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/carmel')
-rw-r--r--hosts/carmel/boot.nix14
-rw-r--r--hosts/carmel/default.nix23
-rw-r--r--hosts/carmel/hardware.nix46
-rw-r--r--hosts/carmel/home.nix14
-rw-r--r--hosts/carmel/networking.nix35
-rw-r--r--hosts/carmel/profile.nix5
-rw-r--r--hosts/carmel/sound.nix1
7 files changed, 138 insertions, 0 deletions
diff --git a/hosts/carmel/boot.nix b/hosts/carmel/boot.nix
new file mode 100644
index 0000000..606215e
--- /dev/null
+++ b/hosts/carmel/boot.nix
@@ -0,0 +1,14 @@
+{ ... }:
+
+{
+  boot = {
+    # get an IP address on boot, so we can unlock the root disk remotely
+    kernelParams = [ "ip=dhcp" ];
+    initrd = {
+      # driver for the NIC, required in order to get an IP address
+      kernelModules = [ "igb" ];
+    };
+  };
+
+  my.system.boot = { initrd = { network.enable = true; }; };
+}
diff --git a/hosts/carmel/default.nix b/hosts/carmel/default.nix
new file mode 100644
index 0000000..87ad97d
--- /dev/null
+++ b/hosts/carmel/default.nix
@@ -0,0 +1,23 @@
+{ config, pkgs, hostname, ... }:
+
+{
+  imports = [
+    ./hardware.nix
+    ./boot.nix
+    ./sound.nix
+    ./networking.nix
+    ./home.nix
+    ./profile.nix
+  ];
+
+  hardware.opengl.driSupport = 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/carmel/hardware.nix b/hosts/carmel/hardware.nix
new file mode 100644
index 0000000..aa86049
--- /dev/null
+++ b/hosts/carmel/hardware.nix
@@ -0,0 +1,46 @@
+# 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 =
+    [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
+  boot.initrd.kernelModules = [ ];
+  boot.extraModulePackages = [ ];
+
+  fileSystems."/" = {
+    device = "/dev/disk/by-uuid/7d4e07d8-1104-4ab8-8ead-8ca28da2d344";
+    fsType = "btrfs";
+    options = [ "subvol=nixos" ];
+  };
+
+  boot.initrd.luks.devices."system".device =
+    "/dev/disk/by-uuid/dd1b3673-ece0-49f8-bf71-8cc4e1a06634";
+
+  fileSystems."/home" = {
+    device = "/dev/disk/by-uuid/7d4e07d8-1104-4ab8-8ead-8ca28da2d344";
+    fsType = "btrfs";
+    options = [ "subvol=home" ];
+  };
+
+  fileSystems."/.snapshots" = {
+    device = "/dev/disk/by-uuid/7d4e07d8-1104-4ab8-8ead-8ca28da2d344";
+    fsType = "btrfs";
+    options = [ "subvol=snapshots" ];
+  };
+
+  fileSystems."/boot" = {
+    device = "/dev/disk/by-uuid/7430-1C58";
+    fsType = "vfat";
+  };
+
+  swapDevices =
+    [{ device = "/dev/disk/by-uuid/ebcb04f3-4227-4ec3-af52-bd775ef38027"; }];
+
+  my.hardware.amd.enable = true;
+  # high-resolution display
+  hardware.video.hidpi.enable = lib.mkDefault true;
+}
diff --git a/hosts/carmel/home.nix b/hosts/carmel/home.nix
new file mode 100644
index 0000000..231aebd
--- /dev/null
+++ b/hosts/carmel/home.nix
@@ -0,0 +1,14 @@
+{ pkgs, ... }:
+
+{
+  my.home = {
+    packages.enable = true;
+    zsh.enable = true;
+    git.enable = true;
+    go.enable = true;
+    python.enable = true;
+    scanner.enable = true;
+    tmux.enable = true;
+    yt-dlp.enable = true;
+  };
+}
diff --git a/hosts/carmel/networking.nix b/hosts/carmel/networking.nix
new file mode 100644
index 0000000..8ad9d3e
--- /dev/null
+++ b/hosts/carmel/networking.nix
@@ -0,0 +1,35 @@
+{ lib, ... }:
+
+{
+  # Use systemd-networkd for networking
+  systemd.network = {
+    enable = true;
+    networks = {
+      enp9s0 = {
+        matchConfig.Name = "enp9s0";
+        networkConfig = { DHCP = "yes"; };
+        extraConfig = ''
+          [DHCPv4]
+          UseDNS=yes
+          UseDomains=yes
+        '';
+      };
+    };
+  };
+
+  services.nscd.enable = false;
+  system.nssModules = lib.mkForce [ ];
+
+  # Use systemd-resolved
+  services.resolved = {
+    enable = true;
+    dnssec = "false";
+  };
+
+  networking = {
+    hostName = "carmel";
+    useNetworkd = true;
+    useDHCP = false;
+    private-wireguard.enable = true;
+  };
+}
diff --git a/hosts/carmel/profile.nix b/hosts/carmel/profile.nix
new file mode 100644
index 0000000..6174a60
--- /dev/null
+++ b/hosts/carmel/profile.nix
@@ -0,0 +1,5 @@
+{ ... }:
+
+{
+  my.profiles.desktop.enable = true;
+}
diff --git a/hosts/carmel/sound.nix b/hosts/carmel/sound.nix
new file mode 100644
index 0000000..947f9cd
--- /dev/null
+++ b/hosts/carmel/sound.nix
@@ -0,0 +1 @@
+{ ... }: { my.hardware.sound = { pipewire = { enable = true; }; }; }