fix: Fix polkit and qt configuration
This commit is contained in:
parent
b4c3dfec42
commit
8019bc7003
5 changed files with 705 additions and 751 deletions
|
|
@ -1,10 +1,4 @@
|
|||
{
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs.niri-flake.lib.kdl) node leaf flag;
|
||||
in {
|
||||
{config, ...}: {
|
||||
david.programs.niri = {
|
||||
waybar.settings = let
|
||||
cfg = config.david.programs.niri.waybar;
|
||||
|
|
@ -20,25 +14,5 @@ in {
|
|||
];
|
||||
};
|
||||
};
|
||||
extraConfig = let
|
||||
output = node "output";
|
||||
in [
|
||||
(
|
||||
output
|
||||
["eDP-1"]
|
||||
[
|
||||
(leaf "mode" ["1920x1200@60.018"])
|
||||
(leaf "scale" [1.0])
|
||||
(flag "focus-at-startup")
|
||||
(leaf "position" [
|
||||
{
|
||||
x = 0;
|
||||
y = 0;
|
||||
}
|
||||
])
|
||||
(leaf "transform" ["normal"])
|
||||
]
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,5 @@ in {
|
|||
}
|
||||
];
|
||||
};
|
||||
extraConfig = [];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,9 +3,10 @@
|
|||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
osConfig ? null,
|
||||
osConfig ? (throw "Trying to access osConfig, the home-manager module is not being used in the nixos module"),
|
||||
...
|
||||
}: let
|
||||
}: {
|
||||
config.david.programs.niri.config = let
|
||||
inherit (lib) getExe getExe';
|
||||
inherit
|
||||
(inputs.niri-flake.lib.kdl)
|
||||
|
|
@ -40,7 +41,7 @@
|
|||
cliphist = getExe' pkgs.cliphist "cliphist";
|
||||
cliphist-fuzzel-img = getExe' pkgs.cliphist "cliphist-fuzzel-img";
|
||||
wl-clip-persist = getExe pkgs.wl-clip-persist;
|
||||
in
|
||||
in
|
||||
(
|
||||
let
|
||||
spawn = leaf "spawn";
|
||||
|
|
@ -494,7 +495,6 @@ in
|
|||
waypaper
|
||||
"--restore"
|
||||
])
|
||||
(spawn-at-startup [polkit-kde-agent])
|
||||
(spawn-at-startup [
|
||||
wl-paste
|
||||
"--watch"
|
||||
|
|
@ -705,4 +705,5 @@ in
|
|||
(leaf "place-within-backdrop" [true])
|
||||
])
|
||||
] # layer-rule
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,13 +3,15 @@
|
|||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
osConfig ? null,
|
||||
osConfig ? (throw "Trying to access osConfig, the home-manager module is not being used in the nixos module"),
|
||||
options,
|
||||
...
|
||||
} @ args: let
|
||||
}: let
|
||||
cfg = config.david.programs.niri;
|
||||
niri = osConfig.programs.niri.package;
|
||||
in {
|
||||
imports = [
|
||||
./config.nix
|
||||
];
|
||||
options = {
|
||||
david.programs.niri = {
|
||||
enable =
|
||||
|
|
@ -17,7 +19,7 @@ in {
|
|||
// {
|
||||
default = osConfig.youthlic.gui.enabled == "niri";
|
||||
};
|
||||
extraConfig = lib.mkOption {
|
||||
config = lib.mkOption {
|
||||
type = inputs.niri-flake.lib.kdl.types.kdl-document;
|
||||
};
|
||||
wluma.extraSettings = lib.mkOption {
|
||||
|
|
@ -42,40 +44,23 @@ in {
|
|||
};
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.enable {
|
||||
home.packages =
|
||||
(with pkgs; [
|
||||
home.packages = with pkgs; [
|
||||
swaynotificationcenter
|
||||
kdePackages.polkit-kde-agent-1
|
||||
wl-clipboard
|
||||
cliphist
|
||||
swayimg
|
||||
seahorse
|
||||
])
|
||||
++ [niri];
|
||||
qt = {
|
||||
enable = true;
|
||||
};
|
||||
xdg.portal = {
|
||||
configPackages = [niri];
|
||||
enable = true;
|
||||
extraPortals = lib.mkIf (
|
||||
!niri.cargoBuildNoDefaultFeatures || builtins.elem "xdp-gnome-screencast" niri.cargoBuildFeatures
|
||||
) [pkgs.xdg-desktop-portal-gnome];
|
||||
};
|
||||
];
|
||||
xdg.configFile = let
|
||||
qtctConf =
|
||||
''
|
||||
qtctConf = ''
|
||||
[Appearance]
|
||||
standard_dialogs=xdgdesktopportal
|
||||
''
|
||||
+ lib.optionalString (config.qt.style ? name) ''
|
||||
style=${config.qt.style.name}
|
||||
'';
|
||||
in {
|
||||
"qt5ct/qt5ct.conf" = lib.mkForce {
|
||||
"qt5ct/qt5ct.conf" = {
|
||||
text = qtctConf;
|
||||
};
|
||||
"qt6ct/qt6ct.conf" = lib.mkForce {
|
||||
"qt6ct/qt6ct.conf" = {
|
||||
text = qtctConf;
|
||||
};
|
||||
};
|
||||
|
|
@ -95,9 +80,7 @@ in {
|
|||
kanshi.enable = true;
|
||||
};
|
||||
programs.niri = {
|
||||
config =
|
||||
(lib.toList (import ./config.nix (args // {inherit pkgs;}))) ++ (lib.toList cfg.extraConfig);
|
||||
package = niri;
|
||||
inherit (cfg) config;
|
||||
};
|
||||
})
|
||||
(lib.mkIf (!cfg.enable) {
|
||||
|
|
|
|||
|
|
@ -11,12 +11,11 @@ in {
|
|||
};
|
||||
};
|
||||
config = lib.mkIf (cfg.enabled == "niri") {
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "qt5ct";
|
||||
};
|
||||
# Enabled to support trash of nautilus
|
||||
services.gvfs.enable = true;
|
||||
|
||||
systemd.user.services.niri-flake-polkit.serviceConfig.ExecStart = lib.mkForce "${pkgs.mate.mate-polkit}/libexec/polkit-mate-authentication-agent-1";
|
||||
|
||||
environment = {
|
||||
pathsToLink = ["share/thumbnailers"];
|
||||
systemPackages = with pkgs; [
|
||||
|
|
@ -26,8 +25,6 @@ in {
|
|||
libheif.out
|
||||
|
||||
bluez
|
||||
kdePackages.qt6ct
|
||||
libsForQt5.qt5ct
|
||||
xwayland-satellite-unstable
|
||||
evince
|
||||
];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue