First commit

This commit is contained in:
2025-07-22 02:30:15 +02:00
commit e9441f563b
66 changed files with 4401 additions and 0 deletions

View File

@@ -0,0 +1,68 @@
{
# disko.devices = {
# disk = {
# main = {
# type = "disk";
# device = "/dev/sdb";
# content = {
# type = "gpt";
# partitions = {
# ESP = {
# size = "512M";
# type = "EF00";
# content = {
# type = "filesystem";
# format = "vfat";
# mountpoint = "/boot";
# mountOptions = [ "umask=0077" ];
# };
# };
# SYS = {
# size = "100%";
# type = "8309";
# content = {
# type = "luks";
# name = "rootfs";
# settings = {
# allowDiscards = true;
#
# };
# content = {
# type = "btrfs";
# extraArgs = [ "-f --nodiscard --label root" ];
# subvolumes = {
# "@" = {
# mountpoint = "/";
# mountOptions = [ "defaults" "ssd" "compress=zstd" "autodefrag" "noatime" "nodiscard" ];
# };
# "@root" = {
# mountpoint = "/root";
# mountOptions = [ "defaults" "ssd" "compress=zstd" "autodefrag" "noatime" "nodiscard" ];
# };
# "@home" = {
# mountpoint = "/home";
# mountOptions = [ "defaults" "ssd" "compress=zstd" "autodefrag" "noatime" "nodiscard" ];
# };
# "@nix" = {
# mountpoint = "/nix";
# mountOptions = [ "defaults" "ssd" "compress=zstd" "autodefrag" "noatime" "nodiscard" ];
# };
# "@var" = {
# mountpoint = "/var";
# mountOptions = [ "defaults" "ssd" "compress=zstd" "autodefrag" "noatime" "nodiscard" ];
# };
# "@games" = {
# mountpoint = "/games";
# mountOptions = [ "defaults" "ssd" "compress=zstd" "autodefrag" "noatime" "nodiscard" ];
# };
# };
# };
# };
# };
# };
# };
# };
# };
# };
}
# sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --yes-wipe-all-disks --mode destroy,format,mount ./disko.nix

View File

@@ -0,0 +1,149 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{
config,
lib,
modulesPath,
...
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ehci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/2271e57f-0b57-4ab7-8238-b84b01974cc8";
fsType = "btrfs";
options = [
"subvol=@"
"defaults"
"ssd"
"compress=zstd"
"autodefrag"
"noatime"
"nodiscard"
];
};
boot.initrd.luks.devices."rootfs".device = "/dev/disk/by-uuid/77601e4d-358d-49ba-b6e5-f3a68f05060a";
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/9EF7-6EB2";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
fileSystems."/games" = {
device = "/dev/disk/by-uuid/2271e57f-0b57-4ab7-8238-b84b01974cc8";
fsType = "btrfs";
options = [
"subvol=@games"
"defaults"
"ssd"
"compress=zstd"
"autodefrag"
"noatime"
"nodiscard"
];
};
fileSystems."/home" = {
device = "/dev/disk/by-uuid/2271e57f-0b57-4ab7-8238-b84b01974cc8";
fsType = "btrfs";
options = [
"subvol=@home"
"defaults"
"ssd"
"compress=zstd"
"autodefrag"
"noatime"
"nodiscard"
];
};
fileSystems."/nix" = {
device = "/dev/disk/by-uuid/2271e57f-0b57-4ab7-8238-b84b01974cc8";
fsType = "btrfs";
options = [
"subvol=@nix"
"defaults"
"ssd"
"compress=zstd"
"autodefrag"
"noatime"
"nodiscard"
];
};
fileSystems."/root" = {
device = "/dev/disk/by-uuid/2271e57f-0b57-4ab7-8238-b84b01974cc8";
fsType = "btrfs";
options = [
"subvol=@root"
"defaults"
"ssd"
"compress=zstd"
"autodefrag"
"noatime"
"nodiscard"
];
};
fileSystems."/var" = {
device = "/dev/disk/by-uuid/2271e57f-0b57-4ab7-8238-b84b01974cc8";
fsType = "btrfs";
options = [
"subvol=@var"
"defaults"
"ssd"
"compress=zstd"
"autodefrag"
"noatime"
"nodiscard"
];
};
environment.etc."crypttab".text = ''
datafs UUID=5ca962a7-537f-46ce-ba50-9cc9cefd012b /etc/lukskey
'';
fileSystems."/data" = {
device = "/dev/disk/by-uuid/a8ea6a7b-3733-40d8-bee8-45806aaacfe1";
fsType = "btrfs";
options = [
"defaults"
"compress=zstd"
"autodefrag"
"noatime"
];
};
swapDevices = [ ];
# 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
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}