Compare commits

...

2 Commits

Author SHA1 Message Date
Lennart J. Kurzweg (Nx2)
042e8c7ee7 further gpg-ssh edits 2025-10-07 16:35:42 +00:00
Lennart J. Kurzweg (Nx2)
685a34fcbb NxWSL -> NxDCS 2025-10-07 16:35:06 +00:00
9 changed files with 86 additions and 95 deletions

62
flake.lock generated
View File

@@ -39,11 +39,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1759572648,
"narHash": "sha256-0f1EsUBA64FV14RuNLyo3XDLLgvY+l2X/Bro+T4+AdM=",
"lastModified": 1759705705,
"narHash": "sha256-ckBnfbxbT7VU7ay0c5jkstAZHrC4xDpEHgnQo99OdEw=",
"owner": "9001",
"repo": "copyparty",
"rev": "38cc80982237e862e538a31f49e8c6aae749f014",
"rev": "20ac117c3272da50ce125795d831ac55f29e766d",
"type": "github"
},
"original": {
@@ -308,11 +308,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1759530922,
"narHash": "sha256-IKNfBuBbuofOVHJujnzBGaSydnmlMBRWl9owIZVVk9k=",
"lastModified": 1759837778,
"narHash": "sha256-K/F/ndJszKrbhhCcQEpLU3jrDSapQCprgNYJscHZYf0=",
"ref": "refs/heads/main",
"rev": "76d998743ac10e712238c1016db4d8e8d16f1049",
"revCount": 6476,
"rev": "5ba2d2217b649c4ca2db7e3f383b3f6af6e70d65",
"revCount": 6484,
"submodules": true,
"type": "git",
"url": "https://github.com/hyprwm/Hyprland"
@@ -340,11 +340,11 @@
]
},
"locked": {
"lastModified": 1758895089,
"narHash": "sha256-HOIITlSwB5iuVEVLmWNGu8bvI83Y2IbN8SzJQmBDwvg=",
"lastModified": 1759748449,
"narHash": "sha256-9I7KVSR7PsSaahM6CbxUyjXSRAY/4+29rFblZDqHPFE=",
"owner": "hyprwm",
"repo": "hyprland-plugins",
"rev": "4d940a10aff16b240533c9b6527a14ff91e5e5ae",
"rev": "7be897d6ae765fab756c0b7e6b91e8c5b39a419e",
"type": "github"
},
"original": {
@@ -576,11 +576,11 @@
"nixpkgs": "nixpkgs_4"
},
"locked": {
"lastModified": 1759348509,
"narHash": "sha256-at9xMhxMP65JYWlGWYJ412VKbS+tXkTM3f5t9Q8IyMA=",
"lastModified": 1759833546,
"narHash": "sha256-rOfkgIiiZNPUbf61OqEym60wXEODeDG8XH+gV/SUoUc=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "d96dda76c1f1827634ddf28d386feabd2d135d21",
"rev": "7c0c0f4c3a51761434f18209fa9499b8579ff730",
"type": "github"
},
"original": {
@@ -607,11 +607,11 @@
},
"nixpkgs-latest": {
"locked": {
"lastModified": 1759574388,
"narHash": "sha256-6Vv/JfG6A6YmlsKYqF88TrisrNWacTCUDX2Ibe8n4yw=",
"lastModified": 1759851983,
"narHash": "sha256-5tYg4TRly5I8LOagO5X0dArUOht023mevqr3qlVghb0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "32fd1eea9d3114de2acff9b10e67fd0007d2c833",
"rev": "7eb8a3cd795b18e7ac26c9cba411e1f588257a62",
"type": "github"
},
"original": {
@@ -639,11 +639,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1759381078,
"narHash": "sha256-gTrEEp5gEspIcCOx9PD8kMaF1iEmfBcTbO0Jag2QhQs=",
"lastModified": 1759733170,
"narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7df7ff7d8e00218376575f0acdcc5d66741351ee",
"rev": "8913c168d1c56dc49a7718685968f38752171c3b",
"type": "github"
},
"original": {
@@ -686,11 +686,11 @@
},
"nixpkgs_4": {
"locked": {
"lastModified": 1759036355,
"narHash": "sha256-0m27AKv6ka+q270dw48KflE0LwQYrO7Fm4/2//KCVWg=",
"lastModified": 1759733170,
"narHash": "sha256-TXnlsVb5Z8HXZ6mZoeOAIwxmvGHp1g4Dw89eLvIwKVI=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "e9f00bd893984bc8ce46c895c3bf7cac95331127",
"rev": "8913c168d1c56dc49a7718685968f38752171c3b",
"type": "github"
},
"original": {
@@ -702,11 +702,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1759439645,
"narHash": "sha256-oiAyQaRilPk525Z5aTtTNWNzSrcdJ7IXM0/PL3CGlbI=",
"lastModified": 1759735786,
"narHash": "sha256-a0+h02lyP2KwSNrZz4wLJTu9ikujNsTWIC874Bv7IJ0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "879bd460b3d3e8571354ce172128fbcbac1ed633",
"rev": "20c4598c84a671783f741e02bf05cbfaf4907cff",
"type": "github"
},
"original": {
@@ -846,11 +846,11 @@
]
},
"locked": {
"lastModified": 1759188042,
"narHash": "sha256-f9QC2KKiNReZDG2yyKAtDZh0rSK2Xp1wkPzKbHeQVRU=",
"lastModified": 1759635238,
"narHash": "sha256-UvzKi02LMFP74csFfwLPAZ0mrE7k6EiYaKecplyX9Qk=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "9fcfabe085281dd793589bdc770a2e577a3caa5d",
"rev": "6e5a38e08a2c31ae687504196a230ae00ea95133",
"type": "github"
},
"original": {
@@ -952,11 +952,11 @@
"rust-overlay": "rust-overlay_2"
},
"locked": {
"lastModified": 1759502148,
"narHash": "sha256-Yncc0FlzzvsZTAtId/usUKNdJR911mpQcR+ZNjabrio=",
"lastModified": 1759765472,
"narHash": "sha256-YYfXBsw57fH6s/hXR24rv8/nr35oQl1CBH7p4WcK8RA=",
"owner": "sxyazi",
"repo": "yazi",
"rev": "cd6881c9fe88dfe73d91980829fd371f5eeec242",
"rev": "554cb52cc581df9a41e0778ebd448925cd3aca55",
"type": "github"
},
"original": {

View File

@@ -70,7 +70,7 @@
NxXPS = make-nixos-system "NxXPS" { enable = true; prime = true; };
NxNORTH = make-nixos-system "NxNORTH" { enable = true; prime = false; };
NxACE = make-nixos-system "NxACE" { enable = false; };
NxWSL = make-nixos-wsl-system "NxWSL";
NxDCS = make-nixos-wsl-system "NxDCS";
};
homeConfigurations = let
@@ -93,7 +93,7 @@
"${hyper-base.user}@NxNORTH" = make-home-configuration "NxNORTH" hyper-base.user { enable = true; prime = false; };
"${hyper-base.user}@NxACE" = make-home-configuration "NxACE" hyper-base.user { enable = false; };
"${hyper-base.user}@NxWSL" = make-shell-configuration "NxWSL" hyper-base.user;
"${hyper-base.user}@NxDCS" = make-shell-configuration "NxDCS" hyper-base.user;
};
};
}

