This commit is contained in:
2026-03-24 17:00:49 +01:00
commit da32fc7529
8 changed files with 772 additions and 0 deletions

66
hosts/kronos/default.nix Normal file
View File

@@ -0,0 +1,66 @@
{
config,
pkgs,
...
}:
let
userName = "love";
fullName = "Love";
hostName = "Kronos";
homeDir = "/home/${userName}";
installDisk = "/dev/disk/by-id/REPLACE_ME";
in
{
_module.args = {
inherit
fullName
homeDir
hostName
installDisk
userName
;
};
imports = [
./hardware-configuration.nix
./disko.nix
../../modules/base.nix
../../modules/zfs-root.nix
../../modules/desktop-hyprland.nix
];
networking.hostName = hostName;
networking.hostId = "ff0b8826";
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
users.mutableUsers = true;
users.users.${userName} = {
isNormalUser = true;
description = fullName;
extraGroups = [
"audio"
"input"
"render"
"video"
"wheel"
];
shell = pkgs.zsh;
};
zramSwap = {
enable = true;
memoryPercent = 75;
algorithm = "zstd";
};
system.stateVersion = "25.11";
}

118
hosts/kronos/disko.nix Normal file
View File

@@ -0,0 +1,118 @@
{ installDisk, ... }:
{
disko.devices = {
disk.main = {
type = "disk";
device = installDisk;
content = {
type = "gpt";
partitions = {
ESP = {
label = "EFI";
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
luks = {
label = "cryptroot";
size = "100%";
content = {
type = "luks";
name = "cryptroot";
settings = {
allowDiscards = true;
};
content = {
type = "zfs";
pool = "rpool";
};
};
};
};
};
};
zpool.rpool = {
type = "zpool";
options = {
ashift = "12";
autotrim = "on";
};
rootFsOptions = {
acltype = "posixacl";
atime = "off";
compression = "zstd";
dnodesize = "auto";
mountpoint = "none";
normalization = "formD";
xattr = "sa";
};
datasets = {
root = {
type = "zfs_fs";
options.mountpoint = "none";
};
"root/nixos" = {
type = "zfs_fs";
mountpoint = "/";
options = {
canmount = "noauto";
mountpoint = "legacy";
};
postCreateHook = "zfs snapshot rpool/root/nixos@blank";
};
home = {
type = "zfs_fs";
mountpoint = "/home";
options.mountpoint = "legacy";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
options.mountpoint = "legacy";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
options.mountpoint = "legacy";
};
var = {
type = "zfs_fs";
options.mountpoint = "none";
};
"var/log" = {
type = "zfs_fs";
mountpoint = "/var/log";
options.mountpoint = "legacy";
};
"var/lib" = {
type = "zfs_fs";
mountpoint = "/var/lib";
options.mountpoint = "legacy";
};
reserved = {
type = "zfs_volume";
size = "8G";
};
};
};
};
}

View File

@@ -0,0 +1,3 @@
{ ... }:
{
}