diff --git a/configurations/firefox.nix b/configurations/firefox.nix index 5dc320e6..f0101b2a 100644 --- a/configurations/firefox.nix +++ b/configurations/firefox.nix @@ -3,6 +3,14 @@ home.packages = with pkgs; [ firefox ]; }; + nixpkgs.overlays = [ + (self: super: { + firefox = super.firefox.override { extraNativeMessagingHosts = [ self.passff-host ]; pkcs11Modules = [ self.eid-mw ]; }; + # Avoids a double firefox install, see https://github.com/NixOS/nixpkgs/pull/31772 + firefox-bin = self.firefox; + }) + ]; + custom.zfs.homeLinks = [ { path = ".cache/mozilla"; type = "cache"; } { path = ".mozilla"; type = "data"; } diff --git a/configurations/pass.nix b/configurations/pass.nix new file mode 100644 index 00000000..b59bf4d8 --- /dev/null +++ b/configurations/pass.nix @@ -0,0 +1,11 @@ +{ ... }: { + nixpkgs.overlays = [ + (self: super: { + pass = (super.pass-wayland.override { pass = super.pass-wayland; }).withExtensions (ext: [ ext.pass-otp ]); + }) + ]; + + home-manager.users.charlotte = { pkgs, ... }: { + home.packages = [ pkgs.pass ]; + }; +} diff --git a/configurations/ssh.nix b/configurations/ssh.nix index 7a20520f..f7aee9b3 100644 --- a/configurations/ssh.nix +++ b/configurations/ssh.nix @@ -7,6 +7,25 @@ { path = ".ssh/known_hosts"; type = "cache"; } ]; + nixpkgs.overlays = [ + (self: super: { + ssh = self.symlinkJoin { + name = "openssh"; + paths = [ + ( + self.writeScriptBin "ssh" '' + #!${self.zsh}/bin/zsh + + export TERM=xterm-256color + ${super.openssh}/bin/ssh $@ + '' + ) + super.openssh + ]; + }; + }) + ]; + home-manager.users.charlotte = { pkgs, ... }: { home.packages = with pkgs; [ ssh diff --git a/configurations/zeroad.nix b/configurations/zeroad.nix index 374cb872..0a60eaf2 100644 --- a/configurations/zeroad.nix +++ b/configurations/zeroad.nix @@ -5,9 +5,13 @@ { path = ".config/0ad"; type = "cache"; } ]; + nixpkgs.overlays = [ + (self: super: { + zeroadPackages = super.zeroadPackages.override { newScope = extra: self.newScope ({ stdenv = self.stdenvAdapters.impureUseNativeOptimizations self.stdenv; } // extra); }; + }) + ]; + home-manager.users.charlotte = { pkgs, ... }: { - home.packages = [ - pkgs.zeroad - ]; + home.packages = [ pkgs.zeroad ]; }; } diff --git a/overlays/default.nix b/overlays/default.nix deleted file mode 100644 index 3c2d82a3..00000000 --- a/overlays/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ ... }: -let - files = [ - "firefox.nix" - "pass.nix" - "ssh.nix" - "zeroad.nix" - ]; - overlays = map (f: import (./. + "/${f}")) files; - set = builtins.listToAttrs (map (f: { name = f; value = (./. + "/${f}"); }) files); -in -{ - nixpkgs.overlays = overlays; -} diff --git a/overlays/firefox.nix b/overlays/firefox.nix deleted file mode 100644 index f2cbcbf2..00000000 --- a/overlays/firefox.nix +++ /dev/null @@ -1,5 +0,0 @@ -self: super: { - firefox = super.firefox.override { extraNativeMessagingHosts = [ self.passff-host ]; pkcs11Modules = [ self.eid-mw ]; }; - # Avoids a double firefox install, see https://github.com/NixOS/nixpkgs/pull/31772 - firefox-bin = self.firefox; -} diff --git a/overlays/pass.nix b/overlays/pass.nix deleted file mode 100644 index 6644b3d9..00000000 --- a/overlays/pass.nix +++ /dev/null @@ -1,3 +0,0 @@ -self: super: { - pass = (super.pass-wayland.override { pass = super.pass-wayland; }).withExtensions (ext: [ ext.pass-otp ]); -} diff --git a/overlays/ssh.nix b/overlays/ssh.nix deleted file mode 100644 index aa2eebe1..00000000 --- a/overlays/ssh.nix +++ /dev/null @@ -1,16 +0,0 @@ -self: super: { - ssh = self.symlinkJoin { - name = "openssh"; - paths = [ - ( - self.writeScriptBin "ssh" '' - #!${self.zsh}/bin/zsh - - export TERM=xterm-256color - ${super.openssh}/bin/ssh $@ - '' - ) - super.openssh - ]; - }; -} diff --git a/overlays/zeroad.nix b/overlays/zeroad.nix deleted file mode 100644 index a7fc015a..00000000 --- a/overlays/zeroad.nix +++ /dev/null @@ -1,3 +0,0 @@ -self: super: { - zeroadPackages = super.zeroadPackages.override { newScope = extra: self.newScope ({ stdenv = self.stdenvAdapters.impureUseNativeOptimizations self.stdenv; } // extra); }; -} diff --git a/profiles/common.nix b/profiles/common.nix index c38c7c1f..2baf7706 100644 --- a/profiles/common.nix +++ b/profiles/common.nix @@ -7,7 +7,6 @@ in imports = [ "${home-manager}/nixos" ../modules/zfs.nix - ../overlays/default.nix ../configurations/direnv.nix ../configurations/git.nix ../configurations/gnupg.nix @@ -15,6 +14,7 @@ in ../configurations/neovim.nix ../configurations/nix-index.nix ../configurations/nix-store.nix + ../configurations/pass.nix ../configurations/ssh.nix ../configurations/tmux.nix ../configurations/users.nix @@ -29,7 +29,6 @@ in moreutils ncdu pandoc - pass ripgrep texlive.combined.scheme-medium unzip