feat: Improve noctalia settings and update flake inputs
This commit is contained in:
parent
5e2e6ef3ae
commit
21082cc73f
6 changed files with 709 additions and 342 deletions
76
home/david/modules/programs/noctalia/default.nix
Normal file
76
home/david/modules/programs/noctalia/default.nix
Normal file
|
|
@ -0,0 +1,76 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.david.programs.noctalia;
|
||||
inherit (inputs.niri-flake.lib.kdl) node leaf flag plain;
|
||||
spawn = leaf "spawn";
|
||||
noctalia = args: (spawn (["noctalia-shell" "ipc" "call"] ++ args));
|
||||
|
||||
layer-rule = plain "layer-rule";
|
||||
match = leaf "match";
|
||||
in {
|
||||
options = {
|
||||
david.programs.noctalia = {
|
||||
enable = lib.mkEnableOption "noctalia";
|
||||
niriExtraConfig = lib.mkOption {
|
||||
type = inputs.niri-flake.lib.kdl.types.kdl-document;
|
||||
default = [
|
||||
(plain "binds" [
|
||||
(plain "Mod+V" [(noctalia ["launcher" "clipboard"])])
|
||||
(plain "Mod+Shift+P" [(noctalia ["lockScreen" "lock"])])
|
||||
(plain "Mod+Space" [(noctalia ["launcher" "toggle"])])
|
||||
(node "XF86AudioRaiseVolume" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "increase"])])
|
||||
(node "XF86AudioLowerVolume" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "decrease"])])
|
||||
(node "XF86AudioMute" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "muteOutput"])])
|
||||
(node "XF86AudioMicMute" [{allow-when-locked = true;}]
|
||||
[(noctalia ["volume" "muteInput"])])
|
||||
])
|
||||
(layer-rule [
|
||||
(match [{namespace = "^noctalia-wallpaper-.*$";}])
|
||||
(leaf "place-within-backdrop" [true])
|
||||
])
|
||||
(layer-rule [
|
||||
(match [{namespace = "^noctalia-notifications-.*$";}])
|
||||
(leaf "block-out-from" ["screen-capture"])
|
||||
])
|
||||
(plain "layout" [
|
||||
(plain "focus-ring" [
|
||||
(leaf "active-gradient" [
|
||||
{
|
||||
from = "#8288fcff";
|
||||
to = "#8288fc00";
|
||||
angle = 45;
|
||||
"in" = "oklch";
|
||||
}
|
||||
])
|
||||
])
|
||||
])
|
||||
];
|
||||
apply = configuration: config.david.programs.niri.configHelper.validated-config-for (inputs.niri-flake.lib.kdl.serialize.nodes configuration);
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
stylix.targets.noctalia-shell.enable = false;
|
||||
home.packages = [pkgs.app2unit];
|
||||
programs.noctalia-shell = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
plugins = toString ./plugins.json;
|
||||
settings =
|
||||
lib.recursiveUpdate
|
||||
(builtins.fromJSON (builtins.readFile ./settings.json))
|
||||
{
|
||||
general.avatarImage = "${config.home.homeDirectory}/.face";
|
||||
wallpaper.directory = "${config.home.homeDirectory}/${config.david.wallpaper.path}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue