Compare commits
12 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
06c23247bf | ||
![]() |
f69a0748eb | ||
![]() |
94af0087bf | ||
![]() |
57be8c1316 | ||
![]() |
63ee05cebe | ||
![]() |
99512d6b24 | ||
![]() |
c9bfc27379 | ||
![]() |
0e666decc7 | ||
![]() |
bfcbd8c6aa | ||
![]() |
299f7ac111 | ||
![]() |
0636e412c0 | ||
![]() |
f2e8dccca4 |
6 changed files with 135 additions and 19 deletions
|
@ -1,11 +1,13 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-config.nix
|
./hardware-config.nix
|
||||||
|
./disko.nix
|
||||||
./nvidia.nix
|
./nvidia.nix
|
||||||
./options.nix
|
./options.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "ellaca";
|
networking.hostName = "ellaca";
|
||||||
|
networking.hostId = "656c6c61";
|
||||||
|
|
||||||
# Select kernel version
|
# Select kernel version
|
||||||
boot.kernelPackages = pkgs.linuxPackages_zen;
|
boot.kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
@ -15,7 +17,7 @@
|
||||||
grub = {
|
grub = {
|
||||||
enable = true;
|
enable = true;
|
||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
device = "nodev";
|
device = "/dev/nvme0n1p1";
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
font = null;
|
font = null;
|
||||||
splashImage = null;
|
splashImage = null;
|
||||||
|
|
104
devices/ellaca/disko.nix
Normal file
104
devices/ellaca/disko.nix
Normal file
|
@ -0,0 +1,104 @@
|
||||||
|
{
|
||||||
|
disko.devices = {
|
||||||
|
disk = {
|
||||||
|
ssd0 = {
|
||||||
|
type = "disk";
|
||||||
|
device = "/dev/nvme0n1";
|
||||||
|
content = {
|
||||||
|
type = "gpt";
|
||||||
|
partitions = {
|
||||||
|
efi = {
|
||||||
|
size = "1G";
|
||||||
|
type = "EF00";
|
||||||
|
priority = 0;
|
||||||
|
content = {
|
||||||
|
type = "filesystem";
|
||||||
|
format = "vfat";
|
||||||
|
mountpoint = "/boot";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
root = {
|
||||||
|
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 = {
|
||||||
|
store = {
|
||||||
|
size = "100%";
|
||||||
|
content = {
|
||||||
|
type = "zfs";
|
||||||
|
pool = "zstore";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
zpool = {
|
||||||
|
zroot = {
|
||||||
|
type = "zpool";
|
||||||
|
mode = "";
|
||||||
|
rootFsOptions = {
|
||||||
|
compression = "zstd";
|
||||||
|
canmount = "off";
|
||||||
|
"com.sun:auto-snapshot" = "false";
|
||||||
|
};
|
||||||
|
mountpoint = "/";
|
||||||
|
postCreateHook = "zfs list -t snapshot -H -o name | grep -E '^zroot@blank$' || zfs snapshot zroot@blank";
|
||||||
|
|
||||||
|
datasets = {
|
||||||
|
root = {
|
||||||
|
type = "zfs_fs";
|
||||||
|
mountpoint = "/";
|
||||||
|
};
|
||||||
|
home = {
|
||||||
|
type = "zfs_fs";
|
||||||
|
mountpoint = "/home";
|
||||||
|
};
|
||||||
|
nix = {
|
||||||
|
type = "zfs_fs";
|
||||||
|
mountpoint = "/nix";
|
||||||
|
};
|
||||||
|
persist = {
|
||||||
|
type = "zfs_fs";
|
||||||
|
mountpoint = "/persist";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
zstore = {
|
||||||
|
type = "zpool";
|
||||||
|
mode = "";
|
||||||
|
rootFsOptions = {
|
||||||
|
compression = "zstd";
|
||||||
|
canmount = "off";
|
||||||
|
"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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -8,23 +8,6 @@
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
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
|
# 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
|
# (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
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
|
21
flake.lock
generated
21
flake.lock
generated
|
@ -98,6 +98,26 @@
|
||||||
"type": "github"
|
"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": {
|
"flake-compat": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1696426674,
|
"lastModified": 1696426674,
|
||||||
|
@ -463,6 +483,7 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"disko": "disko",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"niri": "niri",
|
"niri": "niri",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
|
|
|
@ -21,6 +21,11 @@
|
||||||
url = "github:sodiboo/niri-flake";
|
url = "github:sodiboo/niri-flake";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
disko = {
|
||||||
|
url = "github:nix-community/disko";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs: import ./outputs.nix inputs;
|
outputs = inputs: import ./outputs.nix inputs;
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
{ nixpkgs, home-manager, nixos-hardware, nur, niri, ... }@inputs: {
|
{ nixpkgs, home-manager, nixos-hardware, nur, niri, disko, ... }@inputs: {
|
||||||
nixosConfigurations = let
|
nixosConfigurations = let
|
||||||
|
|
||||||
clientModules = [
|
clientModules = [
|
||||||
./modules/system
|
./modules/system
|
||||||
./options.nix
|
./options.nix
|
||||||
niri.nixosModules.niri
|
niri.nixosModules.niri
|
||||||
|
disko.nixosModules.disko
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
nur.overlay
|
nur.overlay
|
||||||
|
|
Loading…
Add table
Reference in a new issue