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
|
inputs.stylix.homeModules.stylix
|
||||||
];
|
];
|
||||||
stylix = {
|
stylix = lib.mkIf (!cfg.headless) {
|
||||||
enable = true;
|
enable = true;
|
||||||
image =
|
image =
|
||||||
if builtins.pathExists ./${user}/wallpaper.png then
|
if builtins.pathExists ./${user}/wallpaper.png then
|
||||||
|
|
@ -95,10 +95,13 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
||||||
}) cfg.usersList)
|
}) cfg.usersList)
|
||||||
|
|
||||||
# Configure DM and users' default sessions
|
# Configure DM and users' default sessions
|
||||||
{
|
(lib.optionalAttrs (!cfg.headless) {
|
||||||
services.displayManager.gdm.enable = true;
|
services.displayManager.gdm.enable = true;
|
||||||
}
|
})
|
||||||
(map (user: {
|
|
||||||
|
(map (
|
||||||
|
user:
|
||||||
|
lib.optionalAttrs (!cfg.headless) {
|
||||||
systemd.tmpfiles.settings."20-gdm-default-session" = {
|
systemd.tmpfiles.settings."20-gdm-default-session" = {
|
||||||
"/run/tmpfiles/var/lib/AccountsService/users/${user}".f = {
|
"/run/tmpfiles/var/lib/AccountsService/users/${user}".f = {
|
||||||
argument = "${lib.generators.toINI { } {
|
argument = "${lib.generators.toINI { } {
|
||||||
|
|
@ -122,9 +125,12 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
||||||
argument = "/run/tmpfiles/var/lib/AccountsService/users/${user}";
|
argument = "/run/tmpfiles/var/lib/AccountsService/users/${user}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}) cfg.usersList)
|
}
|
||||||
|
) cfg.usersList)
|
||||||
|
|
||||||
(map (
|
(map (
|
||||||
user:
|
user:
|
||||||
|
lib.optionalAttrs (!cfg.headless) (
|
||||||
let
|
let
|
||||||
__session = lib.splitString ":" (builtins.fromJSON (builtins.readFile ./${user}/about.json))
|
__session = lib.splitString ":" (builtins.fromJSON (builtins.readFile ./${user}/about.json))
|
||||||
.session;
|
.session;
|
||||||
|
|
@ -140,6 +146,7 @@ lib.foldl' (acc: obj: lib.recursiveUpdate acc obj) { } (
|
||||||
{ services.desktopManager.${session}.enable = true; }
|
{ services.desktopManager.${session}.enable = true; }
|
||||||
else
|
else
|
||||||
{ }
|
{ }
|
||||||
|
)
|
||||||
) cfg.usersList)
|
) cfg.usersList)
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue