forked from Fediversity/Fediversity
- move import to match module classes - manually import sources to resolve infinite recursion closes #431. Reviewed-on: Fediversity/Fediversity#432 Co-authored-by: Kiara Grouwstra <kiara@procolix.eu> Co-committed-by: Kiara Grouwstra <kiara@procolix.eu>
69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
let
|
|
# pulling this in manually over from module args resolves an infinite recursion.
|
|
# FIXME: instead untangle `//infra/flake-part.nix` and make it stop passing wild functions.
|
|
# move moving towards a portable-services-like pattern where some things are submodules.
|
|
# Right now those wild functions are for parameterising a bunch of things,
|
|
# and the modular way to do that would be options --
|
|
# obviously you can't use those for `imports`,
|
|
# so one way to decouple fixpoints is to isolate them into submodules.
|
|
# Therefore one approach would be to try to go down the call graph,
|
|
# and see where what's currently a function could be a `submodule` field of something else.
|
|
sources = import ../../npins;
|
|
in
|
|
{
|
|
_class = "nixos";
|
|
|
|
imports = [
|
|
"${sources.nixpkgs}/nixos/modules/profiles/qemu-guest.nix"
|
|
];
|
|
|
|
boot = {
|
|
initrd = {
|
|
availableKernelModules = [
|
|
"ata_piix"
|
|
"uhci_hcd"
|
|
"sd_mod"
|
|
"sr_mod"
|
|
];
|
|
kernelModules = [ "dm-snapshot" ];
|
|
};
|
|
};
|
|
|
|
disko.devices.disk.main = {
|
|
device = "/dev/sda";
|
|
type = "disk";
|
|
|
|
content = {
|
|
type = "gpt";
|
|
|
|
partitions = {
|
|
MBR = {
|
|
priority = 0;
|
|
size = "1M";
|
|
type = "EF02";
|
|
};
|
|
|
|
ESP = {
|
|
priority = 1;
|
|
size = "500M";
|
|
type = "EF00";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "vfat";
|
|
mountpoint = "/boot";
|
|
};
|
|
};
|
|
|
|
root = {
|
|
priority = 2;
|
|
size = "100%";
|
|
content = {
|
|
type = "filesystem";
|
|
format = "ext4";
|
|
mountpoint = "/";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|