about summary refs log tree commit diff stats
path: root/home-manager
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--home-manager/default.nix5
-rw-r--r--home-manager/firefox/default.nix152
-rwxr-xr-xhome-manager/firefox/generate-extension.py41
-rwxr-xr-xhome-manager/firefox/scripts/unzip_mozlz4.py (renamed from home-manager/firefox/unzip_mozlz4.py)0
-rwxr-xr-xhome-manager/firefox/scripts/update_extensions20
-rw-r--r--home-manager/firefox/settings/extensions.json (renamed from home-manager/firefox/extensions.json)33
-rw-r--r--home-manager/firefox/settings/override.js2
-rw-r--r--home-manager/gammastep/default.nix6
-rw-r--r--home-manager/grades/default.nix6
-rw-r--r--home-manager/gtk/default.nix2
-rw-r--r--home-manager/keepassxc/default.nix5
-rw-r--r--home-manager/latexindent/default.nix10
-rw-r--r--home-manager/lf/default.nix88
-rw-r--r--home-manager/mako/default.nix4
-rw-r--r--home-manager/mpd/default.nix2
-rw-r--r--home-manager/neovim/default.nix10
-rw-r--r--home-manager/npm/.npmrc6
-rw-r--r--home-manager/npm/default.nix9
18 files changed, 208 insertions, 193 deletions
diff --git a/home-manager/default.nix b/home-manager/default.nix
index d559d35b..fb7358e2 100644
--- a/home-manager/default.nix
+++ b/home-manager/default.nix
@@ -4,12 +4,15 @@
   pkgs,
   home-manager,
   inputs,
+  user_js,
   ...
 }: let
   # TODO actually use this in the user config
   username = "soispha";
   homeDirectory = "/srv/home/${username}";
+
   configHome = "${homeDirectory}/.config";
+  dataHome = "${homeDirectory}/.local/share";
 in {
   imports = [
     #home-manager.nixosModules.home-manager
@@ -40,7 +43,7 @@ in {
     packages = [];
   };
   xdg = {
-    inherit configHome;
+    inherit configHome dataHome;
     enable = true;
   };
 }
diff --git a/home-manager/firefox/default.nix b/home-manager/firefox/default.nix
index af627a21..88fad227 100644
--- a/home-manager/firefox/default.nix
+++ b/home-manager/firefox/default.nix
@@ -5,17 +5,32 @@
   lib,
   stdenv,
   strip_js_comments,
+  generate_extensions,
   user_js,
+  system,
   ...
 }: let
-  user_js_override = "./settings/override.js";
-  user_js = pkgs.runCommand "user.js" {} ''
-    mkdir $out;
-    ${strip_js_comments}/bin "${user_js}/user.js" > $out/user.js;
-    cat ${user_js_override} >> $out/user.js;
-    sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user.js > $out/user.nix;
+  userChrome = builtins.readFile ./chrome/userChrome.css;
+
+  user_js_override = pkgs.writeText "user.override.js" (builtins.readFile ./settings/override.js);
+  user_js_nix = pkgs.runCommand "user.js" {} ''
+        mkdir $out;
+        cat "${user_js}/user.js" > $out/user.js;
+        cat "${user_js_override}" >> $out/user.js;
+
+        "${strip_js_comments.app.${system}.default.program}" $out/user.js > $out/user_clean.js;
+    #    echo "{" > $out/user.nix.tmp
+    #    sed 's/user_pref(\(.*\)",\(.*\));/\1" = \2;/' $out/user_clean.js >> $out/user.nix.tmp;
+    #    echo "}" >> $out/user.nix.tmp
+    #    awk '!/"_user.js.parrot"/' $out/user.nix.tmp >> $out/user.nix; # delete duplicate keys
   '';
 