View File

@@ -112,7 +112,7 @@
'';
nx_backup = let
destination = if hyper.host == "NxNORTH" then "${hyper.home}/shared/" else "${hyper.home}/backups/";
in pkgs.lib.mkIf (hyper.host != "NxACE" && hyper.host != "NxWSL") ''
in pkgs.lib.mkIf (hyper.host != "NxACE" && hyper.host != "NxDCS") ''
set RPATH (curl -s https://${hyper.domain}/latest-backup)
rsync -avz --info=progress2 -e "ssh -p ${builtins.toString secrets.ssh.port}" ${hyper.user}@ssh.${hyper.domain}:"$RPATH" ${destination}
'';

View File

@@ -21,10 +21,10 @@
};
extraConfig = {
credential = {
"https://git.da.dicos.de".username = lib.mkIf (hyper.host =="NxWSL") "lkurzweg";
"https://git.da.dicos.de".password = lib.mkIf (hyper.host =="NxWSL") "Test";
"https://git.da.dicos.de".username = lib.mkIf (hyper.host =="NxDCS") "lkurzweg";
"https://git.da.dicos.de".password = lib.mkIf (hyper.host =="NxDCS") "Test";
};
url."ssh://git@git.da.dicos.de/".insteadOf = lib.mkIf (hyper.host =="NxWSL") "https://git.da.dicos.de/";
url."ssh://git@git.da.dicos.de/".insteadOf = lib.mkIf (hyper.host =="NxDCS") "https://git.da.dicos.de/";
url."ssh://git@github.com/".insteadOf = "https://github.com/";
pull.rebase = false; # true
};

