fix: suppress nixvim nixpkgs.source and ssh matchBlocks deprecation warnings (#262)

Explicitly set programs.nixvim.nixpkgs.source to suppress the follows
    warning, and migrate all programs.ssh.matchBlocks to programs.ssh.settings
    using upstream PascalCase directive names.
This commit is contained in:
Ryan Yin
2026-06-03 11:23:30 +08:00
committed by GitHub
parent 44b0258129
commit fe4923f8cb
6 changed files with 26 additions and 36 deletions
@@ -1,5 +1,6 @@
{ {
config, config,
nixpkgs,
nixvim, nixvim,
pkgs, pkgs,
... ...
@@ -7,6 +8,8 @@
{ {
imports = [ nixvim.homeModules.nixvim ]; imports = [ nixvim.homeModules.nixvim ];
programs.nixvim.nixpkgs.source = nixpkgs;
home.shellAliases = { home.shellAliases = {
vi = "nvim"; vi = "nvim";
+19 -29
View File
@@ -9,42 +9,32 @@
programs.ssh = { programs.ssh = {
enable = true; enable = true;
# default config
enableDefaultConfig = false; enableDefaultConfig = false;
matchBlocks."*" = { settings."*" = {
forwardAgent = false; ForwardAgent = false;
# "a private key that is used during authentication will be added to ssh-agent if it is running" AddKeysToAgent = "yes";
addKeysToAgent = "yes"; Compression = true;
compression = true; ServerAliveInterval = 0;
serverAliveInterval = 0; ServerAliveCountMax = 3;
serverAliveCountMax = 3; HashKnownHosts = false;
hashKnownHosts = false; UserKnownHostsFile = "~/.ssh/known_hosts";
userKnownHostsFile = "~/.ssh/known_hosts"; ControlMaster = "no";
controlMaster = "no"; ControlPath = "~/.ssh/master-%r@%n:%p";
controlPath = "~/.ssh/master-%r@%n:%p"; ControlPersist = "no";
controlPersist = "no";
}; };
matchBlocks = { settings = {
"github.com" = { "github.com" = {
# "Using SSH over the HTTPS port for GitHub" HostName = "ssh.github.com";
# "(port 22 is banned by some proxies / firewalls)" Port = 443;
hostname = "ssh.github.com"; User = "git";
port = 443; IdentitiesOnly = true;
user = "git";
# Specifies that ssh should only use the identity file explicitly configured above
# required to prevent sending default identity files first.
identitiesOnly = true;
}; };
"192.168.*" = { "192.168.*" = {
# "allow to securely use local SSH agent to authenticate on the remote machine." ForwardAgent = true;
# "It has the same effect as adding cli option `ssh -A user@host`" IdentityFile = "/etc/agenix/ssh-key-romantic";
forwardAgent = true; IdentitiesOnly = true;
# "romantic holds my homelab~"
identityFile = "/etc/agenix/ssh-key-romantic";
identitiesOnly = true;
}; };
}; };
}; };
+1 -2
View File
@@ -5,6 +5,5 @@ in
{ {
imports = [ ../../darwin ]; imports = [ ../../darwin ];
programs.ssh.matchBlocks."github.com".identityFile = programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
"${config.home.homeDirectory}/.ssh/${hostName}";
} }
+1 -2
View File
@@ -5,6 +5,5 @@ in
{ {
imports = [ ../../darwin ]; imports = [ ../../darwin ];
programs.ssh.matchBlocks."github.com".identityFile = programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
"${config.home.homeDirectory}/.ssh/${hostName}";
} }
+1 -2
View File
@@ -6,8 +6,7 @@ in
{ {
imports = [ ../../linux/gui.nix ]; imports = [ ../../linux/gui.nix ];
programs.ssh.matchBlocks."github.com".identityFile = programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/${hostName}";
"${config.home.homeDirectory}/.ssh/${hostName}";
modules.desktop.gaming.enable = false; modules.desktop.gaming.enable = false;
modules.desktop.niri.enable = true; modules.desktop.niri.enable = true;
+1 -1
View File
@@ -5,7 +5,7 @@ in
{ {
imports = [ ../../linux/gui.nix ]; imports = [ ../../linux/gui.nix ];
programs.ssh.matchBlocks."github.com".identityFile = "${config.home.homeDirectory}/.ssh/idols-ai"; programs.ssh.settings."github.com".IdentityFile = "${config.home.homeDirectory}/.ssh/idols-ai";
modules.desktop.gaming.enable = true; modules.desktop.gaming.enable = true;
modules.desktop.niri.enable = true; modules.desktop.niri.enable = true;