Migrate .xinitrc file into Nix
This commit is contained in:
parent
219d032974
commit
9177cb3f9d
|
@ -18,6 +18,7 @@
|
||||||
desktop = {
|
desktop = {
|
||||||
copyq.enable = true;
|
copyq.enable = true;
|
||||||
discord.enable = true;
|
discord.enable = true;
|
||||||
|
dwm.enable = true;
|
||||||
espanso.enable = true;
|
espanso.enable = true;
|
||||||
flameshot.enable = true;
|
flameshot.enable = true;
|
||||||
gtk.enable = true;
|
gtk.enable = true;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./copyq.nix
|
./copyq.nix
|
||||||
./discord.nix
|
./discord.nix
|
||||||
|
./dwm.nix
|
||||||
./espanso.nix
|
./espanso.nix
|
||||||
./flameshot.nix
|
./flameshot.nix
|
||||||
./gtk.nix
|
./gtk.nix
|
||||||
|
|
26
nix/modules/home-manager/features/desktop/dwm.nix
Normal file
26
nix/modules/home-manager/features/desktop/dwm.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options.features.desktop.dwm.enable = mkEnableOption "Enable dwm";
|
||||||
|
|
||||||
|
config = mkIf config.features.desktop.dwm.enable {
|
||||||
|
home.file.".xinitrc".text = ''
|
||||||
|
systemctl --user import-environment DISPLAY
|
||||||
|
|
||||||
|
${pkgs.autorandr}/bin/autorandr --change
|
||||||
|
|
||||||
|
${pkgs.copyq}/bin/copyq &
|
||||||
|
|
||||||
|
systemctl --user start dwm-status &
|
||||||
|
|
||||||
|
exec ${pkgs.dwm}/bin/dwm
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue