another one bites the disk

This commit is contained in:
2025-03-10 17:37:02 +02:00
parent fca6f291ec
commit 98f3894f44
5 changed files with 84 additions and 43 deletions

View File

@ -9,9 +9,10 @@
lix.nixosModules.default lix.nixosModules.default
self.nixosModules.desktop self.nixosModules.desktop
self.nixosModules.system self.nixosModules.system
./hardware-conf.nix ./hardware.nix
./programs.nix ./programs.nix
./stylix.nix ./stylix.nix
./disko.nix
./users.nix ./users.nix
./sops.nix ./sops.nix
]; ];

73
hosts/sarien/disko.nix Normal file
View File

@ -0,0 +1,73 @@
{inputs, ...}: {
imports = with inputs; [
disko.nixosModules.disko
];
disko.devices.disk.main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "2G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"umask=0077"
"fmask=0022"
"dmask=0022"
"noexec"
];
};
};
luks = {
size = "100%";
content = {
type = "luks";
name = "luks-main";
initrdUnlock = true;
settings.allowDiscards = true;
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"@nixos" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
"noatime"
# "noexec"
];
};
"home" = {
mountpoint = "/home";
mountOptions = [
"compress=zstd"
"noatime"
];
};
"@storage" = {
mountpoint = "/storage";
mountOptions = [
"compress=zstd"
"noatime"
];
};
# "@nix" = {
# mountpoint = "/nix";
# mountOptions = [
# "compress=zstd"
# "noatime"
# ];
# };
};
};
};
};
};
};
};
}

View File

@ -21,48 +21,17 @@
boot = { boot = {
kernelModules = ["kvm-intel"]; kernelModules = ["kvm-intel"];
extraModulePackages = [];
kernelParams = [ kernelParams = [
"i915.enable_guc=2" "i915.enable_guc=2"
"i915.enable_fbc=1" "i915.enable_fbc=1"
"i915.enable_psr=2" "i915.enable_psr=2"
]; ];
initrd = { initrd = {
luks.devices."luks-149371a0-a41f-4c43-8935-cb199508c66a".device = "/dev/disk/by-uuid/149371a0-a41f-4c43-8935-cb199508c66a";
availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc"]; availableKernelModules = ["xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" "sr_mod" "rtsx_pci_sdmmc"];
kernelModules = ["i915"]; kernelModules = ["i915"];
}; };
}; };
fileSystems = {
"/" = {
device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf";
fsType = "btrfs";
options = ["subvol=@nixos,compress=zstd"];
};
"/home" = {
device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf";
fsType = "btrfs";
options = ["subvol=home,compress=zstd"];
};
"/storage" = {
device = "/dev/disk/by-uuid/6b850c3a-c7a2-461d-bce5-c631df4226bf";
fsType = "btrfs";
options = ["subvol=@storage,compress=zstd"];
};
"/boot" = {
device = "/dev/disk/by-uuid/F195-F7C0";
fsType = "vfat";
options = ["umask=0077"];
};
};
swapDevices = [];
networking.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

View File

@ -1,8 +1,8 @@
{inputs, ...}: let {inputs, ...}: let
secretsPath = builtins.toString inputs.mysecrets; secretsPath = builtins.toString inputs.mysecrets;
in { in {
imports = [ imports = with inputs; [
inputs.sops-nix.nixosModules.sops sops-nix.nixosModules.sops
]; ];
sops = { sops = {

View File

@ -3,11 +3,10 @@
inputs, inputs,
... ...
}: { }: {
imports = [ imports = with inputs; [
inputs.stylix.nixosModules.stylix stylix.nixosModules.stylix
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
#papirus-icon-theme
nerd-fonts.iosevka nerd-fonts.iosevka
]; ];
stylix = { stylix = {
@ -15,14 +14,14 @@
base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml"; base16Scheme = "${pkgs.base16-schemes}/share/themes/tomorrow-night.yaml";
polarity = "dark"; polarity = "dark";
cursor = { cursor = {
package = pkgs.google-cursor; package = pkgs.bibata-cursors;
name = "GoogleDot-Blue"; name = "Bibata-Modern-Amber";
size = 24; size = 24;
}; };
image = builtins.fetchurl { image = builtins.fetchurl {
url = "https://w.wallhaven.cc/full/9m/wallhaven-9mwzwk.jpg"; url = "https://w.wallhaven.cc/full/13/wallhaven-13e379.png";
name = "wallhaven-9mwzwk"; name = "wallhaven-13e379";
sha256 = "0pj2k30mfhqr02dzdj40z62awmy58s5gg5mm4xzxiialclbd5n8d"; sha256 = "1h8xhcgcdgd3dy1viqv6f192kr5cw7gi4rjqh4kbgwg6hj962409";
}; };
opacity.terminal = 0.9; opacity.terminal = 0.9;
fonts = { fonts = {
@ -44,7 +43,6 @@
package = pkgs.nerd-fonts.iosevka; package = pkgs.nerd-fonts.iosevka;
name = "Iosevka Nerd Font Mono"; name = "Iosevka Nerd Font Mono";
}; };
emoji = { emoji = {
package = pkgs.noto-fonts-emoji; package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji"; name = "Noto Color Emoji";