diff --git a/flake.nix b/flake.nix index 8b9ef4e..8cdfd98 100644 --- a/flake.nix +++ b/flake.nix @@ -94,6 +94,8 @@ # Custom packages and modifications, exported as overlays overlays = import ./overlays { inherit inputs outputs; }; + homeManagerModules = import ./modules/home-manager; + # Custom packages; acessible via 'nix build', 'nix shell', etc packages = libx.forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; diff --git a/home-manager/_mixins/cli/default.nix b/home-manager/_mixins/cli/default.nix index 6285498..fbb0dab 100644 --- a/home-manager/_mixins/cli/default.nix +++ b/home-manager/_mixins/cli/default.nix @@ -13,7 +13,7 @@ ./ranger.nix ./screen.nix ./ssh.nix - ./xpo.nix +# ./xpo.nix ]; home.packages = with pkgs; [ diff --git a/home-manager/_mixins/users/gburd/default.nix b/home-manager/_mixins/users/gburd/default.nix index 316a127..336714a 100644 --- a/home-manager/_mixins/users/gburd/default.nix +++ b/home-manager/_mixins/users/gburd/default.nix @@ -1,4 +1,4 @@ -{ config, pkgs, username, ... }: { +{ inputs, config, pkgs, username, ... }: { imports = [ inputs.impermanence.nixosModules.home-manager.impermanence ../../services/keybase.nix diff --git a/home-manager/default.nix b/home-manager/default.nix index b36dda1..67015bd 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -7,7 +7,7 @@ in # Only import user specific configuration if they have bespoke settings imports = [ # If you want to use modules your own flake exports (from modules/home-manager): - # outputs.homeManagerModules.example + outputs.homeManagerModules.pass-secret-service # Or modules exported from other flakes (such as nix-colors): # inputs.nix-colors.homeManagerModules.default diff --git a/home-manager/modules/default.nix b/home-manager/modules/default.nix new file mode 100644 index 0000000..c3f2553 --- /dev/null +++ b/home-manager/modules/default.nix @@ -0,0 +1,3 @@ +{ + pass-secret-service = import ./pass-secret-service.nix; +} diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix new file mode 100644 index 0000000..91ab16c --- /dev/null +++ b/modules/home-manager/default.nix @@ -0,0 +1,3 @@ +{ + pass-secret-service = import ./pass-secret-service.nix; +} diff --git a/_/modules/home-manager/pass-secret-service.nix b/modules/home-manager/pass-secret-service.nix similarity index 100% rename from _/modules/home-manager/pass-secret-service.nix rename to modules/home-manager/pass-secret-service.nix diff --git a/overlays/default.nix b/overlays/default.nix index 66f65b6..19da260 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,5 +1,10 @@ # This file defines overlays { inputs, ... }: +let + addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or [ ]) ++ patches; + }); +in { # This one brings our custom packages from the 'pkgs' directory additions = final: _prev: import ../pkgs { pkgs = final; }; @@ -7,10 +12,18 @@ # This one contains whatever you want to overlay # You can change versions, add patches, set compilation flags, anything really. # https://nixos.wiki/wiki/Overlays - modifications = _final: _prev: { + modifications = final: prev: { # example = prev.example.overrideAttrs (oldAttrs: rec { # ... # }); + + passExtensions = prev.passExtensions // { + # https://github.com/tadfisher/pass-otp/pull/173 + pass-otp = addPatches prev.passExtensions.pass-otp [ ./pass-otp-fix-completion.patch ]; + }; + + # https://github.com/mdellweg/pass_secret_service/pull/37 + pass-secret-service = addPatches prev.pass-secret-service [ ./pass-secret-service-native.diff ]; }; # When applied, the unstable nixpkgs set (declared in the flake inputs) will diff --git a/_/overlays/pass-otp-fix-completion.patch b/overlays/pass-otp-fix-completion.patch similarity index 100% rename from _/overlays/pass-otp-fix-completion.patch rename to overlays/pass-otp-fix-completion.patch diff --git a/_/overlays/pass-secret-service-native.diff b/overlays/pass-secret-service-native.diff similarity index 100% rename from _/overlays/pass-secret-service-native.diff rename to overlays/pass-secret-service-native.diff