modularise home conf
This commit is contained in:
parent
b07d950147
commit
4477d0d4a2
23 changed files with 1152 additions and 855 deletions
51
home/programs/qtile.nix
Normal file
51
home/programs/qtile.nix
Normal file
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
palette-hex = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.palette;
|
||||
palette-shex = pkgs.lib.nix-rice.palette.toRGBShortHex pkgs.rice.palette;
|
||||
in {
|
||||
config.ezConf = {
|
||||
"qtile/autostart.sh" = ../dots/qtile/autostart.sh;
|
||||
};
|
||||
config.extraTarget = ["qtile-session.target"];
|
||||
config.xdg.configFile."qtile/config.py" = {
|
||||
enable = true;
|
||||
executable = true;
|
||||
onChange = "pkill -SIGUSR1 qtile";
|
||||
text = with palette-shex;
|
||||
with pkgs.rice; (builtins.replaceStrings
|
||||
[
|
||||
"#GAPS"
|
||||
"#BORDERWIDTH"
|
||||
"#BORDERFOCUS"
|
||||
"#BORDERCOL"
|
||||
"#FONTFACE"
|
||||
"#FONTSIZE"
|
||||
"#BGCOL"
|
||||
"#FGCOL"
|
||||
]
|
||||
[
|
||||
(builtins.toString borders.gaps_in)
|
||||
(builtins.toString borders.thickness)
|
||||
bright.yellow
|
||||
util.bg
|
||||
fonts.sans.name
|
||||
(builtins.toString fonts.sans.size)
|
||||
util.bg
|
||||
util.fg
|
||||
]
|
||||
(builtins.readFile ../dots/qtile/config.py));
|
||||
};
|
||||
|
||||
config.systemd.user.targets.qtile-session = {
|
||||
Unit = {
|
||||
BindsTo = ["graphical-session.target"];
|
||||
Wants = ["graphical-session-pre.target" "xdg-desktop-autostart.target"];
|
||||
After = ["graphical-session-pre.target"];
|
||||
Before = ["xdg-desktop-autostart.target"];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue