mirror of
https://github.com/alyraffauf/nixcfg.git
synced 2024-11-21 19:53:55 -05:00
petalburg: conver to disko
petalburg: add disko to flake
This commit is contained in:
parent
c84c19739f
commit
dac00d11b0
|
@ -81,6 +81,7 @@
|
|||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
disko-unstable.nixosModules.disko
|
||||
nixos-hardware.nixosModules.common-pc-laptop-ssd
|
||||
nixos-hardware.nixosModules.common-cpu-intel
|
||||
home-manager-unstable.nixosModules.home-manager
|
||||
|
|
|
@ -53,6 +53,7 @@ let
|
|||
|
||||
in {
|
||||
imports = [
|
||||
./disko.nix
|
||||
./hardware-configuration.nix # Include the results of the hardware scan.
|
||||
./home.nix
|
||||
];
|
||||
|
|
56
hosts/petalburg/disko.nix
Normal file
56
hosts/petalburg/disko.nix
Normal file
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
vdb = {
|
||||
type = "disk";
|
||||
device = "/dev/nvme0n1";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
priority = 1;
|
||||
name = "ESP";
|
||||
start = "1M";
|
||||
end = "1024M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-f" ]; # Override existing partition
|
||||
# Subvolumes must set a mountpoint in order to be mounted,
|
||||
# unless their parent is mounted
|
||||
subvolumes = {
|
||||
# Subvolume name is different from mountpoint
|
||||
"rootfs" = { mountpoint = "/"; };
|
||||
# For use with future impermanence setups
|
||||
"persist" = {
|
||||
mountpoint = "/persist";
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
};
|
||||
# Subvolume name is the same as the mountpoint
|
||||
"home" = {
|
||||
mountOptions = [ "compress=zstd" ];
|
||||
mountpoint = "/home";
|
||||
};
|
||||
# Parent is not mounted so the mountpoint must be set
|
||||
"nix" = {
|
||||
mountOptions = [ "compress=zstd" "noatime" ];
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
mountpoint = "/partition-root";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -36,21 +36,6 @@
|
|||
powerManagement.powertop.enable = true;
|
||||
services.thermald.enable = true;
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/ed744c02-8854-4f1a-8e75-ed15f02775e3";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/37BB-86B6";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [{
|
||||
device = "/dev/disk/by-uuid/7a33dbc2-73f7-490b-9aa6-382e119a997e";
|
||||
priority = 1;
|
||||
}];
|
||||
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue