St: Difference between revisions
imported>Alexnortung added instructions to obtain hashes |
imported>Alexnortung Added notes on how to configure st when using dwm. |
||
| Line 141: | Line 141: | ||
})) | })) | ||
];</syntaxhighlight> | ];</syntaxhighlight> | ||
== Using DWM == | |||
However, this will not work for <code>dwm</code>. (Probably <code>services.xserver.windowManager.dwm</code> can only see the <code>dwm</code> in <code>pkgs</code>, not the one in <code>environment.systemPackages</code>.) But you can use an overlay, like this: | However, this will not work for <code>dwm</code>. (Probably <code>services.xserver.windowManager.dwm</code> can only see the <code>dwm</code> in <code>pkgs</code>, not the one in <code>environment.systemPackages</code>.) But you can use an overlay, like this: | ||
| Line 153: | Line 155: | ||
configFile = super.writeText "config.h" (builtins.readFile ./dwm-config.h); | configFile = super.writeText "config.h" (builtins.readFile ./dwm-config.h); | ||
postPatch = oldAttrs.postPatch or "" + "\necho 'Using own config file...'\n cp ${configFile} config.def.h"; | postPatch = oldAttrs.postPatch or "" + "\necho 'Using own config file...'\n cp ${configFile} config.def.h"; | ||
}); | |||
}) | |||
]; | |||
</syntaxhighlight> | |||
It should also be mentioned that the <code>st.overrideAttrs</code> should be added to the overlays when using <code>dwm</code> with dwm changes and st changes the overlay could look like this | |||
<syntaxhighlight lang="nix"> | |||
nixpkgs.overlays = [ | |||
(self: super: { | |||
dwm = super.dwm.overrideAttrs (oldAttrs: rec { | |||
patches = [ | |||
./path/to/my-dwm-patch.patch | |||
]; | |||
configFile = super.writeText "config.h" (builtins.readFile ./dwm-config.h); | |||
postPatch = oldAttrs.postPatch or "" + "\necho 'Using own config file...'\n cp ${configFile} config.def.h"; | |||
}); | |||
}) | |||
st = super.st.overrideAttrs (oldAttrs: rec { | |||
patches = [ | |||
./path/to/my-dwm-patch.patch | |||
]; | |||
configFile = super.writeText "config.h" (builtins.readFile ./st-config.h); | |||
postPatch = "${oldAttrs.postPatch}\ncp ${configFile} config.def.h\n" | |||
}); | }); | ||
}) | }) | ||