From d4c499fce1c2b4c9a50c0989ddd976e771557250 Mon Sep 17 00:00:00 2001 From: marty Date: Tue, 16 Dec 2025 17:55:19 +0100 Subject: [PATCH 1/2] dam hardware configuration is hard --- hardware-configuration.nix | 57 ++++++++++++-------------------- system/import_system.nix | 1 + system/shell.nix | 9 +++-- system/terminal.nix | 9 +++++ {modules/user => user}/marty.nix | 0 5 files changed, 38 insertions(+), 38 deletions(-) create mode 100644 system/terminal.nix rename {modules/user => user}/marty.nix (100%) diff --git a/hardware-configuration.nix b/hardware-configuration.nix index ce6b7e3..99591c4 100644 --- a/hardware-configuration.nix +++ b/hardware-configuration.nix @@ -1,56 +1,41 @@ # 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, - ... -}: +{ config, lib, pkgs, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ - "nvme" - "xhci_pci" - "ahci" - "usbhid" - "usb_storage" - "sd_mod" - ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; + boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = { - device = "/dev/disk/by-uuid/a26cdc8b-abc9-47cf-ad33-c81e56e56d22"; - fsType = "ext4"; - }; + fileSystems."/" = + { device = "/dev/disk/by-uuid/757b8bfc-0b5d-4ec1-9ab7-7876848ae411"; + fsType = "ext4"; + }; - fileSystems."/boot" = { - device = "/dev/disk/by-uuid/C9B2-7254"; - fsType = "vfat"; - options = [ - "fmask=0077" - "dmask=0077" + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C8A8-A568"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a1838708-fb00-4ecb-8010-432d06182591"; } ]; - }; - - swapDevices = [ - { device = "/dev/disk/by-uuid/24ecde92-b41b-4e41-8ebc-950d321db477"; } - ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction # with explicit per-interface declarations with `networking.interfaces..useDHCP`. networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp42s0.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/system/import_system.nix b/system/import_system.nix index d16dbf1..9e4ccb8 100644 --- a/system/import_system.nix +++ b/system/import_system.nix @@ -9,5 +9,6 @@ imports = [ ./boot.nix ./shell.nix + ./terminal.nix ]; } diff --git a/system/shell.nix b/system/shell.nix index b43c24f..d8b02d0 100644 --- a/system/shell.nix +++ b/system/shell.nix @@ -5,6 +5,11 @@ systemPackages = with pkgs; [ fish coreutils - ] - } + ]; + }; + programs = { + fish = { + enable = true; + }; + }; } diff --git a/system/terminal.nix b/system/terminal.nix new file mode 100644 index 0000000..4de526d --- /dev/null +++ b/system/terminal.nix @@ -0,0 +1,9 @@ +{ config, pkgs, ... }: + +{ + environment = { + systemPackages = with pkgs; [ + kitty + ]; + }; +} diff --git a/modules/user/marty.nix b/user/marty.nix similarity index 100% rename from modules/user/marty.nix rename to user/marty.nix From bfbc64b611592f6507679e7b9fc3ea2be0bd92a5 Mon Sep 17 00:00:00 2001 From: marty Date: Tue, 16 Dec 2025 21:18:31 +0000 Subject: [PATCH 2/2] oh wow it's actually functional now and so fast vroom vrooom --- hardware-configuration.nix | 41 -------------------------------- marty-latitude.nix | 38 +++++++++++++++++++++++++++++ modules/development/vscodium.nix | 6 ++--- system/import_system.nix | 1 + system/networking.nix | 31 ++++++++++++++++++++++++ system/terminal.nix | 1 + 6 files changed, 74 insertions(+), 44 deletions(-) delete mode 100644 hardware-configuration.nix create mode 100644 system/networking.nix diff --git a/hardware-configuration.nix b/hardware-configuration.nix deleted file mode 100644 index 99591c4..0000000 --- a/hardware-configuration.nix +++ /dev/null @@ -1,41 +0,0 @@ -# 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" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/757b8bfc-0b5d-4ec1-9ab7-7876848ae411"; - fsType = "ext4"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/C8A8-A568"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/a1838708-fb00-4ecb-8010-432d06182591"; } - ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} diff --git a/marty-latitude.nix b/marty-latitude.nix index 5b39f64..d8ebe4c 100644 --- a/marty-latitude.nix +++ b/marty-latitude.nix @@ -2,6 +2,7 @@ config, lib, pkgs, + modulesPath, ... }: @@ -9,4 +10,41 @@ networking = { hostName = "marty-latitude"; }; + + # PREVIOUSLY HARDWARE-CONFIGURATION.NIX + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/757b8bfc-0b5d-4ec1-9ab7-7876848ae411"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/C8A8-A568"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/a1838708-fb00-4ecb-8010-432d06182591"; } + ]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + } diff --git a/modules/development/vscodium.nix b/modules/development/vscodium.nix index e239e80..9095356 100644 --- a/modules/development/vscodium.nix +++ b/modules/development/vscodium.nix @@ -6,7 +6,7 @@ }: let - enable_vscode = + enable_vscodium = if config.networking.hostName == "marty-pc" then true else if config.networking.hostName == "marty-latitude" then @@ -19,9 +19,9 @@ in { programs.vscode = { - enable = enable_vscode; + enable = enable_vscodium; package = pkgs.vscodium; - defaultEditor = enable_vscode; + defaultEditor = enable_vscodium; extensions = with pkgs.vscode-extensions; [ catppuccin.catppuccin-vsc catppuccin.catppuccin-vsc-icons diff --git a/system/import_system.nix b/system/import_system.nix index 9e4ccb8..3eee286 100644 --- a/system/import_system.nix +++ b/system/import_system.nix @@ -10,5 +10,6 @@ ./boot.nix ./shell.nix ./terminal.nix + ./networking.nix ]; } diff --git a/system/networking.nix b/system/networking.nix new file mode 100644 index 0000000..de9f756 --- /dev/null +++ b/system/networking.nix @@ -0,0 +1,31 @@ +{ config, pkgs, ... }: + +{ + networking = { + networkmanager.enable = true; + firewall = { + enable = true; + allowedUDPPorts = [ config.services.tailscale.port ]; + trustedInterfaces = [ "tailscale0" ]; + }; + }; + hardware = { + bluetooth = { + enable = true; + powerOnBoot = true; + settings = { + General = { + Experimental = true; + }; + }; + }; + }; +} + + + + + + + + diff --git a/system/terminal.nix b/system/terminal.nix index 4de526d..938d0cc 100644 --- a/system/terminal.nix +++ b/system/terminal.nix @@ -4,6 +4,7 @@ environment = { systemPackages = with pkgs; [ kitty + rofi ]; }; }