feat(wrapping): introduce wrapped configurations
This commit is contained in:
parent
3892f6f79b
commit
2aa24ab2b9
22 changed files with 883 additions and 135 deletions
|
@ -1,16 +1,8 @@
|
|||
{...}: {
|
||||
imports = [
|
||||
./aliases.nix
|
||||
./direnv.nix
|
||||
./fonts.nix
|
||||
./git.nix
|
||||
./libvirt.nix
|
||||
./pipewire.nix
|
||||
./river.nix
|
||||
./ssh.nix
|
||||
./support.nix
|
||||
./users.nix
|
||||
./xonsh.nix
|
||||
./dconf.nix
|
||||
{lib, ...}: {
|
||||
imports = lib.pipe (builtins.readDir ./.) [
|
||||
(lib.filterAttrs
|
||||
(n: _v: n != "default.nix" && lib.last (lib.stringToCharacters n) != "~"))
|
||||
(lib.mapAttrsToList
|
||||
(n: _v: ./${n}))
|
||||
];
|
||||
}
|
||||
|
|
27
hosts/shared/niri.nix
Normal file
27
hosts/shared/niri.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.alqueva.wms.niri;
|
||||
in {
|
||||
options.alqueva.wms.niri = {
|
||||
enable = lib.mkEnableOption "niri";
|
||||
package = lib.mkPackageOption pkgs "niri" {};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
alqueva.support.wayland = true;
|
||||
|
||||
xdg.portal = {
|
||||
enable = true;
|
||||
configPackages = [cfg.package];
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gnome];
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
cfg.package
|
||||
];
|
||||
};
|
||||
}
|
|
@ -46,7 +46,5 @@ in {
|
|||
enableWlrSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -11,24 +11,21 @@ in {
|
|||
wayland = mkEnableOption "wayland support";
|
||||
};
|
||||
config = lib.mkIf cfg.wayland {
|
||||
xdg.portal = {
|
||||
xdg.portal = lib.mkDefault {
|
||||
enable = true;
|
||||
config.common = {
|
||||
default = [
|
||||
"gtk"
|
||||
"kde"
|
||||
];
|
||||
default = ["gtk"];
|
||||
};
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-kde
|
||||
];
|
||||
extraPortals = [pkgs.xdg-desktop-portal-gtk];
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
"NIXOS_OZONE_WL" = "1";
|
||||
"QT_QPA_PLATFORM" = "wayland";
|
||||
};
|
||||
|
||||
programs.waybar.enable = true;
|
||||
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
}
|
||||
|
|
47
hosts/shared/swaybg.nix
Normal file
47
hosts/shared/swaybg.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
cfg = config.alqueva.programs.swaybg;
|
||||
inherit (lib) types;
|
||||
in {
|
||||
options.alqueva.programs.swaybg = {
|
||||
enable = lib.mkEnableOption "swaybg";
|
||||
package = lib.mkPackageOption pkgs "swaybg" {};
|
||||
wallpaper = lib.mkOption {
|
||||
default = "";
|
||||
description = "The wallpaper you want to use with swaybg.";
|
||||
type = types.oneOf [types.str types.package types.path];
|
||||
};
|
||||
mode = lib.mkOption {
|
||||
default = "fill";
|
||||
description = "How you want the wallpaper to be displayed.";
|
||||
type = types.str;
|
||||
};
|
||||
extraServiceConfig = {
|
||||
default = {};
|
||||
description = "Extra settings you want to apply to the systemd service.";
|
||||
type = types.attrsOf types.anything;
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
systemd.user.services.swaybg = {
|
||||
inherit (cfg.package.meta) description;
|
||||
|
||||
wantedBy = ["graphical-session.target"];
|
||||
after = ["graphical-session-pre.target"];
|
||||
partOf = ["graphical-session.target"];
|
||||
|
||||
script = lib.getExe' cfg.package "swaybg";
|
||||
scriptArgs = "-i ${cfg.wallpaper} -m ${cfg.mode}";
|
||||
|
||||
serviceConfig = {
|
||||
Restart = "always";
|
||||
RestartSec = "5";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue