feat: use cfg.headless parameter to conditionally enable stylix, DM,
DE/WM
This commit is contained in:
parent
382d78b3d0
commit
e6f4bb1341
1 changed files with 50 additions and 43 deletions
|
|
@ -82,7 +82,7 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
|||
|
||||
inputs.stylix.homeModules.stylix
|
||||
];
|
||||
stylix = {
|
||||
stylix = lib.mkIf (!cfg.headless) {
|
||||
enable = true;
|
||||
image =
|
||||
if builtins.pathExists ./${user}/wallpaper.png then
|
||||
|
|
@ -95,10 +95,13 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
|||
}) cfg.usersList)
|
||||
|
||||
# Configure DM and users' default sessions
|
||||
{
|
||||
(lib.optionalAttrs (!cfg.headless) {
|
||||
services.displayManager.gdm.enable = true;
|
||||
}
|
||||
(map (user: {
|
||||
})
|
||||
|
||||
(map (
|
||||
user:
|
||||
lib.optionalAttrs (!cfg.headless) {
|
||||
systemd.tmpfiles.settings."20-gdm-default-session" = {
|
||||
"/run/tmpfiles/var/lib/AccountsService/users/${user}".f = {
|
||||
argument = "${lib.generators.toINI { } {
|
||||
|
|
@ -122,9 +125,12 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
|||
argument = "/run/tmpfiles/var/lib/AccountsService/users/${user}";
|
||||
};
|
||||
};
|
||||
}) cfg.usersList)
|
||||
}
|
||||
) cfg.usersList)
|
||||
|
||||
(map (
|
||||
user:
|
||||
lib.optionalAttrs (!cfg.headless) (
|
||||
let
|
||||
__session = lib.splitString ":" (builtins.fromJSON (builtins.readFile ./${user}/about.json))
|
||||
.session;
|
||||
|
|
@ -140,6 +146,7 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
|||
{ services.desktopManager.${session}.enable = true; }
|
||||
else
|
||||
{ }
|
||||
)
|
||||
) cfg.usersList)
|
||||
]
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue