Add initial sway module

This commit is contained in:
DashieTM 2025-02-25 21:40:41 +01:00
parent d88a6c3e4d
commit c2ca2e5b71
6 changed files with 540 additions and 259 deletions

655
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -36,6 +36,7 @@
./starship.nix
./stylix.nix
./supersonic.nix
./sway.nix
./teams.nix
./virtmanager.nix
./xkb.nix

View file

@ -34,6 +34,16 @@
By default the scale of the main monitor is used.
'';
};
greeterCommand = lib.mkOption {
default = "${
lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland
} --config /etc/greetd/hyprgreet.conf";
example = "${
lib.getExe pkgs.cage
} -s -- ${lib.getEze pkgs.regreet}";
type = lib.types.str;
description = "The compositor/greeter command to run";
};
resolution = lib.mkOption {
default = "${config.conf.defaultMonitorMode}";
example = "3440x1440@180";
@ -73,9 +83,7 @@
config = let
username = config.conf.username;
session = {
command = "${
lib.getExe inputs.hyprland.packages.${config.conf.system}.hyprland
} --config /etc/greetd/hyprgreet.conf";
command = config.mods.greetd.greeterCommand;
user = username;
};
in

View file

@ -4,7 +4,8 @@
config,
pkgs,
...
}: {
}:
{
options.mods.media = {
useBasePackages = lib.mkOption {
default = true;
@ -39,8 +40,7 @@
};
config = lib.optionalAttrs (options ? home.packages) {
home.packages =
if config.mods.media.useBasePackages
then
if config.mods.media.useBasePackages then
with pkgs;
[
# base audio
@ -62,7 +62,7 @@
polylux2pdfpc
# spotify
# video editing
kdenlive
kdePackages.kdenlive
# image creation
inkscape
gimp
@ -70,19 +70,21 @@
yt-dlp
]
++ config.mods.media.additionalPackages
else config.mods.media.additionalPackages;
else
config.mods.media.additionalPackages;
programs =
if config.mods.media.useBasePackages
then
if config.mods.media.useBasePackages then
{
obs-studio.enable = true;
obs-studio.plugins = with pkgs; [ obs-studio-plugins.obs-vaapi ];
}
// config.mods.media.specialPrograms
else config.mods.media.specialPrograms;
else
config.mods.media.specialPrograms;
services =
if config.mods.media.useBasePackages
then config.mods.media.specialServices
else config.mods.media.specialServices;
if config.mods.media.useBasePackages then
config.mods.media.specialServices
else
config.mods.media.specialServices;
};
}

View file

@ -48,11 +48,8 @@
};
cursor = lib.mkOption {
default = {
# broken
#package = pkgs.bibata-cursors;
#name = "Bibata-Modern-Classic";
package = pkgs.catppuccin-cursors.mochaLavender;
name = "catppuccin-mocha-lavender-cursors";
package = pkgs.bibata-cursors;
name = "Bibata-Modern-Classic";
size = 24;
};
example = {};

30
modules/programs/sway.nix Normal file
View file

@ -0,0 +1,30 @@
{
lib,
config,
options,
...
}: {
options.mods.sway = {
enable = lib.mkOption {
default = false;
example = true;
type = lib.types.bool;
description = "Enables sway";
};
config = lib.mkOption {
default = {};
example = {};
type = with lib.types; attrsOf anything;
description = "sway config";
};
};
config = lib.mkIf config.mods.sway.enable (
lib.optionalAttrs (options ? wayland.windowManger) {
wayland.windowManager.sway =
{
enable = true;
}
// config.mods.sway.config;
}
);
}