From f94b2594e52f1de1d54a3b5046a5eb856ec0ca68 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:05:21 +0200 Subject: [PATCH 1/8] flake: update --- flake.lock | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/flake.lock b/flake.lock index 57453ad..365d59c 100644 --- a/flake.lock +++ b/flake.lock @@ -235,11 +235,11 @@ ] }, "locked": { - "lastModified": 1761061028, - "narHash": "sha256-SK12k/LxFrfdCfGqZcDgX1dLk863EYDYGQ3F2AHV9U0=", + "lastModified": 1761395627, + "narHash": "sha256-9wQpgBRW2PzYw1wx+MgCt1IbPAYz93csApLMgSZOJCk=", "owner": "nix-community", "repo": "home-manager", - "rev": "aa559a682b4ab29e2bea410248dbc60a591299b0", + "rev": "7296022150cd775917e4c831c393026eae7c2427", "type": "github" }, "original": { @@ -342,11 +342,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1760959370, - "narHash": "sha256-eM1kSyA88KiZiY+xqnN/YbAAFeECtzJTrOF62Uuxs+o=", + "lastModified": 1761389866, + "narHash": "sha256-g651rIXUD0YAH8yHBsJh1yTrcOg+vDWVRj82A4d67LA=", "ref": "refs/heads/main", - "rev": "46dab01bcc47b2e29f36cd4d35d04091e4134a67", - "revCount": 6515, + "rev": "b10b9660004b3dfaf9e11a305d78f24955b089a4", + "revCount": 6527, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -901,11 +901,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1760878510, - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", + "lastModified": 1761114652, + "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", + "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", "type": "github" }, "original": { @@ -949,11 +949,11 @@ }, "nixpkgs_9": { "locked": { - "lastModified": 1760878510, - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", + "lastModified": 1761114652, + "narHash": "sha256-f/QCJM/YhrV/lavyCVz8iU3rlZun6d+dAiC3H+CDle4=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", + "rev": "01f116e4df6a15f4ccdffb1bcd41096869fb385c", "type": "github" }, "original": { @@ -1009,11 +1009,11 @@ "nixpkgs": "nixpkgs_9" }, "locked": { - "lastModified": 1761061704, - "narHash": "sha256-ZplX25oYp75wY6YESKpkFXZhw8iEAbiSjTUkR+HT9xY=", + "lastModified": 1761396527, + "narHash": "sha256-86jWYn1TEJ9q0zNXlp2DXDObhkwSO9zYYxLieWyoAJA=", "owner": "nix-community", "repo": "NUR", - "rev": "fbb7a461ccab20bac90408ffaa331c119d32fd7a", + "rev": "6906bd47fb1936409260a576f16513bec30f1e11", "type": "github" }, "original": { From 305334d8abbede0e89ab6acd347035a54c35b3f9 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:05:28 +0200 Subject: [PATCH 2/8] feat: adds `imilia` --- flake.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/flake.nix b/flake.nix index 793edef..53d9727 100644 --- a/flake.nix +++ b/flake.nix @@ -159,6 +159,16 @@ inherit self inputs username; }; }; + imilia = nixpkgs.lib.nixosSystem { + inherit system; + modules = [ + (import ./hosts/imilia) + ]; + specialArgs = { + host = "imilia"; + inherit self inputs username; + }; + }; }; }; } From dd42548b1b3bf6eee6f9438b8cc77c4cb80dd0b0 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:07:55 +0200 Subject: [PATCH 3/8] feat: adds new host configuration (`imilia`) --- hosts/imilia/default.nix | 77 +++++++++++++++++++++++++ hosts/imilia/hardware-configuration.nix | 41 +++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 hosts/imilia/default.nix create mode 100644 hosts/imilia/hardware-configuration.nix diff --git a/hosts/imilia/default.nix b/hosts/imilia/default.nix new file mode 100644 index 0000000..9cd047f --- /dev/null +++ b/hosts/imilia/default.nix @@ -0,0 +1,77 @@ +{ + inputs, + pkgs, + config, + lib, + ... +}: +{ + imports = [ + ./hardware-configuration.nix + ./../../modules/core + ./../../modules/core/virtualization.nix + ./../../modules/services/tailscale.nix + ./../../modules/services/mpd.nix + ./../../modules/services/smart-monitoring.nix + ]; + + # install some system-utilities; set hosts to be editable by the user. + environment = { + systemPackages = with pkgs; [ + fwupd + fw-ectool + ]; + etc.hosts.mode = "0700"; + }; + + liv = { + laptop.enable = true; + desktop.enable = false; + creative.enable = true; + amdgpu.enable = false; + nvidia.enable = true; + gui.enable = true; + }; + + services = { + vnstat.enable = true; + hardware.bolt.enable = true; + }; + + # Disable light sensors and accelerometers as they are not used and consume extra battery + hardware.sensor.iio.enable = lib.mkForce false; + + networking = { + hostName = "imilia"; + # networkmanager.ethernet.macAddress = "13:37:6a:8a:ed:a4"; + }; + + powerManagement = { + enable = true; + # powertop.enable = true; + cpuFreqGovernor = lib.mkDefault "performance"; + }; + + services.logind.lidSwitchDocked = "ignore"; + services.logind.lidSwitch = "ignore"; + boot = { + kernelModules = [ "acpi_call" ]; + kernelPackages = pkgs.linuxPackages_latest; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + # systemd-boot.configurationLimit = 10; + }; + extraModulePackages = + with config.boot.kernelPackages; + [ + acpi_call + cpupower + v4l2loopback + ] + ++ [ pkgs.cpupower-gui ]; + extraModprobeConfig = '' + options v4l2loopback devices=1 video_nr=1 card_label="OBS Cam" exclusive_caps=1 + ''; + }; +} diff --git a/hosts/imilia/hardware-configuration.nix b/hosts/imilia/hardware-configuration.nix new file mode 100644 index 0000000..93412bf --- /dev/null +++ b/hosts/imilia/hardware-configuration.nix @@ -0,0 +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, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/5ce2c98c-7212-42dc-b76b-ad83477b0f83"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-39d908a0-7163-4099-a9c9-846272fef7eb".device = "/dev/disk/by-uuid/39d908a0-7163-4099-a9c9-846272fef7eb"; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/44F2-2D87"; + 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.enp0s31f6.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} From 8f5852928d15a5111285b963e0de882b66ed19b4 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:08:06 +0200 Subject: [PATCH 4/8] feat: import ssh key for `imilia` --- modules/core/sshd.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/core/sshd.nix b/modules/core/sshd.nix index 6434f5b..1401c15 100644 --- a/modules/core/sshd.nix +++ b/modules/core/sshd.nix @@ -19,6 +19,7 @@ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEDltZ7vfyrLrl32TIWCC3iUx40TrCtIz6Ssi/SZvikg liv@zinnia" # zinnia "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKQtG69zrMFsoHForwZEi66y1tPvctqg1OgjQFrF3OI+ liv@iris" # iris "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINKI2KQn97mykFLIaMUWMftA1txJec9qW56hAMj5/MhE liv@dandelion" # dandelion + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILwDS8tXjGjUtk3eQAaPf0S0f9JgwEGPlNYQ7OvACX1Z liv@imilia" # imilia "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mHVQp99G0osUAtnVoq5TARR8x5wjCkdbe7ChnzLRa liv@azalea" # linux phone "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ2nsQHyWnrmuQway0ehoMUcYYfhD8Ph/vpD0Tzip1b1 liv@meow" # xz1c From b1ae60c39caa3aeed847cabdb0e98fe4f277cdf0 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:08:48 +0200 Subject: [PATCH 5/8] feat: enable virtualization for `imilia` --- modules/core/virtualization.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/core/virtualization.nix b/modules/core/virtualization.nix index 601680b..4dfa496 100644 --- a/modules/core/virtualization.nix +++ b/modules/core/virtualization.nix @@ -20,6 +20,8 @@ true else if (host == "iris") then true + else if (host == "imilia") then + true else false; spiceUSBRedirection.enable = From 7cd1da05280dd5167e236442354f12acfbe6b84c Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:09:57 +0200 Subject: [PATCH 6/8] fix: set correct display configuration for `imilia` --- modules/home/hyprland/config.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/home/hyprland/config.nix b/modules/home/hyprland/config.nix index 3f6a141..09d768b 100644 --- a/modules/home/hyprland/config.nix +++ b/modules/home/hyprland/config.nix @@ -69,6 +69,8 @@ "eDP-1, 2256x1504@60, 0x0, 1.0" else if (host == "zinnia") then "eDP-1, 1920x1080@60, 0x0, 1.0" + else if (host == "imilia") then + "eDP-1, 1920x1080@60, 0x0, 1.0" else ", preferred, auto, 1"; From 10f6123334c854ddce9d9f2ef5355a6100da4c13 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:10:18 +0200 Subject: [PATCH 7/8] feat: make `nvidia` drivers work better --- roles/nvidia.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/roles/nvidia.nix b/roles/nvidia.nix index 75ee3f6..ac2bfea 100644 --- a/roles/nvidia.nix +++ b/roles/nvidia.nix @@ -14,9 +14,17 @@ in }; config = mkIf cfg.enable { + services.xserver.videoDrivers = [ "nvidia" ]; hardware = { + nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; enableRedistributableFirmware = true; - nvidia.open = false; # Set to false/true for proprietary/open drivers graphics = { enable = true; extraPackages = with pkgs; [ @@ -31,6 +39,10 @@ in environment.systemPackages = with pkgs; [ # amdvlk + #nvidia-x11 + #nvidia-settings + #nvidia-persistenced + nvtopPackages.nvidia ]; }; } From 8715aa8de167fd9d46b851f61eca59fa421b3023 Mon Sep 17 00:00:00 2001 From: Ahwx Date: Sun, 26 Oct 2025 01:40:01 +0200 Subject: [PATCH 8/8] fix: enable `virt-manager` based on libvirtd "enablement" --- modules/core/virtualization.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/core/virtualization.nix b/modules/core/virtualization.nix index 4dfa496..15aa708 100644 --- a/modules/core/virtualization.nix +++ b/modules/core/virtualization.nix @@ -29,7 +29,7 @@ }; programs.virt-manager.enable = - if (config.virtualisation.waydroid.enable == true) then true else false; + if (config.virtualisation.libvirtd.enable == true) then true else false; #dconf.settings."org/virt-manager/virt-manager/connections" = # if (config.programs.virt-manager.enable == true) then # {