aboutsummaryrefslogtreecommitdiff
path: root/modules/sway
diff options
context:
space:
mode:
authorStefan Weigl-Bosker <stefan@s00.xyz>2025-03-04 12:36:18 -0500
committerStefan Weigl-Bosker <stefan@s00.xyz>2025-03-04 12:36:18 -0500
commitfdbeca13108fac5e5f07fb08d8b28d80ed973c1d (patch)
treea656d95b58ee4502cb5fc5cc834a7f42d74a771d /modules/sway
parentcfd09f66cbd48d527f1b9ab02aec2420d3fd7ab8 (diff)
downloadhome-fdbeca13108fac5e5f07fb08d8b28d80ed973c1d.tar.gz
service management wip
Diffstat (limited to 'modules/sway')
-rw-r--r--modules/sway/default.nix36
1 files changed, 18 insertions, 18 deletions
diff --git a/modules/sway/default.nix b/modules/sway/default.nix
index 55ef601..5d81354 100644
--- a/modules/sway/default.nix
+++ b/modules/sway/default.nix
@@ -5,10 +5,25 @@ in
{
options.modules.sway = {
enable = lib.mkEnableOption "sway";
- wrapWithNixGL = lib.mkEnableOption "NixGL wrapper";
+ wrapWithNixGL = lib.mkEnableOption "NixGL wrapper.";
terminal = lib.mkOption {
type = lib.types.str;
- description = "terminal command";
+ description = "Terminal command.";
+ };
+ startup = lib.mkOption {
+ type = lib.types.listOf (lib.types.submodule {
+ command = lib.mkOption {
+ type = lib.types.string;
+ description = "Command to be executed on startup.";
+ };
+ always = lib.mkOption {
+ type = lib.types.bool;
+ default = false;
+ description = "Whether to run command on each restart";
+ };
+ });
+ default = [ ];
+ description = "List of commands that sway will run on startup. This should be used only for sway specific applications";
};
};
@@ -19,14 +34,6 @@ in
wayland.windowManager.sway = lib.mkIf cfg.enable {
enable = true;
package = if cfg.wrapWithNixGL then config.lib.nixGL.wrap pkgs.sway else pkgs.sway;
-# package = c
-# package = pkgs.sway;
-# package = pkgs.writeShellScriptBin "sway" ''
-# ${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL ${pkgs.sway}/bin/sway
-# '';
-# extraSessionCommands=''
-# source ${pkgs.nixgl.auto.nixGLDefault}/bin/nixGL
-# '';
config = rec {
modifier = "Mod1";
@@ -236,14 +243,7 @@ in
"--locked XF86MonBrightnessUp" = "exec lightctl -d up";
};
- startup = [
- { command = "foot -s"; }
- { command = "wayneko --layer bottom --follow-pointer true --background-colour 0xcacaca --outline-colour 0x0f0f0f"; }
-# { command = "pipewire"; always = true; } # TODO need to fix this instead of running a new session every time
-# { command = "mpd"; }
-# { command = "mpdscribble"; }
-# { command = "avizo-service"; } # disable if on nixos or systemd
- ];
+ startup = cfg.startup;
seat = {
"*" = {