aboutsummaryrefslogtreecommitdiff
path: root/snowfall/systems/x86_64-linux/c-pc
diff options
context:
space:
mode:
Diffstat (limited to 'snowfall/systems/x86_64-linux/c-pc')
-rw-r--r--snowfall/systems/x86_64-linux/c-pc/default.nix62
-rw-r--r--snowfall/systems/x86_64-linux/c-pc/hardware.nix58
-rw-r--r--snowfall/systems/x86_64-linux/c-pc/network.nix25
3 files changed, 0 insertions, 145 deletions
diff --git a/snowfall/systems/x86_64-linux/c-pc/default.nix b/snowfall/systems/x86_64-linux/c-pc/default.nix
deleted file mode 100644
index 33bec71..0000000
--- a/snowfall/systems/x86_64-linux/c-pc/default.nix
+++ /dev/null
@@ -1,62 +0,0 @@
-{ lib, pkgs, namespace, ... }:
-
-with lib; with lib.${namespace}; {
- imports = [
- ./hardware.nix
- ./network.nix
- ];
-
- cxl = {
- system = {
- hostname = "c-pc";
- id = "23ce94ff";
-
- impermanence.enable = true;
- impermanence.home.enable = true;
-
- fonts.nerdfonts = true;
- fonts.extra = with pkgs; [
- minecraftia
- ];
- };
-
- suites = {
- common.enable = true;
- desktop.enable = true;
- gaming.enable = true;
- };
-
- apps.i3 = {
- videoDrivers = [ "amdgpu" ];
- #TODO: migrate to services.autorandr
- setupCommands = ''
- if ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1080; then
- ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x0
- ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1080 --rate 60 --pos 1920x0 --primary
- ${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-A-0 --mode 1920x1080 --rate 75 --pos 4480x0
- elif ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1440; then
- ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x360
- ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1440 --rate 165 --pos 1920x0 --primary
- ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 --mode 1920x1200 --rate 60 --pos 4480x0
- fi
- '';
- };
- };
-
- services = {
- printing.enable = true;
- hardware.openrgb.enable = true;
- udev.enable = true;
- };
-
- snowfallorg.users."c" = {
- admin = true;
- };
-
- users.users = {
- root.hashedPasswordFile = "/secrets/passwords/root";
- "c".hashedPasswordFile = "/secrets/passwords/c";
- };
-
- system.stateVersion = "23.11";
-}
diff --git a/snowfall/systems/x86_64-linux/c-pc/hardware.nix b/snowfall/systems/x86_64-linux/c-pc/hardware.nix
deleted file mode 100644
index 8f7f8cd..0000000
--- a/snowfall/systems/x86_64-linux/c-pc/hardware.nix
+++ /dev/null
@@ -1,58 +0,0 @@
-{ config, lib, pkgs, modulesPath, ... }:
-
-{
- boot = {
- loader.grub = {
- enable = true;
-
- useOSProber = true;
-
- zfsSupport = true;
- efiSupport = true;
- efiInstallAsRemovable = true;
-
- mirroredBoots = [
- { devices = [ "nodev" ]; path = "/boot"; }
- ];
- };
-
- initrd = {
- availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
- kernelModules = [ "amdgpu" ];
-
- #TODO: re-enable impermanence
- # postDeviceCommands = lib.mkAfter ''
- # zfs rollback -r zpool/root@blank && zfs rollback -r zpool/home@blank
- # '';
-
- postMountCommands = lib.mkAfter ''
- chmod u=rw,g=,o= /secrets
- '';
- };
-
- kernelModules = [ "kvm-amd" ];
- extraModulePackages = [ ];
-
- supportedFilesystems = [ "ntfs" ];
- };
-
- fileSystems = {
- "/" = { fsType = "zfs"; neededForBoot = true; device = "zpool/root"; };
- "/nix" = { fsType = "zfs"; neededForBoot = true; device = "zpool/nix"; };
- "/home" = { fsType = "zfs"; neededForBoot = true; device = "zpool/home"; };
- "/persist" = { fsType = "zfs"; neededForBoot = true; device = "zpool/persist"; };
- "/persist/secure" = { fsType = "zfs"; neededForBoot = true; device = "zpool/secure/persist"; };
- "/secrets" = { fsType = "zfs"; neededForBoot = true; device = "zpool/secure/secrets"; };
-
- "/boot" = { fsType = "vfat"; device = "/dev/disk/by-uuid/12CE-A600"; };
-
- "/mnt/4tb" = { fsType = "ext4"; device = "/dev/disk/by-label/4tb"; };
- };
-
- swapDevices = [ ];
-
- hardware.enableRedistributableFirmware = true;
- hardware.cpu.amd.updateMicrocode = true;
-
- nixpkgs.hostPlatform = "x86_64-linux";
-}
diff --git a/snowfall/systems/x86_64-linux/c-pc/network.nix b/snowfall/systems/x86_64-linux/c-pc/network.nix
deleted file mode 100644
index aa7e075..0000000
--- a/snowfall/systems/x86_64-linux/c-pc/network.nix
+++ /dev/null
@@ -1,25 +0,0 @@
-{ ... }:
-
-{
- networking = {
- useDHCP = true;
-
- wireless = {
- enable = true;
-
- # Import /etc/wpa_supplicant.conf networks
- allowAuxiliaryImperativeNetworks = true;
- };
-
- firewall = {
- enable = false;
-
- allowedTCPPorts = [ 8096 50000 ];
- allowedUDPPorts = [ ];
- };
- };
-
- environment.etc."wpa_supplicant.conf" = {
- source = "/secrets/wireless.conf";
- };
-}