diff options
Diffstat (limited to '')
-rw-r--r-- | flake.lock | 178 | ||||
-rw-r--r-- | flake.nix | 11 | ||||
-rw-r--r-- | home-manager/default.nix | 5 | ||||
-rw-r--r-- | home-manager/firefox/default.nix | 152 | ||||
-rwxr-xr-x | home-manager/firefox/generate-extension.py | 41 | ||||
-rwxr-xr-x | home-manager/firefox/scripts/unzip_mozlz4.py (renamed from home-manager/firefox/unzip_mozlz4.py) | 0 | ||||
-rwxr-xr-x | home-manager/firefox/scripts/update_extensions | 20 | ||||
-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.js | 2 | ||||
-rw-r--r-- | home-manager/gammastep/default.nix | 6 | ||||
-rw-r--r-- | home-manager/grades/default.nix | 6 | ||||
-rw-r--r-- | home-manager/gtk/default.nix | 2 | ||||
-rw-r--r-- | home-manager/keepassxc/default.nix | 5 | ||||
-rw-r--r-- | home-manager/latexindent/default.nix | 10 | ||||
-rw-r--r-- | home-manager/lf/default.nix | 88 | ||||
-rw-r--r-- | home-manager/mako/default.nix | 4 | ||||
-rw-r--r-- | home-manager/mpd/default.nix | 2 | ||||
-rw-r--r-- | home-manager/neovim/default.nix | 10 | ||||
-rw-r--r-- | home-manager/npm/.npmrc | 6 | ||||
-rw-r--r-- | home-manager/npm/default.nix | 9 |
20 files changed, 340 insertions, 250 deletions
diff --git a/flake.lock b/flake.lock index e68df48b..aa5caffa 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,29 @@ { "nodes": { + "crane": { + "inputs": { + "flake-compat": "flake-compat", + "flake-utils": "flake-utils", + "nixpkgs": [ + "strip_js_comments", + "nixpkgs" + ], + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1675902425, + "narHash": "sha256-ASv/7bZIoP/2FON+RNFYYUlmpleZAjKKb4XF1Pmhu4g=", + "owner": "ipetkov", + "repo": "crane", + "rev": "8c34e5ecadc691dd64b31b9317eb35d7cdaa636b", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -16,6 +40,36 @@ "type": "github" } }, + "flake-utils": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "locked": { + "lastModified": 1667395993, + "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -24,11 +78,11 @@ "utils": "utils" }, "locked": { - "lastModified": 1675462931, - "narHash": "sha256-JiOUSERBtA1lN/s9YTKGZoZ3XUicHDwr+C8swaPSh3M=", + "lastModified": 1675935446, + "narHash": "sha256-WajulTn7QdwC7QuXRBavrANuIXE5z+08EdxdRw1qsNs=", "owner": "nix-community", "repo": "home-manager", - "rev": "e2c1756e3ae001ca8696912016dd31cb1503ccf3", + "rev": "2dce7f1a55e785a22d61668516df62899278c9e4", "type": "github" }, "original": { @@ -38,32 +92,29 @@ "type": "github" } }, - "naersk": { - "inputs": { - "nixpkgs": "nixpkgs_2" - }, + "neovim_config": { + "flake": false, "locked": { - "lastModified": 1671096816, - "narHash": "sha256-ezQCsNgmpUHdZANDCILm3RvtO1xH8uujk/+EqNvzIOg=", - "owner": "nmattia", - "repo": "naersk", - "rev": "d998160d6a076cfe8f9741e56aeec7e267e3e114", - "type": "github" + "lastModified": 1676218383, + "narHash": "sha256-D0n+l4YdhbgTYXFMJzpx+ictrSaJazkXllnyucudRRg=", + "ref": "refs/heads/prime", + "rev": "2a0ea36911faa82d4a546fd64fa62b994d7fb7ca", + "revCount": 1, + "type": "git", + "url": "https://codeberg.org/ene/neovim-config.git" }, "original": { - "owner": "nmattia", - "ref": "master", - "repo": "naersk", - "type": "github" + "type": "git", + "url": "https://codeberg.org/ene/neovim-config.git" } }, "nixpkgs": { "locked": { - "lastModified": 1675362331, - "narHash": "sha256-VmcnKPj5gJLxWK7Bxlhg2LoQvhKRss7Ax+uoFjd3qKY=", + "lastModified": 1676110339, + "narHash": "sha256-kOS/L8OOL2odpCOM11IevfHxcUeE0vnZUQ74EOiwXcs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a100acd7bbf105915b0004427802286c37738fef", + "rev": "e5530aba13caff5a4f41713f1265b754dc2abfd8", "type": "github" }, "original": { @@ -73,43 +124,57 @@ "type": "github" } }, - "nixpkgs_2": { - "locked": { - "lastModified": 1675879502, - "narHash": "sha256-pbgIW5VrIk00rKrhBvuMEcKP8XUuB39GYf9lHmrrOGc=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "54ee2f301fa534cf0b0a20e0ce44152755e2f8a5", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, "root": { "inputs": { "home-manager": "home-manager", + "neovim_config": "neovim_config", "nixpkgs": "nixpkgs", "strip_js_comments": "strip_js_comments", "user_js": "user_js" } }, + "rust-overlay": { + "inputs": { + "flake-utils": [ + "strip_js_comments", + "crane", + "flake-utils" + ], + "nixpkgs": [ + "strip_js_comments", + "crane", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1675391458, + "narHash": "sha256-ukDKZw922BnK5ohL9LhwtaDAdCsJL7L6ScNEyF1lO9w=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "383a4acfd11d778d5c2efcf28376cbd845eeaedf", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "strip_js_comments": { "inputs": { - "flake-compat": "flake-compat", - "naersk": "naersk", + "crane": "crane", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ], - "utils": "utils_2" + "tree_sitter_js": "tree_sitter_js" }, "locked": { - "lastModified": 1676105952, - "narHash": "sha256-yCeS5nxOH1TZNbUOo2sd06Emy0Ori2ZJO5XdnxtDfGY=", + "lastModified": 1676149199, + "narHash": "sha256-Yitp7KDJfL1xPUeJwoBLNbUJlt03yvC3SsyA8FE1PMA=", "ref": "refs/heads/prime", - "rev": "6e0b1effc6ad82629e09de3938e905a47056ef47", - "revCount": 3, + "rev": "1be9cbf4b1a58dbc5164dfb4ddaa862488f7b42d", + "revCount": 9, "type": "git", "url": "https://codeberg.org/ene/strip_js_comments.git" }, @@ -118,6 +183,22 @@ "url": "https://codeberg.org/ene/strip_js_comments.git" } }, + "tree_sitter_js": { + "flake": false, + "locked": { + "lastModified": 1674585307, + "narHash": "sha256-2SAJBnY8pmynGqB8OVqHeeAKovskO+C/XiJbLTKSlcM=", + "owner": "tree-sitter", + "repo": "tree-sitter-javascript", + "rev": "15e85e80b851983fab6b12dce5a535f5a0df0f9c", + "type": "github" + }, + "original": { + "owner": "tree-sitter", + "repo": "tree-sitter-javascript", + "type": "github" + } + }, "user_js": { "flake": false, "locked": { @@ -148,21 +229,6 @@ "repo": "flake-utils", "type": "github" } - }, - "utils_2": { - "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 0ff5d4b4..dd44e2f4 100644 --- a/flake.nix +++ b/flake.nix @@ -3,10 +3,16 @@ description = "Nixos system config"; inputs = { + neovim_config = { + url = "git+https://codeberg.org/ene/neovim-config.git"; + flake = false; + }; + strip_js_comments = { url = "git+https://codeberg.org/ene/strip_js_comments.git"; inputs.nixpkgs.follows = "nixpkgs"; }; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; home-manager = { url = "github:nix-community/home-manager/master"; @@ -23,11 +29,12 @@ self, nixpkgs, home-manager, + neovim_config, strip_js_comments, user_js, ... } @ inputs: { - nixosConfigurations.Tiamat = nixpkgs.lib.nixosSystem { + nixosConfigurations.Tiamat = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; specialArgs = inputs; modules = [ @@ -41,6 +48,8 @@ extraSpecialArgs = { inherit strip_js_comments; inherit user_js; + inherit system; + inherit neovim_config; }; }; 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 + |