Migrate .xinitrc file into Nix
This commit is contained in:
parent
219d032974
commit
9177cb3f9d
|
@ -18,6 +18,7 @@
|
|||
desktop = {
|
||||
copyq.enable = true;
|
||||
discord.enable = true;
|
||||
dwm.enable = true;
|
||||
espanso.enable = true;
|
||||
flameshot.enable = true;
|
||||
gtk.enable = true;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./copyq.nix
|
||||
./discord.nix
|
||||
./dwm.nix
|
||||
./espanso.nix
|
||||
./flameshot.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