Yank out Disko config. Can't get it to detect its own root filesystem
This commit is contained in:
parent
b2bf8fc419
commit
c3589b3a73
12
flake.lock
12
flake.lock
|
@ -158,11 +158,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719677234,
|
"lastModified": 1719827439,
|
||||||
"narHash": "sha256-qO9WZsj/0E6zcK4Ht1y/iJ8XfwbBzq7xdqhBh44OP/M=",
|
"narHash": "sha256-tneHOIv1lEavZ0vQ+rgz67LPNCgOZVByYki3OkSshFU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "36317d4d38887f7629876b0e43c8d9593c5cc48d",
|
"rev": "59ce796b2563e19821361abbe2067c3bb4143a7d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -316,11 +316,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1719506693,
|
"lastModified": 1719690277,
|
||||||
"narHash": "sha256-C8e9S7RzshSdHB7L+v9I51af1gDM5unhJ2xO1ywxNH8=",
|
"narHash": "sha256-0xSej1g7eP2kaUF+JQp8jdyNmpmCJKRpO12mKl/36Kc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "b2852eb9365c6de48ffb0dc2c9562591f652242a",
|
"rev": "2741b4b489b55df32afac57bc4bfd220e8bf617e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -42,16 +42,6 @@ in
|
||||||
tpm2.enable = true;
|
tpm2.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use Disko to partition and format disks
|
|
||||||
disko = {
|
|
||||||
enable = true;
|
|
||||||
primaryDiskID = "";
|
|
||||||
swapFile = {
|
|
||||||
enable = true;
|
|
||||||
size = "16G";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
||||||
editor = "nano";
|
editor = "nano";
|
||||||
|
|
||||||
|
|
|
@ -1 +1,74 @@
|
||||||
builtins.abort "Need to generate hardware-configuration.nix for Dimaga"
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
let
|
||||||
|
primaryDisk = "/dev/disk/by-id/";
|
||||||
|
luksDevice = "";
|
||||||
|
standardMountOpts = [
|
||||||
|
"compress=zstd"
|
||||||
|
"noatime"
|
||||||
|
];
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
initrd = {
|
||||||
|
availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
"sdhci_pci"
|
||||||
|
];
|
||||||
|
luks.devices."luks-${luksDevice}" = {
|
||||||
|
device = "/dev/disk/by-uuid/${luksDevice}";
|
||||||
|
crypttabExtraOpts = [ "tpm2-device=auto" ]; # Enable TPM auto-unlocking
|
||||||
|
};
|
||||||
|
};
|
||||||
|
kernelModules = [ "kvm-intel" ];
|
||||||
|
extraModulePackages = [ ];
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = primaryDisk;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@" ] ++ standardMountOpts;
|
||||||
|
};
|
||||||
|
"/home" = {
|
||||||
|
device = primaryDisk;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@home" ] ++ standardMountOpts;
|
||||||
|
};
|
||||||
|
"/nix" = {
|
||||||
|
device = primaryDisk;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@nix" ] ++ standardMountOpts;
|
||||||
|
};
|
||||||
|
"/swap" = {
|
||||||
|
device = primaryDisk;
|
||||||
|
fsType = "btrfs";
|
||||||
|
options = [ "subvol=@swap" ];
|
||||||
|
};
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/AFCB-D880";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# 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.wlp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|
|
@ -40,16 +40,6 @@ in
|
||||||
tpm2.enable = true;
|
tpm2.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use Disko to partition and format disks
|
|
||||||
disko = {
|
|
||||||
enable = false;
|
|
||||||
primaryDiskID = "nvme-eui.002538da11443b4d";
|
|
||||||
swapFile = {
|
|
||||||
enable = true;
|
|
||||||
size = "16G";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
||||||
editor = "nano";
|
editor = "nano";
|
||||||
|
|
||||||
|
|
|
@ -53,16 +53,6 @@ in
|
||||||
tpm2.enable = true;
|
tpm2.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Partition disks using Disko
|
|
||||||
disko = {
|
|
||||||
enable = false;
|
|
||||||
primaryDiskID = "nvme-eui.ace42e0025b66c912ee4ac0000000001";
|
|
||||||
swapFile = {
|
|
||||||
enable = true;
|
|
||||||
size = "16G";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
# Change the default text editor. Options are "emacs", "nano", or "vim".
|
||||||
editor = "nano";
|
editor = "nano";
|
||||||
|
|
||||||
|
|
|
@ -29,19 +29,19 @@ in
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# Check for blank values
|
# Check for blank values
|
||||||
assertions = [
|
assertions = [
|
||||||
{
|
{
|
||||||
assertion = (cfg.primaryDiskID != "");
|
assertion = (cfg.primaryDiskID != "");
|
||||||
message = "aux.system.disko.primaryDiskID is not set. Please enter a valid disk ID.";
|
message = "aux.system.disko.primaryDiskID is not set. Please enter a valid disk ID.";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
# Disk management
|
# Disk management
|
||||||
disko.enableConfig = true;
|
disko.enableConfig = true;
|
||||||
disko.devices = {
|
disko.devices = {
|
||||||
disk = {
|
disk = {
|
||||||
main = {
|
main = {
|
||||||
type = "disk";
|
type = "disk";
|
||||||
device = "/dev/disk/by-id/${cfg.primaryDisk.id}";
|
device = "/dev/disk/by-id/${cfg.primaryDiskID}";
|
||||||
content = {
|
content = {
|
||||||
type = "gpt";
|
type = "gpt";
|
||||||
partitions = {
|
partitions = {
|
||||||
|
|
Loading…
Reference in a new issue