mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-01-21 18:41:34 +01:00
Modularize the DE config
This commit is contained in:
parent
38a5b3cbb1
commit
4b650721b0
11 changed files with 285 additions and 252 deletions
|
|
@ -1,23 +1,16 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
cfg = config.myConfig.de;
|
||||
in {
|
||||
{lib, ...}: {
|
||||
imports = [
|
||||
./qtile.nix
|
||||
./hyprland
|
||||
|
||||
./theming.nix
|
||||
./rofi
|
||||
./tray.nix
|
||||
./waybar.nix
|
||||
./hypridlelock.nix
|
||||
];
|
||||
|
||||
options.myConfig.de = {
|
||||
theming.enable = lib.mkEnableOption "";
|
||||
|
||||
wallpaper = lib.mkOption {
|
||||
type = lib.types.path;
|
||||
};
|
||||
|
||||
widget = {
|
||||
backlight = {
|
||||
enable = lib.mkEnableOption "";
|
||||
|
|
@ -27,87 +20,5 @@ in {
|
|||
};
|
||||
battery.enable = lib.mkEnableOption "";
|
||||
};
|
||||
|
||||
tray = {
|
||||
syncthing.enable = lib.mkEnableOption "";
|
||||
networkmanager.enable = lib.mkEnableOption "";
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkMerge [
|
||||
(lib.mkIf cfg.theming.enable {
|
||||
dconf.settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
gtk2.configLocation = "${config.xdg.configHome}/gtk-2.0/gtkrc";
|
||||
|
||||
theme.name = "Adwaita-dark";
|
||||
theme.package = pkgs.gnome.gnome-themes-extra;
|
||||
|
||||
iconTheme.name = "Adwaita";
|
||||
iconTheme.package = pkgs.gnome.adwaita-icon-theme;
|
||||
|
||||
font.name = "Open Sans";
|
||||
font.package = pkgs.open-sans;
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
platformTheme = "gtk";
|
||||
style.name = "adwaita-dark";
|
||||
style.package = pkgs.adwaita-qt;
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Bibata-Original-Classic";
|
||||
package = pkgs.bibata-cursors;
|
||||
size = 24;
|
||||
gtk.enable = true;
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.tray.syncthing.enable {
|
||||
home.packages = [pkgs.syncthingtray-minimal];
|
||||
|
||||
systemd.user.services = {
|
||||
syncthingtray = {
|
||||
Unit = {
|
||||
Description = "Syncthingtray";
|
||||
Requires = ["tray.target"];
|
||||
After = ["graphical-session-pre.target" "tray.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe' pkgs.syncthingtray-minimal "syncthingtray"} --wait";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
|
||||
(lib.mkIf cfg.tray.networkmanager.enable {
|
||||
home.packages = [pkgs.networkmanagerapplet];
|
||||
|
||||
systemd.user.services = {
|
||||
nm-applet = {
|
||||
Unit = {
|
||||
Description = "Networkmanager-applet";
|
||||
Requires = ["tray.target"];
|
||||
After = ["graphical-session-pre.target" "tray.target"];
|
||||
PartOf = ["graphical-session.target"];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${lib.getExe pkgs.networkmanagerapplet}";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = ["graphical-session.target"];
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue