mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: basic installer image generator
This commit is contained in:
parent
d11b9486eb
commit
b49def46ac
5 changed files with 130 additions and 3 deletions
|
|
@ -1,9 +1,9 @@
|
|||
{ self, ... }:
|
||||
{ self, inputs, ... }:
|
||||
{
|
||||
flake.lib.mkNerdFont = ./mkNerdFont.nix;
|
||||
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{ pkgs, system, ... }:
|
||||
let
|
||||
inherit (pkgs) alt-ergo-pin;
|
||||
mkNerdFont = pkgs.callPackage self.lib.mkNerdFont { };
|
||||
|
|
@ -37,7 +37,21 @@
|
|||
maeel = pkgs.callPackage ./maeel.nix { };
|
||||
tokei = pkgs.callPackage ./tokei { }; # alpha tokei with typst, skel, hledger
|
||||
|
||||
posy-cursor = pkgs.callPackage ./posy-cursor.nix { };
|
||||
carbon-installer = inputs.nixos-generators.nixosGenerate {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit pkgs;
|
||||
hostname = "carbon";
|
||||
};
|
||||
format = "install-iso";
|
||||
modules = [
|
||||
self.nixosModules.layouts
|
||||
{
|
||||
environment.etc.flake-source.source = self;
|
||||
environment.systemPackages = [ pkgs.disko ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
70
nix/disko/carbon/default.nix
Normal file
70
nix/disko/carbon/default.nix
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
# Adapted from: https://github.com/nix-community/disko/blob/master/example/luks-lvm.nix
|
||||
|
||||
{
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = throw "Override me or change me";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "500M";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
luks = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "luks";
|
||||
name = "crypted";
|
||||
extraOpenArgs = [ ];
|
||||
settings = {
|
||||
# # if you want to use the key for interactive login be sure there is no trailing newline
|
||||
# # for example use `echo -n "password" > /tmp/secret.key`
|
||||
# keyFile = "/tmp/secret.key";
|
||||
askPassword = true;
|
||||
allowDiscards = true;
|
||||
};
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
vg = "pool";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = {
|
||||
pool = {
|
||||
type = "lvm_vg";
|
||||
lvs = {
|
||||
root = {
|
||||
size = "20G";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "defaults" ];
|
||||
};
|
||||
};
|
||||
home = {
|
||||
size = "100%FREE";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "ext4";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
1
nix/disko/default.nix
Normal file
1
nix/disko/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ flake.diskoConfigurations.carbon = import ./carbon; }
|
||||
Loading…
Add table
Add a link
Reference in a new issue