{ workflow }: let pkgs = import { }; config' = import { inherit pkgs; }; lib = pkgs.lib.extend (self: super: let publicLib = import { lib = super; }; in { inherit (publicLib) countAttrs getSecrets attachSopsPathPrefix; # Until I figure out how to properly add them only for their respective # environment, this is the working solution for now. Not really perfect # since we use one nixpkgs instance for each configuration (home-manager or # otherwise). private = publicLib // import { lib = self; } // import { lib = self; }; }); modules = import { inherit lib; isInternal = true; }; hmModules = import { inherit lib; isInternal = true; }; in import { inherit lib; modules = modules ++ [ ({ config, lib, pkgs, ... }: { imports = [ ( let password = "nixos"; in lib.private.mapHomeManagerUser "alice" { inherit password; extraGroups = [ "wheel" ]; description = "The password is '${password}'"; isNormalUser = true; createHome = true; home = "/home/alice"; } ) ]; config = { home-manager.sharedModules = hmModules; _module.args = { nix-colors = import { }; }; virtualisation.qemu.options = [ "-vga virtio" "-display gtk,gl=on" ]; workflows.workflows.${workflow}.enable = true; nixpkgs.overlays = [ config'.overlays.default ]; system.stateVersion = "23.11"; }; }) ]; }