1
0
Просмотр исходного кода

splitting out nix and adding cache repos

Zander Hawke 1 год назад
Родитель
Сommit
c4f5e46ddc
3 измененных файлов с 40 добавлено и 7 удалено
  1. 12 0
      users/thomas/cli/ssh.nix
  2. 1 7
      users/thomas/default.nix
  3. 27 0
      users/thomas/nix.nix

+ 12 - 0
users/thomas/cli/ssh.nix

@@ -1,9 +1,21 @@
+{ config, ... }:
+let
+  inherit (config.xdg) configHome;
+in
 {
+  home.sessionVariables = {
+    SSH_AUTH_SOCK = "${configHome}/gnupg/S.gpg-agent.ssh";
+  };
+
   programs.ssh = {
     enable = true;
     compression = true;
     forwardAgent = true;
 
+    extraConfig = ''
+      StreamLocalBindUnlink yes
+    '';
+
     matchBlocks = {
       modgud = {
         hostname = "modgud.t5.st";

+ 1 - 7
users/thomas/default.nix

@@ -5,16 +5,10 @@ let
 in
 {
   imports = [
+    ./nix.nix
     ./cli
   ] ++ (builtins.attrValues outputs.homeManagerModules);
 
-  nix.package = lib.mkDefault pkgs.nixVersions.stable;
-  nix.settings.trusted-users = [ "thomas" ];
-  nix.extraOptions = ''
-    warn-dirty = false
-    experimental-features = nix-command flakes impure-derivations
-  '';
-
   manual.manpages.enable = false;
   xdg.enable = true;
 

+ 27 - 0
users/thomas/nix.nix

@@ -0,0 +1,27 @@
+{ pkgs, lib, ... }:
+{
+  nix = {
+    settings = {
+      substituters = [
+        "https://cache.nixos.org/"
+        "https://devenv.cachix.org"
+        "https://nix-community.cachix.org"
+      ];
+
+      trusted-public-keys = [
+        "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
+        "devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw="
+        "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
+      ];
+
+      trusted-users = [ "thomas" ];
+    };
+
+    package = lib.mkDefault pkgs.nixVersions.stable;
+
+    extraOptions = ''
+      warn-dirty = false
+      experimental-features = nix-command flakes impure-derivations
+    '';
+  };
+}