Rewrote systemwide system, fixed broken build

This commit is contained in:
Jan-Bulthuis committed 2025-02-17 12:53:45 +01:00
1 parent 42040403b1
commit 036f619673
16 files changed
+93 -179

No files matched your search

+9 -9
View File
@@ -12,7 +12,6 @@ in
{
imports = [
# Import desktop environment modules
./background/glpaper/default.nix
./bar/waybar.nix
./lock-screen/waylock.nix
./window-manager/i3.nix
@@ -83,13 +82,14 @@ in
}
(
# TODO: Move to dedicated module within desktop or maybe theming?
if cfg.decorations == null then
{ }
else
{
csd = { };
ssd = { };
}
."${cfg.decorations}"
# if cfg.decorations == null then
# { }
# else
# {
# csd = { };
# ssd = { };
# }
# ."${cfg.decorations}"
{ }
);
}
@@ -16,10 +16,5 @@ in
config = mkIf cfg.enable {
home.packages = (with pkgs; [ waylock ]);
# Systemwide configuration
systemwide = {
security.pam.services.waylock = { };
};
};
}
@@ -23,23 +23,5 @@ in
xsession.windowManager.i3 = {
enable = true;
};
# Systemwide configuration
systemwide = {
services.xserver = {
layout = "us";
xkbVariant = "";
enable = true;
windowManager.i3.enable = true;
desktopManager = {
xterm.enable = true;
xfce = {
enable = true;
# noDesktop = false;
# enableXfwm = false;
};
};
};
};
};
}
@@ -36,11 +36,6 @@ in
river
'';
# Systemwide configuration
systemwide = {
programs.river.enable = true;
};
# TODO: Fix this
# modules.desktop.reloadScript = ''
# ${pkgs.river}/bin/riverctl background-color 0x${config.theming.colors.bg}
@@ -118,7 +113,8 @@ in
spawn = [
"\"${layout} ${layoutOptions}\""
"waybar" # TODO: Decouple
"\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
# TODO: Generic background options
# "\"glpaper eDP-1 ${toString config.modules.glpaper.shader}\""
"udiskie"
];
map = (
+3 -93
View File
@@ -1,95 +1,5 @@
{ ... }:
{
lib,
pkgs,
config,
...
}:
with lib;
let
cfg = config.modules.desktop;
in
{
imports = [
# Import desktop environment modules
./background/glpaper/default.nix
./bar/waybar.nix
./lock-screen/waylock.nix
./window-manager/i3.nix
./window-manager/river.nix
];
options.modules.desktop = {
wayland = mkEnableOption "wayland";
# TODO: Remove, not needed with session/display manager
initScript = mkOption {
type = types.lines;
default = "${pkgs.bash}/bin/bash";
description = "Bash script to execute after logging in.";
};
# TODO: Find a nicer way to do this as this is also executed on startup
reloadScript = mkOption {
type = types.lines;
default = "";
description = "Shell script to execute after reload/rebuild.";
};
decorations = mkOption {
type = types.nullOr (
types.enum [
"csd"
"ssd"
]
);
default = null;
description = "Window decorations to use.";
};
};
config =
lib.recursiveUpdate
{
# Ensure desktop related systemd services (xdg) have access to session variables.
systemd.user.sessionVariables = config.home.sessionVariables;
home.packages = optionals cfg.wayland (
with pkgs;
[
wl-clipboard
wtype
grim
slurp
]
);
home.activation = {
customReloadScript = lib.hm.dag.entryAfter [ "writeBoundary" ] (
''
#!${pkgs.bash}/bin/bash
''
+ cfg.reloadScript
);
};
home.file.".initrc" = {
enable = true;
executable = true;
text =
''
#!${pkgs.bash}/bin/bash
''
+ cfg.initScript;
};
}
(
# TODO: Move to dedicated module within desktop or maybe theming?
if cfg.decorations == null then
{ }
else
{
csd = { };
ssd = { };
}
."${cfg.decorations}"
);
imports = [ ./custom/default.nix ];
}
+22
View File
@@ -0,0 +1,22 @@
{
waylock = {
security.pam.services.waylock = { };
};
river = {
programs.river.enable = true;
};
i3 = {
services.xserver = {
layout = "us";
xkbVariant = "";
enable = true;
windowManager.i3.enable = true;
desktopManager = {
xterm.enable = true;
xfce = {
enable = true;
};
};
};
};
}