kacper inspirerat

This commit is contained in:
2026-04-07 20:20:26 +02:00
parent b721630485
commit 76b7441884
21 changed files with 135 additions and 91 deletions
+56
View File
@@ -0,0 +1,56 @@
{
inputs,
config,
pkgs,
modules,
...
}:
let
userName = "love";
fullName = "Love";
hostName = "Hermes";
homeDir = "/home/${userName}";
installDisk = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_115386992";
in
{
_module.args = {
inherit
fullName
homeDir
hostName
installDisk
userName
;
};
imports = [
inputs.mailserver.nixosModules.default
./disko.nix
modules.base
modules.zfsRoot
modules.desktopHyprland
modules.mailServer
modules.binBashWrapper
];
my.binBashWrapper.enable = true;
networking.hostName = hostName;
networking.hostId = "8d49a097f2";
users.mutableUsers = true;
users.users.${userName} = {
isNormalUser = true;
description = fullName;
extraGroups = [ "wheel" ];
shell = pkgs.bash;
};
zramSwap = {
enable = true;
memoryPercent = 75;
algorithm = "zstd";
};
system.stateVersion = "25.05";
}
+20
View File
@@ -0,0 +1,20 @@
{
inputs,
mkHost,
...
}:
{
Hermes = mkHost {
nixpkgs = inputs.nixpkgs-stable;
disko = inputs.disko-stable;
lolcat = inputs."lolcat++-stable";
modules = [ ./configuration.nix ];
};
hermes = mkHost {
nixpkgs = inputs.nixpkgs-stable;
disko = inputs.disko-stable;
lolcat = inputs."lolcat++-stable";
modules = [ ./configuration.nix ];
};
}
+118
View File
@@ -0,0 +1,118 @@
{ installDisk, ... }:
{
disko.devices = {
disk.main = {
type = "disk";
device = installDisk;
content = {
type = "gpt";
partitions = {
ESP = {
label = "EFI";
size = "512MiB";
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 = "1G";
};
};
};
};
}