From 7ba8b47d7d54f3aba58f84859bac174c322e3039 Mon Sep 17 00:00:00 2001 From: System administrator Date: Tue, 10 Feb 2026 15:12:53 +0100 Subject: [PATCH] setup nix for skrot --- flake.nix | 6 +++- hosts/skrot/configuration.nix | 1 + hosts/skrot/disk-config.nix | 41 ++++++++++++++++++++++++++ hosts/skrot/hardware-configuration.nix | 15 ---------- 4 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 hosts/skrot/disk-config.nix diff --git a/flake.nix b/flake.nix index 2be210f..995dcf6 100644 --- a/flake.nix +++ b/flake.nix @@ -184,7 +184,11 @@ }; ildkule = stableNixosConfig "ildkule" { }; #ildkule-unstable = unstableNixosConfig "ildkule" { }; - skrot = stableNixosConfig "skrot" { }; + skrot = stableNixosConfig "skrot" { + modules = [ + inputs.disko.nixosModules.disko + ]; + }; shark = stableNixosConfig "shark" { }; wenche = stableNixosConfig "wenche" { }; temmie = stableNixosConfig "temmie" { }; diff --git a/hosts/skrot/configuration.nix b/hosts/skrot/configuration.nix index 5a976c3..61c1221 100644 --- a/hosts/skrot/configuration.nix +++ b/hosts/skrot/configuration.nix @@ -9,6 +9,7 @@ imports = [ # Include the results of the hardware scan. ./hardware-configuration.nix + ./disk-config.nix (fp /base) ]; diff --git a/hosts/skrot/disk-config.nix b/hosts/skrot/disk-config.nix new file mode 100644 index 0000000..723f158 --- /dev/null +++ b/hosts/skrot/disk-config.nix @@ -0,0 +1,41 @@ +{ + disko.devices = { + disk = { + main = { + device = "/dev/sda"; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "1G"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + plainSwap = { + size = "8G"; + content = { + type = "swap"; + discardPolicy = "both"; + resumeDevice = false; + }; + }; + root = { + size = "100%"; + content = { + type = "filesystem"; + format = "ext4"; + mountpoint = "/"; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/skrot/hardware-configuration.nix b/hosts/skrot/hardware-configuration.nix index a33c6a1..cafc847 100644 --- a/hosts/skrot/hardware-configuration.nix +++ b/hosts/skrot/hardware-configuration.nix @@ -1,6 +1,3 @@ -# 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, ... }: { @@ -13,18 +10,6 @@ boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/0dfcdb69-80ce-429f-8504-200754b240e6"; - fsType = "ext4"; - }; - - fileSystems."/etc" = - { device = "overlay"; - fsType = "overlay"; - }; - - swapDevices = [ ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; }