feat: add flake-parts module
This commit is contained in:
committed by
Jörg Thalheim
parent
c8a0e78d86
commit
146f45bee0
@@ -0,0 +1,43 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
options.flake.diskoConfigurations = lib.mkOption {
|
||||
type = lib.types.lazyAttrsOf lib.types.raw;
|
||||
default = { };
|
||||
description = "Instantiated Disko configurations. Used by `disko` and `disko-install`.";
|
||||
example = {
|
||||
my-pc = {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
my-disk = {
|
||||
device = "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
type = "EF00";
|
||||
size = "500M";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "umask=0077" ];
|
||||
};
|
||||
};
|
||||
root = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -29,6 +29,9 @@
|
||||
{
|
||||
nixosModules.default = self.nixosModules.disko; # convention
|
||||
nixosModules.disko = ./module.nix;
|
||||
flakeModule = self.flakeModules.default;
|
||||
flakeModules.default = self.flakeModules.disko;
|
||||
flakeModules.disko = ./flake-module.nix;
|
||||
lib = diskoLib;
|
||||
packages = forAllSystems (
|
||||
system:
|
||||
|
||||
Reference in New Issue
Block a user