mirror of
https://github.com/RGBCube/ncc
synced 2025-07-30 11:37:44 +00:00
Add secret SSH host configurations
This commit is contained in:
parent
369501ab86
commit
11f2227514
4 changed files with 15 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -19,6 +19,7 @@
|
||||||
!modules/
|
!modules/
|
||||||
!modules/hyprland/
|
!modules/hyprland/
|
||||||
!modules/nushell/
|
!modules/nushell/
|
||||||
|
!modules/ssh/
|
||||||
|
|
||||||
!lib/
|
!lib/
|
||||||
|
|
||||||
|
|
BIN
modules/ssh/config.age
Normal file
BIN
modules/ssh/config.age
Normal file
Binary file not shown.
|
@ -1,4 +1,11 @@
|
||||||
{ self, lib, pkgs, ... }: with lib; merge
|
{ self, config, lib, pkgs, ... }: with lib; merge
|
||||||
|
|
||||||
|
(systemConfiguration {
|
||||||
|
secrets.sshConfig = {
|
||||||
|
file = ./config.age;
|
||||||
|
mode = "444";
|
||||||
|
};
|
||||||
|
})
|
||||||
|
|
||||||
(desktopSystemPackages (with pkgs; [
|
(desktopSystemPackages (with pkgs; [
|
||||||
mosh
|
mosh
|
||||||
|
@ -11,6 +18,8 @@
|
||||||
serverAliveCountMax = 2;
|
serverAliveCountMax = 2;
|
||||||
serverAliveInterval = 60;
|
serverAliveInterval = 60;
|
||||||
|
|
||||||
|
includes = [ config.secrets.sshConfig.path ];
|
||||||
|
|
||||||
matchBlocks = {
|
matchBlocks = {
|
||||||
"*" = {
|
"*" = {
|
||||||
setEnv.COLORTERM = "truecolor";
|
setEnv.COLORTERM = "truecolor";
|
|
@ -1,5 +1,7 @@
|
||||||
let
|
let
|
||||||
keys = import ./keys.nix;
|
keys = import ./keys.nix;
|
||||||
|
|
||||||
|
all = builtins.attrValues keys;
|
||||||
in with keys; {
|
in with keys; {
|
||||||
### cube
|
### cube
|
||||||
"hosts/cube/id.age".publicKeys = [ cube enka ];
|
"hosts/cube/id.age".publicKeys = [ cube enka ];
|
||||||
|
@ -28,6 +30,6 @@ in with keys; {
|
||||||
"hosts/enka/password.said.age".publicKeys = [ enka ];
|
"hosts/enka/password.said.age".publicKeys = [ enka ];
|
||||||
|
|
||||||
### shared
|
### shared
|
||||||
|
"hosts/password.acme.age".publicKeys = all;
|
||||||
"hosts/password.acme.age".publicKeys = [ cube disk enka ];
|
"modules/ssh/config.age".publicKeys = all;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue