mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2026-04-14 21:29:12 +02:00
feat: add persistent ids to all users/groups
This commit is contained in:
parent
37a8e17cc9
commit
7f65f74fef
62 changed files with 533 additions and 173 deletions
15
modules/nixos/optional/microvm-guest-shares.nix
Normal file
15
modules/nixos/optional/microvm-guest-shares.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ self, lib, config, inputs, microVMParent, nodes, ... }:
|
||||
{
|
||||
config = {
|
||||
microvm = {
|
||||
shares = [
|
||||
{
|
||||
tag = "persist";
|
||||
source = "${lib.optionalString nodes.${microVMParent}.config.swarselsystems.isImpermanence "/persist"}/microvms/${config.networking.hostName}";
|
||||
mountPoint = "/persist";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{ self, lib, config, inputs, microVMParent, nodes, ... }:
|
||||
{ self, lib, config, inputs, microVMParent, nodes, globals, confLib, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
|
|
@ -49,24 +49,16 @@
|
|||
};
|
||||
};
|
||||
|
||||
microvm = {
|
||||
shares = [
|
||||
{
|
||||
tag = "persist";
|
||||
source = "${lib.optionalString nodes.${microVMParent}.config.swarselsystems.isImpermanence "/persist"}/microvms/${config.networking.hostName}";
|
||||
mountPoint = "/persist";
|
||||
proto = "virtiofs";
|
||||
}
|
||||
];
|
||||
# mount the writeable overlay so that we can use nix shells inside the microvm
|
||||
volumes = [
|
||||
{
|
||||
image = "/tmp/nix-store-overlay-${config.networking.hostName}.img";
|
||||
autoCreate = true;
|
||||
mountPoint = config.microvm.writableStoreOverlay;
|
||||
size = 1024;
|
||||
}
|
||||
];
|
||||
};
|
||||
# microvm = {
|
||||
# mount the writeable overlay so that we can use nix shells inside the microvm
|
||||
# volumes = [
|
||||
# {
|
||||
# image = "/tmp/nix-store-overlay-${config.networking.hostName}.img";
|
||||
# autoCreate = true;
|
||||
# mountPoint = config.microvm.writableStoreOverlay;
|
||||
# size = 1024;
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, lib, ... }:
|
||||
{ config, lib, confLib, ... }:
|
||||
{
|
||||
config = lib.mkIf (config.guests != { }) {
|
||||
|
||||
|
|
@ -17,5 +17,7 @@
|
|||
(builtins.attrNames config.guests)
|
||||
);
|
||||
|
||||
users.persistentIds.microvm = confLib.mkIds 999;
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue