Compare commits

...
Sign in to create a new pull request.

23 commits
main ... zfs

Author SHA1 Message Date
twoneis
6bf76ba9e6 seperate root dataset again 2024-05-07 00:45:03 +02:00
twoneis
325a45a6ee i feel this is an indicator it's fucked up again 2024-05-07 00:17:13 +02:00
twoneis
ee00ecaffd please just work 2024-05-07 00:15:26 +02:00
twoneis
d80c8b3385 smaller hardware config 2024-05-07 00:11:51 +02:00
twoneis
e68bf69975 closer to example 2024-05-07 00:10:46 +02:00
twoneis
8a7092cc92 no extra dataset for home 2024-05-06 23:40:01 +02:00
twoneis
015cac0865 changed state version for re-install 2024-05-06 23:23:38 +02:00
twoneis
dc28893277 disko install guide do be lying 2024-05-06 23:20:50 +02:00
twoneis
fbf4b21757 readded accidental removal 2024-05-06 23:19:33 +02:00
twoneis
e3b1d2bd03 no special root 2024-05-06 23:18:23 +02:00
twoneis
c29fafa147 can mount pool 2024-05-06 23:11:04 +02:00
twoneis
06c23247bf grub set boot dev 2024-05-06 23:01:08 +02:00
twoneis
f69a0748eb root fs 2024-05-06 22:24:41 +02:00
twoneis
94af0087bf some fixes maybe 2024-05-06 22:20:24 +02:00
twoneis
57be8c1316 no luks maybe 2024-05-06 21:54:36 +02:00
twoneis
63ee05cebe bigger efi maybe 2024-05-06 21:12:20 +02:00
twoneis
99512d6b24 fix 2024-05-06 21:08:11 +02:00
twoneis
c9bfc27379 more indentation stuff 2024-05-06 21:06:39 +02:00
twoneis
0e666decc7 fix indentation 2024-05-06 21:05:39 +02:00
twoneis
bfcbd8c6aa added swap 2024-05-06 21:02:55 +02:00
twoneis
299f7ac111 added fixes from flake check 2024-05-06 19:16:33 +02:00
twoneis
0636e412c0 added disko as module 2024-05-06 19:07:49 +02:00
twoneis
f2e8dccca4 intial disko config 2024-05-06 19:00:39 +02:00
6 changed files with 134 additions and 25 deletions

View file

@ -1,11 +1,13 @@
{ pkgs, ... }: {
imports = [
./hardware-config.nix
./disko.nix
./nvidia.nix
./options.nix
];
networking.hostName = "ellaca";
networking.hostId = "656c6c61";
# Select kernel version
boot.kernelPackages = pkgs.linuxPackages_zen;
@ -15,8 +17,9 @@
grub = {
enable = true;
efiSupport = true;
device = "nodev";
efiInstallAsRemovable = true;
useOSProber = true;
device = "nodev";
font = null;
splashImage = null;
};
@ -40,5 +43,5 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
system.stateVersion = "23.11"; # Did you read the comment?
}

100
devices/ellaca/disko.nix Normal file
View file

@ -0,0 +1,100 @@
{
disko.devices = {
disk = {
ssd0 = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "64M";
type = "EF00";
priority = 0;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
zfs = {
end = "-16G";
content = {
type = "zfs";
pool = "zroot";
};
};
swap = {
size = "100%";
content = {
type = "swap";
resumeDevice = true;
};
};
};
};
};
hdd0 = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
zfs = {
size = "100%";
content = {
type = "zfs";
pool = "zstore";
};
};
};
};
};
};
zpool = {
zroot = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
"com.sun:auto-snapshot" = "false";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
root = {
type = "zfs_fs";
mountpoint = "/";
options."com.sun:auto-snapshot" = "true";
};
nix = {
type = "zfs_fs";
mountpoint = "/nix";
options."com.sun:auto-snapshot" = "true";
};
persist = {
type = "zfs_fs";
mountpoint = "/persist";
options."com.sun:auto-snapshot" = "true";
};
};
};
zstore = {
type = "zpool";
mode = "";
rootFsOptions = {
compression = "zstd";
"com.sun:auto-snapshot" = "false";
};
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
datasets = {
persist = {
type = "zfs_fs";
mountpoint = "/persist/ext";
};
};
};
};
};
}

View file

@ -1,30 +1,9 @@
{ config, lib, modulesPath, ... }: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
{ config, lib, ... }: {
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/95b15244-c97c-42a5-9be1-ed5df6872dcb";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/BF87-B3DE";
fsType = "vfat";
};
fileSystems."/ext" = {
device = "/dev/disk/by-uuid/31608388-1043-47a0-a5da-e92250e821f8";
fsType = "ext4";
};
swapDevices =[ { device = "/dev/disk/by-uuid/b6445ced-1cc2-461f-a81f-6e8409c10f48"; } ];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction

21
flake.lock generated
View file

@ -98,6 +98,26 @@
"type": "github"
}
},
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1714959124,
"narHash": "sha256-oYmauPDpSgWjY9hvzwd815igGfP8Ds5Bk6bTo5JrBRk=",
"owner": "nix-community",
"repo": "disko",
"rev": "e1b3ae2b4ebc3c7b83154b9361e3d154e64e362d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "disko",
"type": "github"
}
},
"flake-compat": {
"locked": {
"lastModified": 1696426674,
@ -463,6 +483,7 @@
},
"root": {
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"niri": "niri",
"nixos-hardware": "nixos-hardware",

View file

@ -21,6 +21,11 @@
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs: import ./outputs.nix inputs;

View file

@ -1,10 +1,11 @@
{ nixpkgs, home-manager, nixos-hardware, nur, niri, ... }@inputs: {
{ nixpkgs, home-manager, nixos-hardware, nur, niri, disko, ... }@inputs: {
nixosConfigurations = let
clientModules = [
./modules/system
./options.nix
niri.nixosModules.niri
disko.nixosModules.disko
home-manager.nixosModules.home-manager {
nixpkgs.overlays = [
nur.overlay