+  extensions = builtins.map buildFirefoxXpiAddon (
+    lib.attrValues (
+      lib.importJSON ./settings/extensions.json
+    )
+  );
+
   # source: https://gitlab.com/rycee/nur-expressions/-/blob/master/pkgs/firefox-addons/default.nix
   buildFirefoxXpiAddon = {
     pname,
@@ -23,13 +38,13 @@
     addonId,
     url,
     sha256,
-    meta,
+#meta,
     ...
   }:
-    builtins.stdenv.mkDerivation {
+    pkgs.stdenv.mkDerivation {
       name = "${pname}-${version}";
 
-      inherit meta;
+#inherit meta;
 
       src = builtins.fetchurl {inherit url sha256;};
 
@@ -43,68 +58,64 @@
       '';
     };
 
-  settings =
-    pkgs.lib.recursiveUpdate
-    {
-      # Allow my custom css
-      "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
-
-      # might improve performance TODO
-      "gfx.webrender.all" = true;
-
-      # disable updates (pretty pointless with nix)
-      "extensions.update.autoUpdateDefault" = false;
-      "extensions.update.enabled" = false;
-      "app.update.channel" = "default";
-
-      "browser.ctrlTab.recentlyUsedOrder" = false;
-
-      "browser.download.useDownloadDir" = true;
-      "browser.download.dir" = "${config.user.soisha.home}/media/downloads";
-      "browser.download.folderList" = 2; # TODO
-      "browser.download.viewableInternally.typeWasRegistered.svg" = true;
-      "browser.download.viewableInternally.typeWasRegistered.webp" = true;
-      "browser.download.viewableInternally.typeWasRegistered.xml" = true;
-
-      # TODO what does this do?
-      "browser.search.widget.inNavBar" = true;
-
-      "browser.shell.checkDefaultBrowser" = false;
-      "browser.tabs.loadInBackground" = true;
-      "browser.urlbar.placeholderName" = "Brave";
-
-      "general.autoScroll" = true;
-
-      # Set the tabs and bookmarks
-      "browser.tabs.inTitlebar" = 1;
-      "browser.toolbars.bookmarks.visibility" = "always";
-
-      # Theme
-      "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
-      "extensions.extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
-
-      # highlight all entries when searching
-      "findbar.highlightAll" = true;
-
-      # TODO
-      #"extensions.webcompat.enable_picture_in_picture_overrides" = true;
-      #"extensions.webcompat.enable_shims" = true;
-      #"extensions.webcompat.perform_injections" = true;
-      #"extensions.webcompat.perform_ua_overrides" = true;
-
-      # onlykey / copied from a yubikey config
-      #"security.webauth.u2f" = true;
-      #"security.webauth.webauthn" = true;
-      #"security.webauth.webauthn_enable_softtoken" = true;
-      #"security.webauth.webauthn_enable_usbtoken" = true;
-    }
-    (builtins.readFile
-      "${user_js}/user.nix");
+  settings = {
+    # Allow my custom css
+    "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+
+    # might improve performance TODO
+    "gfx.webrender.all" = true;
+
+    # disable updates (pretty pointless with nix)
+    "extensions.update.autoUpdateDefault" = false;
+    "extensions.update.enabled" = false;
+    "app.update.channel" = "default";
+
+    "browser.ctrlTab.recentlyUsedOrder" = false;
+
+    "browser.download.useDownloadDir" = true;
+    "browser.download.dir" = "${config.home.homeDirectory}/media/downloads";
+    "browser.download.folderList" = 2; # TODO
+    "browser.download.viewableInternally.typeWasRegistered.svg" = true;
+    "browser.download.viewableInternally.typeWasRegistered.webp" = true;
+    "browser.download.viewableInternally.typeWasRegistered.xml" = true;
+
+    # TODO what does this do?
+    "browser.search.widget.inNavBar" = true;
+
+    "browser.shell.checkDefaultBrowser" = false;
+    "browser.tabs.loadInBackground" = true;
+    "browser.urlbar.placeholderName" = "Brave";
+
+    "general.autoScroll" = true;
+
+    # Set the tabs and bookmarks
+    "browser.tabs.inTitlebar" = 1;
+    "browser.toolbars.bookmarks.visibility" = "always";
+
+    # Theme
+    "extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
+    "extensions.extensions.activeThemeID" = "firefox-alpenglow@mozilla.org";
+
+    # highlight all entries when searching
+    "findbar.highlightAll" = true;
+
+    # TODO
+    #"extensions.webcompat.enable_picture_in_picture_overrides" = true;
+    #"extensions.webcompat.enable_shims" = true;
+    #"extensions.webcompat.perform_injections" = true;
+    #"extensions.webcompat.perform_ua_overrides" = true;
+
+    # onlykey / copied from a yubikey config
+    #"security.webauth.u2f" = true;
+    #"security.webauth.webauthn" = true;
+    #"security.webauth.webauthn_enable_softtoken" = true;
+    #"security.webauth.webauthn_enable_usbtoken" = true;
+  };
 in {
   home.packages = [
     pkgs.firefox-wayland
   ];
-  sessionVariables = {
+  home.sessionVariables = {
     # improve touch input & make scrolling smother
     MOZ_USE_XINPUT2 = "1";
     # improve wayland support
@@ -124,13 +135,13 @@ in {
   programs.firefox = {
     enable = true;
     package = pkgs.firefox;
-    extensions = builtins.map buildFirefoxXpiAddon (lib.attrValues (lib.importJSON ./extensions.json));
-    profile."default" = {
+    profiles."default" = {
+      inherit extensions;
       isDefault = true;
       id = 0;
       name = "default";
 
-      userChrome = builtins.readFile "./chrome/userChrome.css";
+      inherit userChrome;
 
       search = {
         default = "Brave Search";
@@ -215,6 +226,7 @@ in {
         }
       ];
       inherit settings;
+      extraConfig = builtins.readFile "${user_js_nix}/user.js";
     };
   };
 }
diff --git a/home-manager/firefox/generate-extension.py b/home-manager/firefox/generate-extension.py
deleted file mode 100755
index cfb73542..00000000
--- a/home-manager/firefox/generate-extension.py
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/env python
-# source: https://github.com/etu/nixconfig/blob/ba47d577c8bfb4a1c06927c34ece34118f4a0460/modules/graphical/firefox/generate.py
-
-from concurrent.futures import ThreadPoolExecutor
-import json
-import os
-import requests
-
-EXTENSIONS = sorted([
-    "darkreader",
-    "firenvim",
-    "keepassxc-browser",
-    "simple-tab-groups",
-])
-
-def index_ext(ext: str):
-    print(f"Indexing {ext}...")
-
-    resp = requests.get(f"https://addons.mozilla.org/api/v5/addons/addon/{ext}/").json()
-    rel = resp["current_version"]
-
-    if not rel["file"]["hash"].startswith("sha256:"):
-        raise ValueError("Unhandled hash type")
-
-    return {
-        "pname": ext,
-        "version": rel["version"],
-        "addonId": resp["guid"],
-        "url": rel["file"]["url"],
-        "sha256": rel["file"]["hash"],
-    }
-
-if __name__ == "__main__":
-    outfile = os.path.dirname(os.path.realpath(__file__)) + "/extensions.json"
-
-    with ThreadPoolExecutor() as e:
-        extensions = {ext: e.submit(index_ext, ext) for ext in EXTENSIONS}
-        extensions = {k: v.result() for k, v in extensions.items()}
-
-    with open(outfile, "w") as f:
-        json.dump(extensions, f, indent=2)
diff --git a/home-manager/firefox/unzip_mozlz4.py b/home-manager/firefox/scripts/unzip_mozlz4.py
index 311fd214..311fd214 100755
--- a/home-manager/firefox/unzip_mozlz4.py
+++ b/home-manager/firefox/scripts/unzip_mozlz4.py
diff --git a/home-manager/firefox/scripts/update_extensions b/home-manager/firefox/scripts/update_extensions
new file mode 100755
index 00000000..97f7c0ba
--- /dev/null
+++ b/home-manager/firefox/scripts/update_extensions
@@ -0,0 +1,20 @@
+#!/bin/sh
+# shellcheck disable=SC2086
+# shellcheck source=/dev/null
+. ~/.local/lib/shell/lib
+
+tmp=$(mktmp)
+cat << EOF > $tmp
+    darkreader
+    firenvim
+    keepassxc-browser
+    simple-tab-groups
+    ublock-origin
+EOF
+
+
+nix shell git+https://codeberg.org/ene/generate_moz_extension.git -c generate_extensions $(cat $tmp) > "$(dirname $0)"/../settings/extensions.json
+
+
+
+if [ -d /tmp/LIB_FILE_TEMP_DIR/ ];then rm -r /tmp/LIB_FILE_TEMP_DIR/; fi
diff --git a/home-manager/firefox/extensions.json b/home-manager/firefox/settings/extensions.json
index a7673612..057810bc 100644
--- a/home-manager/firefox/extensions.json
+++ b/home-manager/firefox/settings/extensions.json
@@ -1,30 +1,37 @@
 {
   "darkreader": {
-    "pname": "darkreader",
-    "version": "4.9.62",
     "addonId": "addon@darkreader.org",
+    "pname": "darkreader",
+    "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc",
     "url": "https://addons.mozilla.org/firefox/downloads/file/4053589/darkreader-4.9.62.xpi",
-    "sha256": "sha256:e537a2cee45ed7c26f79ecd3ed362620e3f00d24c158532a58e163a63a3d60cc"
+    "version": "4.9.62"
   },
   "firenvim": {
-    "pname": "firenvim",
-    "version": "0.2.14",
     "addonId": "firenvim@lacamb.re",
+    "pname": "firenvim",
+    "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6",
     "url": "https://addons.mozilla.org/firefox/downloads/file/4026386/firenvim-0.2.14.xpi",
-    "sha256": "sha256:a8c495a59e30eaabbb3fcd188db9b5e28b40bffefe41a3f0fa22ecc58c80c2b6"
+    "version": "0.2.14"
   },
   "keepassxc-browser": {
-    "pname": "keepassxc-browser",
-    "version": "1.8.4",
     "addonId": "keepassxc-browser@keepassxc.org",
+    "pname": "keepassxc-browser",
+    "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719",
     "url": "https://addons.mozilla.org/firefox/downloads/file/4045866/keepassxc_browser-1.8.4.xpi",
-    "sha256": "sha256:cc39aa058cb8915cfc88424e2e1cebe3ccfc3f95d7bddb2abd0c4905d2b17719"
+    "version": "1.8.4"
   },
   "simple-tab-groups": {
-    "pname": "simple-tab-groups",
-    "version": "4.7.2.1",
     "addonId": "simple-tab-groups@drive4ik",
+    "pname": "simple-tab-groups",
+    "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4",
     "url": "https://addons.mozilla.org/firefox/downloads/file/3873608/simple_tab_groups-4.7.2.1.xpi",
-    "sha256": "sha256:75077589098ca62c00b86cf9554c6120bf8dc04c5f916fe26f84915f5147b2a4"
+    "version": "4.7.2.1"
+  },
+  "ublock-origin": {
+    "addonId": "uBlock0@raymondhill.net",
+    "pname": "ublock-origin",
+    "sha256": "sha256:6bf8af5266353fab5eabdc7476de026e01edfb7901b0430c5e539f6791f1edc8",
+    "url": "https://addons.mozilla.org/firefox/downloads/file/4047353/ublock_origin-1.46.0.xpi",
+    "version": "1.46.0"
   }
-}
\ No newline at end of file
+}
diff --git a/home-manager/firefox/settings/override.js b/home-manager/firefox/settings/override.js
index 1f92735b..ca03e8ed 100644
--- a/home-manager/firefox/settings/override.js
+++ b/home-manager/firefox/settings/override.js
@@ -56,7 +56,7 @@ user_pref("browser.safebrowsing.downloads.remote.enabled", true); // 0403
 user_pref("network.prefetch-next", true); // 0601
 
 // enable ipv6 because the rest of the system uses it
-user_pref("network.dns.disableIPv6", true); // 0701
+user_pref("network.dns.disableIPv6", false); // 0701
 
 // TRR only
 user_pref("network.trr.mode", 3); // 0710
diff --git a/home-manager/gammastep/default.nix b/home-manager/gammastep/default.nix
index 8ed5d54c..79b027cd 100644
--- a/home-manager/gammastep/default.nix
+++ b/home-manager/gammastep/default.nix
@@ -1,10 +1,10 @@
-{config, ...}: {
+{config, lib, ...}: {
   services.gammastep = {
     enable = true;
     settings = {
       general = {
-        temp-day = 1300;
-        temp-night = 1300;
+        temp-day = lib.mkForce 1300;
+        temp-night = lib.mkForce 1300;
         gamma = "0.8:0.8:0.8";
         fade = 0;
         adjustment-method = "wayland";
diff --git a/home-manager/grades/default.nix b/home-manager/grades/default.nix
index a63c6320..22c5a6d4 100644
--- a/home-manager/grades/default.nix
+++ b/home-manager/grades/default.nix
@@ -1,7 +1,3 @@
 {config, ...}: {
-  xdg.configFile."grades/config.yaml" = {
-    enable = true;
-    target = "grades/config.yaml";
-    source = "./config.yaml";
-  };
+  xdg.configFile."grades/config.yaml".source = ./config.yaml;
 }
diff --git a/home-manager/gtk/default.nix b/home-manager/gtk/default.nix
index de78e663..a3f197d2 100644
--- a/home-manager/gtk/default.nix
+++ b/home-manager/gtk/default.nix
@@ -5,7 +5,7 @@
   stdenv,
   ...
 }: {
-  programs.gkt = {
+  gtk = {
     enable = true;
     theme = {
       package = pkgs.nordic;
diff --git a/home-manager/keepassxc/default.nix b/home-manager/keepassxc/default.nix
index 3cc7ae1a..152611c1 100644
--- a/home-manager/keepassxc/default.nix
+++ b/home-manager/keepassxc/default.nix
@@ -3,10 +3,7 @@
   pkgs,
   ...
 }: {
-  xdg.configFile."keepassxc/keepassxc.ini" = {
-    target = "keepassxc/keepassxc.ini";
-    source = "./keepasxc.ini";
-  };
+  xdg.configFile."keepassxc/keepassxc.ini".source = ./keepassxc.ini;
 }
 # vim: ts=2
 
diff --git a/home-manager/latexindent/default.nix b/home-manager/latexindent/default.nix
index fabf4bd3..10bae481 100644
--- a/home-manager/latexindent/default.nix
+++ b/home-manager/latexindent/default.nix
@@ -3,14 +3,8 @@
   pkgs,
   ...
 }: {
-  xdg.configFile."latexindent/indentconfig.yaml" = {
-    target = "latexindent/indentconfig.yaml";
-    source = "./indentconfig.yaml";
-  };
-  xdg.configFile."latexindent/mysettings.yaml" = {
-    target = "latexindent/mysettings.yaml";
-    source = "./mysettings.yaml";
-  };
+  xdg.configFile."latexindent/indentconfig.yaml".source = ./indentconfig.yaml;
+  xdg.configFile."latexindent/mysettings.yaml".source = ./mysettings.yaml;
 }
 # vim: ts=2
 
diff --git a/home-manager/lf/default.nix b/home-manager/lf/default.nix
index 364d839e..e27b040c 100644
--- a/home-manager/lf/default.nix
+++ b/home-manager/lf/default.nix
@@ -12,45 +12,39 @@
   wait = file:
     "!{{" + builtins.readFile "${file}" + "}}"; # adds a prompt after the command has run
 in {
-  xdg.configFile."lf/icons" = {
-    target = "lf/icons";
-    source = "./icons";
-  };
-  xdg.configFile."lf/colors" = {
-    target = "lf/colors";
-    source = "./colors";
-  };
+  xdg.configFile."lf/icons".source = ./icons;
+  xdg.configFile."lf/colors".source = ./colors;
 
   programs.lf = {
     enable = true;
 
     commands = {
-      help = shell "./cmds/help.sh";
-      open = shell "./cmds/open.sh";
-      mk_dir = pipe "./cmds/mk_dir.sh";
-      mk_scr = shell "./cmds/mk_scr.sh";
-      mk_file = shell "./cmds/mk_file.sh";
-      chmod = pipe "./cmds/chmod.sh";
-      mk_ln = shell "./cmds/mk_ln.sh"; # TODO could be pipe, right?
-      sudo_mk_file = shell "./cmds/sudo_mk_file.sh";
-      set_wall_paper = pipe "./cmds/set_wall_paper.sh";
-      fzf_jump = shell "./cmds/fzf_jump.sh";
-      broot_jump = shell "./cmds/broot_jump.sh";
-      open_config = shell "./cmds/open_config.sh";
-
-      dragon = pipe "./cmds/dragon.sh";
-      dragon_stay = pipe "./cmds/dragon_stay.sh";
-      dragon_individual = pipe "./cmds/dragon_individual.sh";
-      dl_file = pipe "./cmds/dl_file.sh";
-
-      unarchive = pipe "./cmds/unarchive.sh";
-      archive = pipe "./cmds/archive.sh";
-
-      trash = pipe "./cmds/trash.sh";
-      clear_trash = pipe "./cmds/clear_trash.sh";
-      restore_trash = shell "./cmds/restore_trash.sh";
-
-      stripspace = pipe "./cmds/stripspace.sh";
+      help = shell ./cmds/help.sh;
+      open = shell ./cmds/open.sh;
+      mk_dir = pipe ./cmds/mk_dir.sh;
+      mk_scr = shell ./cmds/mk_scr.sh;
+      mk_file = shell ./cmds/mk_file.sh;
+      chmod = pipe ./cmds/chmod.sh;
+      mk_ln = shell ./cmds/mk_ln.sh; # TODO could be pipe, right?
+      sudo_mk_file = shell ./cmds/sudo_mk_file.sh;
+      set_wall_paper = pipe ./cmds/set_wall_paper.sh;
+      fzf_jump = shell ./cmds/fzf_jump.sh;
+      broot_jump = shell ./cmds/broot_jump.sh;
+      open_config = shell ./cmds/open_config.sh;
+
+      dragon = pipe ./cmds/dragon.sh;
+      dragon_stay = pipe ./cmds/dragon_stay.sh;
+      dragon_individual = pipe ./cmds/dragon_individual.sh;
+      dl_file = pipe ./cmds/dl_file.sh;
+
+      unarchive = pipe ./cmds/unarchive.sh;
+      archive = pipe ./cmds/archive.sh;
+
+      trash = pipe ./cmds/trash.sh;
+      clear_trash = pipe ./cmds/clear_trash.sh;
+      restore_trash = shell ./cmds/restore_trash.sh;
+
+      stripspace = pipe ./cmds/stripspace.sh;
     };
     keybindings = {
       # Remove some defaults
@@ -172,27 +166,35 @@ in {
 
       gt = "cd /tmp";
     };
-    previewer = {
-      keybinding = "i";
-      source = "ctpv";
-    };
+# TODO add ctpv, if it gets merged
+#   previewer = {
+#      keybinding = "i";
+#      source = pkgs.ctpv;
+#    };
     settings = {
-      cleaner = "ctpvclear";
-      autoquit = true; # quit the server, if no clients are left
+      # TODO this needs to be added to nixos:
+      #autoquit = true; # quit the server, if no clients are left
+      #dirpreviews = true; # preview for directories
+
       dircounts = true; # count things in directories TODO this has performance impact
-      dirpreviews = true; # preview for directories
       drawbox = true;
       errorfmt = "\\033[1;91m==> ERROR:\\033[0m\\033[1;93m%s\\033[0m";
       hidden = true; # show hidden files
       icons = true;
       ifs =  "\n"; # internal field separator for shell commands
-      info = ["size"]; # show the size of a directory
+      info = "size"; # show the size of a directory
       shell = "sh";
-      shellopts = ["-e" "-u"]; # e: exit on error; u: error for unset variables
+      shellopts = "-e -u"; # e: exit on error; u: error for unset variables
     };
+    # TODO remove auto quit, if it has been added
+    # TODO add ctpv, if it gets merged
     extraConfig = ''
       &ctpv -s $id
       &ctpvquit $id
+      set cleaner = {pkgs.ctpv}
+
+      set autoquit = true
+      set dirpreviews = true
     '';
   };
 }
diff --git a/home-manager/mako/default.nix b/home-manager/mako/default.nix
index 54989c66..9b9e01a0 100644
--- a/home-manager/mako/default.nix
+++ b/home-manager/mako/default.nix
@@ -5,7 +5,7 @@
 }: {
   programs.mako = {
     enable = true;
-    backgroudColor = "#2e3440";
+    backgroundColor = "#2e3440";
     borderColor = "#88c0d0";
     borderRadius = 25;
     borderSize = 2;
@@ -14,7 +14,7 @@
     width = 500;
     height = 500;
     icons = true;
-    ignore-timeout = true;
+    ignoreTimeout = true;
     layer = "overlay";
     markup = true; # TODO
     maxIconSize = 64;
diff --git a/home-manager/mpd/default.nix b/home-manager/mpd/default.nix
index 99db3707..ea535415 100644
--- a/home-manager/mpd/default.nix
+++ b/home-manager/mpd/default.nix
@@ -3,7 +3,7 @@
   pkgs,
   ...
 }: let
-  dataDir = "$XDG_DATA_HOME/mpd";
+  dataDir = "${config.xdg.dataHome}/mpd";
 in {
 services.mpd = {
     enable = true;
diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix
new file mode 100644
index 00000000..8074f19d
--- /dev/null
+++ b/home-manager/neovim/default.nix
@@ -0,0 +1,10 @@
+{
+  config,
+  pkgs,
+  neovim_config,
+  ...
+}: {
+  xdg.configFile."neovim".source = neovim_config;
+}
+# vim: ts=2
+
diff --git a/home-manager/npm/.npmrc b/home-manager/npm/.npmrc
new file mode 100644
index 00000000..d0d846bd
--- /dev/null
+++ b/home-manager/npm/.npmrc
@@ -0,0 +1,6 @@
+scripts-prepend-node-path=true
+node_gyp=
+prefix=${XDG_DATA_HOME}/npm
+cache=${XDG_CACHE_HOME}/npm
+tmp=${XDG_RUNTIME_DIR}/npm
+init-module=${XDG_CONFIG_HOME}/npm/config/npm-init.js
diff --git a/home-manager/npm/default.nix b/home-manager/npm/default.nix
new file mode 100644
index 00000000..d12ce73b
--- /dev/null
+++ b/home-manager/npm/default.nix
@@ -0,0 +1,9 @@
+{
+  config,
+  pkgs,
+  ...
+}: {
+  xdg.configFile."npm/.npmrc".source = ./.npmrc;
+}
+# vim: ts=2
+