From 7f3bbba059828a8cb7962177ed737f4db2eb7209 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 20 Jun 2022 10:27:25 +0200 Subject: ... --- accounts/gkleen@sif/zshrc | 6 ++++++ flake.nix | 4 ++-- overlays/spm/default.nix | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/accounts/gkleen@sif/zshrc b/accounts/gkleen@sif/zshrc index 712ec690..2d71f5a3 100644 --- a/accounts/gkleen@sif/zshrc +++ b/accounts/gkleen@sif/zshrc @@ -416,6 +416,12 @@ dichotomic_search() { echo $min } +while read -r -d $'\0' d _ s; do + hash -d ${s}=${d} +done < <(find ~/projects ~/uni -regextype posix-extended -maxdepth 2 -type d -regex '\S+/[0-9]{2}[ws]/\S+' -print0 2>/dev/null | \ + sed -zr 's|(.*/([0-9]{2}[ws])/(.+))|\1 \2 \3|' | \ + sort -z -r -k2 | sort -z -s -k3 | uniq -z -f 2) + alias '..'='cd ..' alias -g L='| less' alias -g S='&> /dev/null' diff --git a/flake.nix b/flake.nix index f173c560..da73fa6e 100644 --- a/flake.nix +++ b/flake.nix @@ -148,8 +148,8 @@ forAllSystems = f: mapAttrs f (genAttrs systems nixpkgsPackages); forAllUsers = genAttrs (unique (map accountUserName (attrNames self.nixosModules.accounts))); - activateNixosConfigurations = forAllSystems (system: _pkgs: mapAttrs' (hostName: nixosConfig: nameValuePair "${hostName}-activate" { type = "app"; program = "${nixosConfig.config.system.build.toplevel}/bin/switch-to-configuration"; }) self.nixosConfigurations); - activateHomeManagerConfigurations = forAllSystems (system: _pkgs: listToAttrs (concatLists (mapAttrsToList (hostName: nixosConfig: mapAttrsToList (userName: userCfg: nameValuePair "${userName}@${hostName}-activate" { type = "app"; program = "${userCfg.home.activationPackage}/activate"; }) nixosConfig.config.home-manager.users) self.nixosConfigurations))); + activateNixosConfigurations = forAllSystems (system: _pkgs: filterAttrs (_n: v: v != null) (mapAttrs' (hostName: nixosConfig: nameValuePair "${hostName}-activate" (if system == nixosConfig.config.nixpkgs.system then { type = "app"; program = "${nixosConfig.config.system.build.toplevel}/bin/switch-to-configuration"; } else null)) self.nixosConfigurations)); + activateHomeManagerConfigurations = forAllSystems (system: _pkgs: filterAttrs (_n: v: v != null) (listToAttrs (concatLists (mapAttrsToList (hostName: nixosConfig: mapAttrsToList (userName: userCfg: nameValuePair "${userName}@${hostName}-activate" (if system == nixosConfig.config.nixpkgs.system then { type = "app"; program = "${userCfg.home.activationPackage}/activate"; } else null)) nixosConfig.config.home-manager.users) self.nixosConfigurations)))); overlayPaths = nixImport rec { dir = ./overlays; _import = (path: _name: dir + "/${path}"); }; diff --git a/overlays/spm/default.nix b/overlays/spm/default.nix index 6593fca8..5c820d9c 100644 --- a/overlays/spm/default.nix +++ b/overlays/spm/default.nix @@ -4,7 +4,7 @@ let # defaultPackages = (import ./stackage.nix {}); # haskellPackages = defaultPackages // argumentPackages; # haskellPackages = argumentPackages; - haskellPackages = final.haskell.packages.ghc922.override { + haskellPackages = final.haskell.packages.ghc923.override { overrides = self: super: { warp-systemd = final.haskell.lib.doJailbreak (super.warp-systemd.overrideAttrs (oldAttrs: { meta = oldAttrs.meta // { broken = false; }; })); servant-server = super.servant-server.overrideAttrs (oldAttrs: { -- cgit v1.2.3