From e4e6e32b7142967139f6300cedf0ffc31310e1d7 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 5 Oct 2024 13:47:51 +0300 Subject: [PATCH 1/5] Switch to nxos unstable --- flake.lock | 16 ++++++++-------- flake.nix | 4 ++-- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index cbc5482d..c8cd8a0c 100644 --- a/flake.lock +++ b/flake.lock @@ -23,32 +23,32 @@ ] }, "locked": { - "lastModified": 1726592409, - "narHash": "sha256-2Y6CDvD/BD43WLS77PHu6dUHbdUfFhuzkY8oJAecD/U=", + "lastModified": 1728041527, + "narHash": "sha256-03liqiJtk9UP7YQHW4r8MduKCK242FQzud8iWvvlK+o=", "owner": "nix-community", "repo": "home-manager", - "rev": "2ab00f89dd3ecf8012f5090e6d7ca1a7ea30f594", + "rev": "509dbf8d45606b618e9ec3bbe4e936b7c5bc6c1e", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-24.05", + "ref": "master", "repo": "home-manager", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1726447378, - "narHash": "sha256-2yV8nmYE1p9lfmLHhOCbYwQC/W8WYfGQABoGzJOb1JQ=", + "lastModified": 1728018373, + "narHash": "sha256-NOiTvBbRLIOe5F6RbHaAh6++BNjsb149fGZd1T4+KBg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "086b448a5d54fd117f4dc2dee55c9f0ff461bdc1", + "rev": "bc947f541ae55e999ffdb4013441347d83b00feb", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-24.05", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 368e0d7c..135a0d43 100644 --- a/flake.nix +++ b/flake.nix @@ -2,11 +2,11 @@ description = "FunctionalHacker's NixOS config"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nur.url = "github:nix-community/NUR"; home-manager = { - url = "github:nix-community/home-manager/release-24.05"; + url = "github:nix-community/home-manager/master"; inputs.nixpkgs.follows = "nixpkgs"; }; From ef48ffc9be54941174e0bdd46d5994c7e41343d5 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 5 Oct 2024 13:48:15 +0300 Subject: [PATCH 2/5] Remove unneeded options from Mirkwood, add amdgpu to initrd --- hosts/Mirkwood/configuration.nix | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/hosts/Mirkwood/configuration.nix b/hosts/Mirkwood/configuration.nix index 5b38c22c..1bdd71de 100644 --- a/hosts/Mirkwood/configuration.nix +++ b/hosts/Mirkwood/configuration.nix @@ -7,11 +7,5 @@ ]; networking.hostName = "Mirkwood"; - - boot = { - initrd = { - luks.devices."luks-cf2ca44e-d8d1-4ec8-a072-921f29ed693d".device = "/dev/disk/by-uuid/cf2ca44e-d8d1-4ec8-a072-921f29ed693d"; - kernelModules = [ "amdgpu" ]; - }; - }; + boot.initrd.kernelModules = [ "amdgpu" ]; } From a5ff3f78e02241cb1b7070e3b48ec42e67aee69b Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 5 Oct 2024 13:48:48 +0300 Subject: [PATCH 3/5] Fixes to shire config --- hosts/Shire/configuration.nix | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/hosts/Shire/configuration.nix b/hosts/Shire/configuration.nix index baed44e5..b7c63027 100644 --- a/hosts/Shire/configuration.nix +++ b/hosts/Shire/configuration.nix @@ -1,4 +1,4 @@ -{ config, ... }: +{ ... }: { imports = [ @@ -9,13 +9,13 @@ networking.hostName = "Shire"; boot = { - kernelParams = config.boot.kernelParams ++ [ + kernelParams = [ "intel_idle.max_cstate=1" ]; - initrd.unl0kr.enable = true; - - # Does not work with unl0kr now - # https://github.com/NixOS/nixpkgs/issues/291935 - plymouth.enable = false; + initrd = { + # Couldn't get unl0kr working yet + # unl0kr.enable = true; + # availableKernelModules = [ "hid-multitouch" "i2c-hid" "i2c-hid-acpi" "hid_generic" ]; + }; }; } From 4df746cae0eaff12c8a1f5984ff3e6cf3bc27444 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 5 Oct 2024 13:49:06 +0300 Subject: [PATCH 4/5] Add shire hardware-configuration --- hosts/Shire/hardware-configuration.nix | 50 ++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 hosts/Shire/hardware-configuration.nix diff --git a/hosts/Shire/hardware-configuration.nix b/hosts/Shire/hardware-configuration.nix new file mode 100644 index 00000000..fb2a3f70 --- /dev/null +++ b/hosts/Shire/hardware-configuration.nix @@ -0,0 +1,50 @@ +{ config, lib, modulesPath, ... }: + +{ + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ + "xhci_pci" + "usb_storage" + "usbhid" + "sd_mod" + "sdhci_acpi" + "hid-multitouch" + "i2c-hid" + "i2c-hid-acpi" + "hid_generic" + ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/973c6741-8cca-4a19-a837-93d192e8c868"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-8b12931e-b40d-4ad7-8cc1-ca25fcceb05b".device = "/dev/disk/by-uuid/8b12931e-b40d-4ad7-8cc1-ca25fcceb05b"; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/B63A-4E10"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # 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.wlp1s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} From 380b99dfca6fecd6a90c8859b922fe77b34e77a6 Mon Sep 17 00:00:00 2001 From: Marko Korhonen Date: Sat, 5 Oct 2024 13:49:15 +0300 Subject: [PATCH 5/5] ZSH: Disble grc --- users/functionalhacker/programs/zsh.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/users/functionalhacker/programs/zsh.nix b/users/functionalhacker/programs/zsh.nix index da8caea5..5027d2a5 100644 --- a/users/functionalhacker/programs/zsh.nix +++ b/users/functionalhacker/programs/zsh.nix @@ -62,7 +62,7 @@ # Remove grc alias from forgit since it # collides with the grc colorizer - unalias grc; + #unalias grc; # Launch or attach zellij to existing session if logging in over ssh if [[ -z "$ZELLIJ" && -n "$SSH_CONNECTION" ]]; then