home-manager modules

This commit is contained in:
Gregory Burd 2023-09-26 14:39:38 -04:00
parent 069735729d
commit cfeed4b553
Signed by: greg
GPG key ID: AEFACC3FC495AF89
10 changed files with 25 additions and 4 deletions

View file

@ -94,6 +94,8 @@
# Custom packages and modifications, exported as overlays # Custom packages and modifications, exported as overlays
overlays = import ./overlays { inherit inputs outputs; }; overlays = import ./overlays { inherit inputs outputs; };
homeManagerModules = import ./modules/home-manager;
# Custom packages; acessible via 'nix build', 'nix shell', etc # Custom packages; acessible via 'nix build', 'nix shell', etc
packages = libx.forAllSystems (system: packages = libx.forAllSystems (system:
let pkgs = nixpkgs.legacyPackages.${system}; let pkgs = nixpkgs.legacyPackages.${system};

View file

@ -13,7 +13,7 @@
./ranger.nix ./ranger.nix
./screen.nix ./screen.nix
./ssh.nix ./ssh.nix
./xpo.nix # ./xpo.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [

View file

@ -1,4 +1,4 @@
{ config, pkgs, username, ... }: { { inputs, config, pkgs, username, ... }: {
imports = [ imports = [
inputs.impermanence.nixosModules.home-manager.impermanence inputs.impermanence.nixosModules.home-manager.impermanence
../../services/keybase.nix ../../services/keybase.nix

View file

@ -7,7 +7,7 @@ in
# Only import user specific configuration if they have bespoke settings # Only import user specific configuration if they have bespoke settings
imports = [ imports = [
# If you want to use modules your own flake exports (from modules/home-manager): # 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): # Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default # inputs.nix-colors.homeManagerModules.default

View file

@ -0,0 +1,3 @@
{
pass-secret-service = import ./pass-secret-service.nix;
}

View file

@ -0,0 +1,3 @@
{
pass-secret-service = import ./pass-secret-service.nix;
}

View file

@ -1,5 +1,10 @@
# This file defines overlays # This file defines overlays
{ inputs, ... }: { inputs, ... }:
let
addPatches = pkg: patches: pkg.overrideAttrs (oldAttrs: {
patches = (oldAttrs.patches or [ ]) ++ patches;
});
in
{ {
# This one brings our custom packages from the 'pkgs' directory # This one brings our custom packages from the 'pkgs' directory
additions = final: _prev: import ../pkgs { pkgs = final; }; additions = final: _prev: import ../pkgs { pkgs = final; };
@ -7,10 +12,18 @@
# This one contains whatever you want to overlay # This one contains whatever you want to overlay
# You can change versions, add patches, set compilation flags, anything really. # You can change versions, add patches, set compilation flags, anything really.
# https://nixos.wiki/wiki/Overlays # https://nixos.wiki/wiki/Overlays
modifications = _final: _prev: { modifications = final: prev: {
# example = prev.example.overrideAttrs (oldAttrs: rec { # 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 # When applied, the unstable nixpkgs set (declared in the flake inputs) will