Skip to content

Commit

Permalink
Experiment with more minimal generators
Browse files Browse the repository at this point in the history
  • Loading branch information
ritiek committed Oct 19, 2024
1 parent 07a53a8 commit c10344a
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 1 deletion.
12 changes: 12 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -249,5 +249,17 @@
modules = [ ./generators/minimal.nix ];
format = "install-iso";
};

minimal-qcow-efi = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [ ./generators/minimal.nix ];
format = "qcow-efi";
};

minimal-raw-efi = nixos-generators.nixosGenerate {
system = "x86_64-linux";
modules = [ ./generators/minimal.nix ];
format = "raw-efi";
};
};
}
44 changes: 43 additions & 1 deletion generators/minimal.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,52 @@
# };

# Swap files don't work as expected as they seem to use tmpfs.
#
# swapDevices = [{
# device = "/swap";
# size = 4 * 1024; # 4GB
# size = 2 * 1024; # 2GB
# }];
#
# disko.devices.disk.minimal = {
# device = "nodev";
# content = {
# type = "gpt";
# partitions = {
# plain-swap = {
# size = "2G";
# content = {
# type = "swap";
# discardPolicy = "both";
# resumeDevice = true;
# };
# };
# };
# };
# };
#
# disko.devices.nodev = {
# "/swap" = {
# fsType = "ext4";
# mountOptions = [
# "size=2G"
# "mode=755"
# ];
# };
# };

# systemd.tmpfiles.rules = [
# "f /var/log/timers/backup - ${variables.username} ${variables.username} - -"
# ];

# systemd.tmpfiles.settings."swap" = {
# "/var/lib/swap" = {
# f = {
# group = "root";
# mode = "0755";
# user = "root";
# };
# };
# };

# Disable sudo as we've no non-root users.
security.sudo.enable = false;
Expand Down

0 comments on commit c10344a

Please sign in to comment.