Minor refactors

This commit is contained in:
Henrik Lissner 2020-10-23 20:55:08 -04:00
parent 14e2aada30
commit 7e6c26fd9c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395
2 changed files with 7 additions and 5 deletions

View file

@ -20,9 +20,11 @@ in {
nixpkgs.overlays = [ inputs.emacs-overlay.overlay ]; nixpkgs.overlays = [ inputs.emacs-overlay.overlay ];
user.packages = with pkgs; [ user.packages = with pkgs; [
## Doom dependencies ## Emacs itself
binutils # native-comp needs 'as', provided by this binutils # native-comp needs 'as', provided by this
emacsGcc # 28 + native-comp emacsGcc # 28 + native-comp
## Doom dependencies
git git
(ripgrep.override {withPCRE2 = true;}) (ripgrep.override {withPCRE2 = true;})
gnutls # for TLS connectivity gnutls # for TLS connectivity

View file

@ -3,17 +3,17 @@
with lib; with lib;
with lib.my; with lib.my;
{ {
options = { options = with types; {
user = mkOpt types.attrs {}; user = mkOpt attrs {};
home = with types; { home = {
file = mkOpt' attrs {} "Files to place directly in $HOME"; file = mkOpt' attrs {} "Files to place directly in $HOME";
configFile = mkOpt' attrs {} "Files to place in $XDG_CONFIG_HOME"; configFile = mkOpt' attrs {} "Files to place in $XDG_CONFIG_HOME";
dataFile = mkOpt' attrs {} "Files to place in $XDG_DATA_HOME"; dataFile = mkOpt' attrs {} "Files to place in $XDG_DATA_HOME";
}; };
env = mkOption { env = mkOption {
type = with types; attrsOf (oneOf [ str path (listOf (either str path)) ]); type = attrsOf (oneOf [ str path (listOf (either str path)) ]);
apply = mapAttrs apply = mapAttrs
(n: v: if isList v (n: v: if isList v
then concatMapStringsSep ":" (x: toString x) v then concatMapStringsSep ":" (x: toString x) v