View File

@@ -1,11 +1,5 @@
{ pkgs, ... }@all: with all;
{
# there also is a system module
home.packages = with pkgs; [
gpg-tui
pinentry-all
];
{ pkgs, ... }@all: with all; {
home.packages = with pkgs; [ pinentry-all ];
programs.gpg = {
enable = true;
package = pkgs.gnupg;
@@ -33,4 +27,24 @@
with-fingerprint = true;
};
};
services.gpg-agent = let
min2sec = min: (min * 60);
in {
enable = false;
verbose = true;
sshKeys = [
"97081264F7FD72D890D496E839AA9A4C7892A7D8" # Keygrip (not Fingerprint!) of [A] Subkey
];
enableSshSupport = true;
enableFishIntegration = true;
defaultCacheTtlSsh = min2sec 60;
defaultCacheTtl = min2sec 30;
pinentry = {
package = pkgs.pinentry;
program = "pinentry";
};
extraConfig = ''
allow-loopback-pinentry
'';
};
}

View File

@@ -1,7 +1,9 @@
{ pkgs, ... }@all: with all; {
home.packages = with pkgs; [ sshfs ];
programs.ssh = {
enable = true;
package = pkgs.openssh;
addKeysToAgent = "yes";
matchBlocks = let
nxace = name: {
host = name;
@@ -21,33 +23,9 @@
};
};
};
home.packages = with pkgs; [ sshfs ];
services = {
ssh-agent = {
enable = true;
# socket = "ssh-agent"; # suffix to $XDG_RUNTIME_DIR
# package = pkgs.openssh;
};
gpg-agent = let
min2sec = min: (min * 60);
in {
enable = false;
verbose = true;
sshKeys = [
"97081264F7FD72D890D496E839AA9A4C7892A7D8" # Keygrip (not Fingerprint!) of [A] Subkey
];
enableSshSupport = true;
enableFishIntegration = true;
defaultCacheTtlSsh = min2sec 60;
defaultCacheTtl = min2sec 30;
pinentry = {
package = pkgs.pinentry;
program = "pinentry";
};
extraConfig = ''
allow-loopback-pinentry
'';
};
services.ssh-agent = {
enable = true;
# socket = "ssh-agent"; # suffix to $XDG_RUNTIME_DIR
# package = pkgs.openssh;
};
}

View File

@@ -8,25 +8,25 @@
mimeApps = {
enable = true;
defaultApplications = let
browser = "firefox.desktop";
image = "imv.desktop";
in {
"default-web-browser" = [ browser ];
"text/html" = [ browser ];
"text/htm" = [ browser ];
"x-scheme-handler/http" = [ browser ];
"x-scheme-handler/https" = [ browser ];
"x-scheme-handler/about" = [ browser ];
"x-scheme-handler/unknown" = [ browser ];
"x-scheme-handler/mailto" = "thunderbird.desktop";
"image/png" = image;
"image/jpg" = image;
"image/jpeg" = image;
"image/webp" = image;
"image/gif" = image;
"application/pdf" = "zathura.desktop";
"inode/directory" = "thunar.desktop";
};
browser = "firefox.desktop";
image = "imv.desktop";
in {
"default-web-browser" = [ browser ];
"text/html" = [ browser ];
"text/htm" = [ browser ];
"x-scheme-handler/http" = [ browser ];
"x-scheme-handler/https" = [ browser ];
"x-scheme-handler/about" = [ browser ];
"x-scheme-handler/unknown" = [ browser ];
"x-scheme-handler/mailto" = "thunderbird.desktop";
"image/png" = image;
"image/jpg" = image;
"image/jpeg" = image;
"image/webp" = image;
"image/gif" = image;
"application/pdf" = "zathura.desktop";
"inode/directory" = "thunar.desktop";
};
};
};
}

View File

@@ -1,5 +1,4 @@
{ pkgs, ... }@all: with all;
{
{ pkgs, ... }@all: with all; {
imports = [
inputs.nixos-wsl.nixosModules.default
./system-modules/base-packages.nix

View File

@@ -1,6 +1,6 @@
{ config, pkgs, ... }@all: with all; {
networking = {
nameservers = pkgs.lib.mkIf (hyper.host != "NxWSL") [ # wsl manages resolv.conf
nameservers = pkgs.lib.mkIf (hyper.host != "NxDCS") [ # wsl manages resolv.conf
"1.1.1.1"
"8.8.8.8"
];