diff options
| author | andromeda <andromeda@lenovo> | 2026-01-09 23:23:07 +0100 |
|---|---|---|
| committer | andromeda <andromeda@lenovo> | 2026-01-09 23:23:07 +0100 |
| commit | 0658c5d898d6267e23d28f60d2c32edcf85d5c06 (patch) | |
| tree | deb20f9303cacb066e4f5590442b0be08c59f226 /machines | |
| parent | 8b79f4e825718448780383d0e535d132d7b80561 (diff) | |
modularise lenovo?
Diffstat (limited to 'machines')
| -rw-r--r-- | machines/lenovo.nix (renamed from machines/lenovo/configuration.nix) | 70 | ||||
| -rw-r--r-- | machines/lenovo/impermanence.nix | 19 |
2 files changed, 14 insertions, 75 deletions
diff --git a/machines/lenovo/configuration.nix b/machines/lenovo.nix index 152d136..15f0ab3 100644 --- a/machines/lenovo/configuration.nix +++ b/machines/lenovo.nix @@ -1,66 +1,17 @@ { config, lib, + pkgs, modulesPath, - machine, ... }: { - imports = [ - ./impermanence.nix - (modulesPath + "/installer/scan/not-detected.nix") - ]; - boot.loader = { - efi.canTouchEfiVariables = true; - systemd-boot.enable = true; - }; - hardware.bluetooth = { - enable = true; - powerOnBoot = true; - }; - i18n.defaultLocale = "de_DE.UTF-8"; - networking = { - dhcpcd.enable = true; - firewall.enable = true; - hostName = machine.hostname; - networkmanager.enable = true; - }; - nix.settings.experimental-features = [ - "nix-command" - "flakes" - ]; - nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-unwrapped" - "steam-run" - ]; - programs = { - noshell.enable = true; - steam.enable = true; - sway.enable = true; - }; - services = { - blueman.enable = true; - displayManager = { - enable = true; - ly.enable = true; - }; - libinput.enable = true; - openssh.enable = true; - printing.enable = true; - }; - system.stateVersion = "26.05"; - time.timeZone = "Europe/Berlin"; + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; boot.initrd.availableKernelModules = ["xhci_pci" "nvme" "sdhci_pci"]; boot.initrd.kernelModules = []; boot.kernelModules = ["kvm-intel"]; boot.extraModulePackages = []; fileSystems."/" = { - #device = "none"; - #fsType = "tmpfs"; - #options = ["defaults" "size=60%" "mode=755"]; device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7"; fsType = "btrfs"; options = ["subvol=root"]; @@ -88,12 +39,12 @@ done btrfs subvolume create /btrfs_tmp/root - mkdir /btrfs_tmp/root/nix + mkdir /btrfs_tmp/root/persist mkdir /btrfs_tmp/root/etc - mount ${config.fileSystems."/nix".device} /btrfs_tmp/root/nix - cp /btrfs_tmp/root/nix/persist/etc/ssh /btrfs_tmp/root/etc/ssh -r - umount /btrfs_tmp/root/nix - rm -r /btrfs_tmp/root/nix + mount ${config.fileSystems."/persist".device} /btrfs_tmp/root/persist + cp /btrfs_tmp/root/persist/etc/ssh /btrfs_tmp/root/etc/ssh -r + umount /btrfs_tmp/root/persist + rm -r /btrfs_tmp/root/persist umount /btrfs_tmp ''; @@ -102,6 +53,12 @@ fsType = "btrfs"; }; + fileSystems."/persist" = { + device = "/dev/disk/by-uuid/5455cfb4-0efd-4f55-b496-d2cab3f419b7"; + fsType = "btrfs"; + options = ["subvol=persist"]; + }; + fileSystems."/boot" = { device = "/dev/disk/by-uuid/F425-55BA"; fsType = "vfat"; @@ -112,4 +69,5 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + system.stateVersion = "26.05"; } diff --git a/machines/lenovo/impermanence.nix b/machines/lenovo/impermanence.nix deleted file mode 100644 index 2867ed5..0000000 --- a/machines/lenovo/impermanence.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ - environment.persistence."/nix/persist" = { - enable = true; - hideMounts = true; - directories = [ - "/var/log" - "/var/lib/bluetooth" - "/var/lib/nixos" - "/var/lib/systemd/coredump" - "/etc/NetworkManager/system-connections" - "/etc/ssh" - "/etc/ly/custom-sessions" - ]; - files = [ - "/etc/machine-id" - "/etc/ly/save.txt" - ]; - }; -} |
