From dacafd3cd7f0656ebf12f2845b17224a121b693f Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Tue, 28 Jun 2022 09:46:04 +0200 Subject: ... --- _sources/generated.json | 26 +++++++++++++----- _sources/generated.nix | 20 +++++++++----- accounts/gkleen@sif/default.nix | 1 + accounts/gkleen@sif/zshrc | 8 +++++- flake.lock | 60 ++++++++++++++++++++++++++++++++++++++++- flake.nix | 15 +++++++++++ nvfetcher.toml | 7 ++++- overlays/lesspipe.nix | 23 ++++++++++++++++ system-profiles/core.nix | 2 +- user-profiles/utils.nix | 4 +++ 10 files changed, 150 insertions(+), 16 deletions(-) create mode 100644 overlays/lesspipe.nix diff --git a/_sources/generated.json b/_sources/generated.json index a1e60700..9e718609 100644 --- a/_sources/generated.json +++ b/_sources/generated.json @@ -56,6 +56,20 @@ }, "version": "v0.2.10" }, + "lesspipe": { + "cargoLocks": null, + "extract": null, + "name": "lesspipe", + "passthru": null, + "pinned": false, + "src": { + "name": null, + "sha256": "sha256-eOq2PYvLB6ueIjC8Rif/p7HJKW8AkbEjf1La9/HUaC8=", + "type": "url", + "url": "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.05.tar.gz" + }, + "version": "2.05" + }, "mpv-autosave": { "cargoLocks": null, "extract": null, @@ -125,11 +139,11 @@ "name": null, "owner": "hoyon", "repo": "mpv-mpris", - "rev": "0.7.1", - "sha256": "sha256-Oc+PI4dGJdqja75JB2sT18NbU9kzIXYTi+eQdGxwRG0=", + "rev": "0.8.1", + "sha256": "sha256-ugEiQZA1vQCVwyv3ViM84Qz8lhRvy17vcxjayYevTAs=", "type": "github" }, - "version": "0.7.1" + "version": "0.8.1" }, "mpv-reload": { "cargoLocks": null, @@ -195,11 +209,11 @@ "name": null, "owner": "umlaeute", "repo": "v4l2loopback", - "rev": "d01c20cca58772e7b29faef6da393c919a4d531b", - "sha256": "sha256-/HBU+FThl8qtgpJ4rHj9tbKxK+aTbccl7BhWVvzNDlU=", + "rev": "56cca901dcf0a5cb11cc613155cfbe863d5d8421", + "sha256": "sha256-NY9elPsoGQVGGDIe2US/HT0ES8NSmb0ohlABc0HEIP0=", "type": "github" }, - "version": "d01c20cca58772e7b29faef6da393c919a4d531b" + "version": "56cca901dcf0a5cb11cc613155cfbe863d5d8421" }, "xcompose": { "cargoLocks": null, diff --git a/_sources/generated.nix b/_sources/generated.nix index 5096c4f1..def59267 100644 --- a/_sources/generated.nix +++ b/_sources/generated.nix @@ -36,6 +36,14 @@ sha256 = "sha256-j7/3Llc3jTeJGpOH3Aexm9qcNscuk0mbi4ZCCyzC3+s="; }); }; + lesspipe = { + pname = "lesspipe"; + version = "2.05"; + src = fetchurl { + url = "https://github.com/wofr06/lesspipe/archive/refs/tags/v2.05.tar.gz"; + sha256 = "sha256-eOq2PYvLB6ueIjC8Rif/p7HJKW8AkbEjf1La9/HUaC8="; + }; + }; mpv-autosave = { pname = "mpv-autosave"; version = "744c3ee61d2f0a8e9bb4e308dec6897215ae4704"; @@ -72,13 +80,13 @@ }; mpv-mpris = { pname = "mpv-mpris"; - version = "0.7.1"; + version = "0.8.1"; src = fetchFromGitHub ({ owner = "hoyon"; repo = "mpv-mpris"; - rev = "0.7.1"; + rev = "0.8.1"; fetchSubmodules = false; - sha256 = "sha256-Oc+PI4dGJdqja75JB2sT18NbU9kzIXYTi+eQdGxwRG0="; + sha256 = "sha256-ugEiQZA1vQCVwyv3ViM84Qz8lhRvy17vcxjayYevTAs="; }); }; mpv-reload = { @@ -114,13 +122,13 @@ }; v4l2loopback = { pname = "v4l2loopback"; - version = "d01c20cca58772e7b29faef6da393c919a4d531b"; + version = "56cca901dcf0a5cb11cc613155cfbe863d5d8421"; src = fetchFromGitHub ({ owner = "umlaeute"; repo = "v4l2loopback"; - rev = "d01c20cca58772e7b29faef6da393c919a4d531b"; + rev = "56cca901dcf0a5cb11cc613155cfbe863d5d8421"; fetchSubmodules = true; - sha256 = "sha256-/HBU+FThl8qtgpJ4rHj9tbKxK+aTbccl7BhWVvzNDlU="; + sha256 = "sha256-NY9elPsoGQVGGDIe2US/HT0ES8NSmb0ohlABc0HEIP0="; }); }; xcompose = { diff --git a/accounts/gkleen@sif/default.nix b/accounts/gkleen@sif/default.nix index 892cd58b..66328970 100644 --- a/accounts/gkleen@sif/default.nix +++ b/accounts/gkleen@sif/default.nix @@ -378,6 +378,7 @@ in { i.A. d.h. D.h. + gdw. ''} \ | sort | uniq >$out ''); diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index 2d71f5a3..1b7cc06c 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc @@ -181,8 +181,14 @@ dir() { templateArchive=${archiveFile} fi - case $(file --brief --mime-type ${templateArchive}) in + case $(file --brief --mime-type --dereference ${templateArchive}) in application/zip) unzip ${templateArchive} ;; + application/vnd.debian.binary-package) + nix shell nixos#binutils --command ar x ${templateArchive} + mkdir control data + tar -C control -xvaf control.* + tar -C data -xvaf data.* + ;; *) tar -xvaf ${templateArchive} ;; esac ) diff --git a/flake.lock b/flake.lock index 78ef3227..48609f3c 100644 --- a/flake.lock +++ b/flake.lock @@ -43,6 +43,21 @@ } }, "flake-utils": { + "locked": { + "lastModified": 1642700792, + "narHash": "sha256-XqHrk7hFb+zBvRg6Ghl+AZDq03ov6OshJLiSWOoX5es=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "846b2ae0fc4cc943637d3d1def4454213e203cba", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { "locked": { "lastModified": 1649676176, "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", @@ -84,6 +99,31 @@ "type": "github" } }, + "mach-nix": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ], + "pypi-deps-db": [ + "pypi-deps-db" + ] + }, + "locked": { + "lastModified": 1655849525, + "narHash": "sha256-j/XrVVistvM+Ua+0tNFvO5z83isL+LBgmBi9XppxuKA=", + "owner": "DavHau", + "repo": "mach-nix", + "rev": "552d4caa73722b262204319526f9e77f9370f702", + "type": "github" + }, + "original": { + "owner": "DavHau", + "ref": "master", + "repo": "mach-nix", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1655630673, @@ -169,7 +209,7 @@ "flake-compat": [ "flake-compat" ], - "flake-utils": "flake-utils", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs" ] @@ -189,13 +229,31 @@ "type": "github" } }, + "pypi-deps-db": { + "flake": false, + "locked": { + "lastModified": 1656230916, + "narHash": "sha256-ySccLr2XgC9kiLwt/g+tjGyf03iwnAh1Odj3EZ+mZ/o=", + "owner": "DavHau", + "repo": "pypi-deps-db", + "rev": "76e139c4fc7d8201dd1c437ba15761c982d6d4dd", + "type": "github" + }, + "original": { + "owner": "DavHau", + "repo": "pypi-deps-db", + "type": "github" + } + }, "root": { "inputs": { "deploy-rs": "deploy-rs", "flake-compat": "flake-compat", "home-manager": "home-manager", + "mach-nix": "mach-nix", "nixpkgs": "nixpkgs", "nvfetcher": "nvfetcher", + "pypi-deps-db": "pypi-deps-db", "sops-nix": "sops-nix" } }, diff --git a/flake.nix b/flake.nix index da73fa6e..97fb4204 100644 --- a/flake.nix +++ b/flake.nix @@ -52,6 +52,21 @@ ref = "master"; flake = false; }; + + pypi-deps-db = { + url = "github:DavHau/pypi-deps-db"; + flake = false; + }; + mach-nix = { + type = "github"; + owner = "DavHau"; + repo = "mach-nix"; + ref = "master"; + inputs = { + nixpkgs.follows = "nixpkgs"; + pypi-deps-db.follows = "pypi-deps-db"; + }; + }; }; outputs = { self, nixpkgs, home-manager, sops-nix, deploy-rs, nvfetcher, ... }@inputs: diff --git a/nvfetcher.toml b/nvfetcher.toml index 31fa7aa4..bc3095ca 100644 --- a/nvfetcher.toml +++ b/nvfetcher.toml @@ -48,4 +48,9 @@ fetch.git = "https://gitlab.com/depesz/Versioning" [mpv-chapterskip] src.git = "https://github.com/po5/chapterskip" -fetch.github = "po5/chapterskip" \ No newline at end of file +fetch.github = "po5/chapterskip" + +[lesspipe] +src.github = "wofr06/lesspipe" +src.prefix = "v" +fetch.url = "https://github.com/wofr06/lesspipe/archive/refs/tags/v$ver.tar.gz" \ No newline at end of file diff --git a/overlays/lesspipe.nix b/overlays/lesspipe.nix new file mode 100644 index 00000000..70684241 --- /dev/null +++ b/overlays/lesspipe.nix @@ -0,0 +1,23 @@ +{ final, prev, sources, ... }: { + lesspipe = final.stdenv.mkDerivation { + pname = "lesspipe"; + inherit (sources.lesspipe) version src; + + nativeBuildInputs = with final; [ perl ]; + buildInputs = with final; [ perl zsh makeWrapper ]; + strictDeps = true; + configureFlags = [ "--shell=${final.zsh}/bin/zsh" "--yes" "--prefix=/" ]; + makeFlags = [ "PREFIX=" "DESTDIR=$(out)" ]; + configurePlatforms = []; + dontBuild = true; + + preConfigure = '' + patchShebangs --build configure + ''; + + preFixup = '' + wrapProgram $out/bin/lesspipe.sh \ + --prefix PATH : ${final.python3.pkgs.pygments}:${final.file}/bin/file:${final.ncurses}/bin/tput + ''; + }; +} diff --git a/system-profiles/core.nix b/system-profiles/core.nix index 87dc0e92..e6c0e085 100644 --- a/system-profiles/core.nix +++ b/system-profiles/core.nix @@ -86,7 +86,7 @@ in { home-manager = { useGlobalPkgs = true; # Otherwise home-manager would only work impurely - useUserPackages = true; + useUserPackages = false; }; sops = lib.mkIf hasSops { diff --git a/user-profiles/utils.nix b/user-profiles/utils.nix index 2e8a22f7..a1d7aa62 100644 --- a/user-profiles/utils.nix +++ b/user-profiles/utils.nix @@ -14,6 +14,10 @@ jq.enable = true; }; + home.sessionVariables = { + LESSCOLORIZER = "pygmentize -O style=solarized-dark"; + }; + home.packages = with pkgs; [ autossh usbutils pciutils exa silver-searcher pwgen unzip magic-wormhole qrencode tty-clock dnsutils openssl sshfs psmisc -- cgit v1.2.3