summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-02-12 00:41:07 +0100
committeradikro <adikro@disroot.org>2026-02-12 00:41:07 +0100
commit1ff6f0eb48961e6482ec1b7d0dd9b606e85ddc79 (patch)
tree62099e5c57c7ffe92777f800ec45ee5d68a16ecf /hosts
parent233e5fb7d43a0736857ee6b9f74967f03b73837c (diff)
disko and bootloader changes
Diffstat (limited to 'hosts')
-rw-r--r--hosts/desktop/configuration.nix12
-rw-r--r--hosts/desktop/disko.nix44
-rw-r--r--hosts/laptop/configuration.nix9
-rw-r--r--hosts/thinkpad/configuration.nix16
-rw-r--r--hosts/thinkpad/disko.nix150
5 files changed, 182 insertions, 49 deletions
diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix
index f825848..50fb2c9 100644
--- a/hosts/desktop/configuration.nix
+++ b/hosts/desktop/configuration.nix
@@ -9,11 +9,14 @@
imports = [
inputs.disko.nixosModules.disko
-
+ # ./disko.nix
./hardware-configuration.nix
+
../../os/default.nix
];
+ # hardware.facter.reportPath = /etc/nixos/hosts/desktop/facter.json;
+
os = {
core = {
allowUnfree.enable = true;
@@ -23,7 +26,11 @@
enable = true;
disable-devices.enable = true;
};
- bootloader.type = "systemd-boot";
+ bootloader = {
+ type = "systemd-boot";
+ timeout = 0;
+ # luks.enable = true;
+ };
drivers = {
enable = true;
cpu = "amd";
@@ -85,7 +92,6 @@
};
boot = {
- kernelParams = [ "video=DP-1:2560x1440@240" ];
kernelModules = [ "nct6687" ];
extraModulePackages = [
config.boot.kernelPackages.nct6687d
diff --git a/hosts/desktop/disko.nix b/hosts/desktop/disko.nix
index 78eb6a0..cda1979 100644
--- a/hosts/desktop/disko.nix
+++ b/hosts/desktop/disko.nix
@@ -31,76 +31,65 @@
mountpoint = "/";
mountOptions = [
"compress=zstd:1"
- "noatime"
+ "space_cache=v2"
"discard=async"
+ "noatime"
];
};
"nix" = {
mountpoint = "/nix";
mountOptions = [
"compress=zstd:1"
- "noatime"
- "discard=async"
+ "nodev"
];
};
"home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd:1"
- "noatime"
"nosuid"
"nodev"
- "discard=async"
];
};
"log" = {
mountpoint = "/var/log";
mountOptions = [
"compress=zstd:1"
- "noatime"
"nosuid"
"nodev"
- "discard=async"
];
};
"games" = {
mountpoint = "/games";
mountOptions = [
- "compress=zstd:1"
- "noatime"
+ "compress=none"
"nosuid"
"nodev"
- "discard=async"
];
};
"llms" = {
mountpoint = "/llms";
mountOptions = [
- "nodatacow"
"compress=none"
- "noatime"
+ "nodatacow"
"nosuid"
"nodev"
- "discard=async"
];
};
"vms" = {
mountpoint = "/vms";
mountOptions = [
- "nodatacow"
"compress=none"
- "noatime"
+ "nodatacow"
"nosuid"
"nodev"
- "discard=async"
];
};
"swap" = {
mountpoint = "/.swapvol";
mountOptions = [
+ "compress=none"
"nodatacow"
- "noatime"
- "discard=async"
];
};
};
@@ -131,54 +120,53 @@
mountOptions = [
"compress=zstd:1"
"autodefrag"
- "noatime"
- "nofail"
"nosuid"
"nodev"
+ "nofail"
"x-systemd.device-timeout=5s"
];
};
"movies" = {
mountpoint = "/storage/movies";
mountOptions = [
+ "compress=none"
"autodefrag"
- "noatime"
- "nofail"
"nosuid"
"nodev"
+ "nofail"
"x-systemd.device-timeout=5s"
];
};
"anime" = {
mountpoint = "/storage/anime";
mountOptions = [
+ "compress=none"
"autodefrag"
- "noatime"
- "nofail"
"nosuid"
"nodev"
+ "nofail"
"x-systemd.device-timeout=5s"
];
};
"pictures" = {
mountpoint = "/storage/pics";
mountOptions = [
+ "compress=none"
"autodefrag"
- "noatime"
- "nofail"
"nosuid"
"nodev"
+ "nofail"
"x-systemd.device-timeout=5s"
];
};
"videos" = {
mountpoint = "/storage/vids";
mountOptions = [
+ "compress=none"
"autodefrag"
- "noatime"
- "nofail"
"nosuid"
"nodev"
+ "nofail"
"x-systemd.device-timeout=5s"
];
};
diff --git a/hosts/laptop/configuration.nix b/hosts/laptop/configuration.nix
index 304302d..a6c6b56 100644
--- a/hosts/laptop/configuration.nix
+++ b/hosts/laptop/configuration.nix
@@ -1,4 +1,5 @@
-{username, ...}: {
+{ username, ... }:
+{
system.stateVersion = "25.05";
imports = [
@@ -13,8 +14,10 @@
audio.enable = true;
bootloader = {
type = "grub";
- useOSProber = true;
- grubDevice = "nodev";
+ grub = {
+ useOSProber = true;
+ defaultEntry = 2;
+ };
};
drivers = {
enable = true;
diff --git a/hosts/thinkpad/configuration.nix b/hosts/thinkpad/configuration.nix
index a38d74b..d58858a 100644
--- a/hosts/thinkpad/configuration.nix
+++ b/hosts/thinkpad/configuration.nix
@@ -2,17 +2,20 @@
inputs,
username,
...
-}: {
+}:
+{
system.stateVersion = "25.05";
imports = [
+ inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480s
inputs.disko.nixosModules.disko
./disko.nix
- ./hardware-configuration.nix
../../os/default.nix
];
+ hardware.facter.reportPath = /etc/nixos/hosts/thinkpad/facter.json;
+
os = {
core = {
allowUnfree.enable = true;
@@ -20,15 +23,15 @@
audio.enable = true;
bootloader = {
type = "grub";
- enableEncryption = true;
- grubDevice = "/dev/nvme0n1";
- luksDevice = "/dev/nvme0n1p2";
+ efi = false;
+ timeout = 0;
+ luks.enable = true;
};
drivers = {
enable = true;
cpu = "intel";
graphics.enable = true;
- kernel = "hardened";
+ kernel = "stable";
};
fonts.enable = true;
greet.enable = true;
@@ -73,5 +76,4 @@
};
};
services.thinkfan.enable = true;
- boot.kernelModules = ["thinkpad_acpi"];
}
diff --git a/hosts/thinkpad/disko.nix b/hosts/thinkpad/disko.nix
index 97e5c87..31427d3 100644
--- a/hosts/thinkpad/disko.nix
+++ b/hosts/thinkpad/disko.nix
@@ -7,38 +7,56 @@
content = {
type = "gpt";
partitions = {
- biosboot = {
+ bootloader = {
size = "1M";
type = "EF02";
};
+ boot = {
+ size = "2G";
+ content = {
+ type = "filesystem";
+ format = "vfat";
+ mountpoint = "/boot";
+ mountOptions = [ "umask=0077" ];
+ };
+ };
luks = {
size = "100%";
content = {
type = "luks";
- name = "crypted";
+ name = "crypted_main";
settings.allowDiscards = true;
content = {
type = "btrfs";
- extraArgs = ["-f"];
+ extraArgs = [ "-f" ];
subvolumes = {
"root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
"noatime"
];
};
- "home" = {
- mountpoint = "/home";
+ "nix" = {
+ mountpoint = "/nix";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nodev"
"noatime"
];
};
- "nix" = {
- mountpoint = "/nix";
+ "home" = {
+ mountpoint = "/home";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
"noatime"
];
};
@@ -46,21 +64,43 @@
mountpoint = "/var/log";
mountOptions = [
"compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+ ];
+ };
+ "games" = {
+ mountpoint = "/games";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
"noatime"
];
};
"vms" = {
mountpoint = "/vms";
mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
"nodatacow"
+ "nosuid"
+ "nodev"
"noatime"
];
};
"swap" = {
mountpoint = "/.swapvol";
mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
"nodatacow"
- "compress=no"
"noatime"
];
};
@@ -71,6 +111,100 @@
};
};
};
+ storage = {
+ type = "disk";
+ device = "/dev/sda";
+ content = {
+ type = "gpt";
+ partitions = {
+ luks = {
+ size = "100%";
+ content = {
+ type = "luks";
+ name = "crypted_storage";
+ keyFile = "/tmp/storage.key";
+ settings.allowDiscards = true;
+ content = {
+ type = "btrfs";
+ extraArgs = [ "-f" ];
+ subvolumes = {
+ "archive" = {
+ mountpoint = "/storage/archive";
+ mountOptions = [
+ "compress=zstd:1"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "movies" = {
+ mountpoint = "/storage/movies";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "anime" = {
+ mountpoint = "/storage/anime";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "pictures" = {
+ mountpoint = "/storage/pics";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ "videos" = {
+ mountpoint = "/storage/vids";
+ mountOptions = [
+ "compress=none"
+ "space_cache=v2"
+ "discard=async"
+ "nosuid"
+ "nodev"
+ "noatime"
+
+ "nofail"
+ "x-systemd.device-timeout=5s"
+ ];
+ };
+ };
+ };
+ };
+ };
+ };
+ };
+ };
};
};
}