Add initial sway module
This commit is contained in:
parent
d88a6c3e4d
commit
c2ca2e5b71
6 changed files with 540 additions and 259 deletions
655
flake.lock
generated
655
flake.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -36,6 +36,7 @@
|
|||
./starship.nix
|
||||
./stylix.nix
|
||||
./supersonic.nix
|
||||
./sway.nix
|
||||
./teams.nix
|
||||
./virtmanager.nix
|
||||
./xkb.nix
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@
|
|||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
options.mods.media = {
|
||||
useBasePackages = lib.mkOption {
|
||||
default = true;
|
||||
|
|
@ -13,24 +14,24 @@
|
|||
description = "Default media packages (If disabled, only the additional packages will be installed)";
|
||||
};
|
||||
additionalPackages = lib.mkOption {
|
||||
default = [];
|
||||
example = [pkgs.flatpak];
|
||||
default = [ ];
|
||||
example = [ pkgs.flatpak ];
|
||||
type = with lib.types; listOf package;
|
||||
description = ''
|
||||
Additional media packages.
|
||||
'';
|
||||
};
|
||||
specialPrograms = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
special program configuration to be added which require programs.something notation.
|
||||
'';
|
||||
};
|
||||
specialServices = lib.mkOption {
|
||||
default = {};
|
||||
example = {};
|
||||
default = { };
|
||||
example = { };
|
||||
type = with lib.types; attrsOf anything;
|
||||
description = ''
|
||||
special services configuration to be added which require an services.something notation.
|
||||
|
|
@ -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];
|
||||
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;
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
30
modules/programs/sway.nix
Normal 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;
|
||||
}
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue