Fix ssh-config
This commit is contained in:
parent
7114d80141
commit
6d0bee68d4
2 changed files with 115 additions and 103 deletions
161
home/default.nix
161
home/default.nix
|
@ -83,53 +83,64 @@ in {
|
|||
matchBlocks = let
|
||||
matheGwProxy = "ssh -q gw nc -q0 %h %p";
|
||||
agHost = "fb04217.mathematik.tu-darmstadt.de";
|
||||
in [
|
||||
{
|
||||
host = "hera";
|
||||
hostname = "hera.m-0.eu";
|
||||
forwardAgent = true;
|
||||
user = me.user;
|
||||
}
|
||||
{
|
||||
host = "ag-forward";
|
||||
hostname = agHost;
|
||||
proxyCommand = matheGwProxy;
|
||||
user = meWork.user;
|
||||
}
|
||||
{
|
||||
host = "ag";
|
||||
hostname = agHost;
|
||||
user = meWork.user;
|
||||
}
|
||||
{
|
||||
host = "gw";
|
||||
hostname = "gwres4.mathematik.tu-darmstadt.de";
|
||||
user = meWork.user;
|
||||
}
|
||||
{
|
||||
host = "shells";
|
||||
hostname = "shells.darmstadt.ccc.de";
|
||||
user = me.user;
|
||||
}
|
||||
{
|
||||
host = "*.darmstadt.ccc.de";
|
||||
user = me.user;
|
||||
}
|
||||
{
|
||||
host = "whisky";
|
||||
hostname = "whisky.w17.io";
|
||||
user = "chaos";
|
||||
}
|
||||
{
|
||||
host = "kitchen";
|
||||
hostname = "kitchen.w17.io";
|
||||
user = "chaos";
|
||||
}
|
||||
{
|
||||
host = "door.w17.io";
|
||||
identityFile = "~/.ssh/door_rsa";
|
||||
}
|
||||
];
|
||||
in [
|
||||
{
|
||||
host = "git-auto";
|
||||
hostname = "hera.m-0.eu";
|
||||
user = "git";
|
||||
identityFile = "~/.ssh/id_auto_ed25519";
|
||||
}
|
||||
{
|
||||
host = "git";
|
||||
hostname = "hera.m-0.eu";
|
||||
user = "git";
|
||||
}
|
||||
{
|
||||
host = "hera";
|
||||
hostname = "hera.m-0.eu";
|
||||
user = me.user;
|
||||
}
|
||||
{
|
||||
host = "ag-forward";
|
||||
hostname = agHost;
|
||||
proxyCommand = matheGwProxy;
|
||||
user = meWork.user;
|
||||
}
|
||||
{
|
||||
host = "ag";
|
||||
hostname = agHost;
|
||||
user = meWork.user;
|
||||
}
|
||||
{
|
||||
host = "gw";
|
||||
hostname = "gwres4.mathematik.tu-darmstadt.de";
|
||||
user = meWork.user;
|
||||
}
|
||||
{
|
||||
host = "shells";
|
||||
hostname = "shells.darmstadt.ccc.de";
|
||||
user = me.user;
|
||||
}
|
||||
{
|
||||
host = "vorstand";
|
||||
hostname = "vorstand.darmstadt.ccc.de";
|
||||
user = me.user;
|
||||
}
|
||||
{
|
||||
host = "whisky";
|
||||
hostname = "whisky.w17.io";
|
||||
user = "chaos";
|
||||
}
|
||||
{
|
||||
host = "kitchen";
|
||||
hostname = "kitchen.w17.io";
|
||||
user = "chaos";
|
||||
}
|
||||
{
|
||||
host = "door.w17.io";
|
||||
identityFile = "~/.ssh/door_rsa";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -138,37 +149,37 @@ in {
|
|||
sessionVariables = {
|
||||
PATH =
|
||||
"$HOME/.cargo/bin:/etc/profiles/per-user/${config.home.username}/bin:$HOME/.nix-profile/bin:$PATH";
|
||||
BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
TERMINAL = config.m-0.terminal;
|
||||
EMAIL = me.mail;
|
||||
SUDO_ASKPASS = let
|
||||
print-pw = pkgs.writeShellScriptBin "print-pw"
|
||||
BROWSER = "${pkgs.firefox}/bin/firefox";
|
||||
EDITOR = "${pkgs.neovim}/bin/nvim";
|
||||
TERMINAL = config.m-0.terminal;
|
||||
EMAIL = me.mail;
|
||||
SUDO_ASKPASS = let
|
||||
print-pw = pkgs.writeShellScriptBin "print-pw"
|
||||
"pass show eu/m-0/${config.m-0.hostName}/user/${config.home.username}";
|
||||
in "${print-pw}/bin/print-pw";
|
||||
};
|
||||
};
|
||||
fonts.fontconfig.enableProfileFonts = true;
|
||||
|
||||
systemd.user = {
|
||||
startServices = true;
|
||||
services.lorri-daemon = {
|
||||
Unit = { Description = "Run lorri daemon"; };
|
||||
Service = {
|
||||
Environment =
|
||||
"RUST_BACKTRACE=1 PATH=${pkgs.nix}/bin:${pkgs.coreutils}/bin";
|
||||
ExecStart = "${lorri}/bin/lorri daemon";
|
||||
};
|
||||
};
|
||||
};
|
||||
fonts.fontconfig.enableProfileFonts = true;
|
||||
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 31536000; # 1year
|
||||
maxCacheTtl = 31536000; # 1year
|
||||
};
|
||||
};
|
||||
systemd.user = {
|
||||
startServices = true;
|
||||
services.lorri-daemon = {
|
||||
Unit = { Description = "Run lorri daemon"; };
|
||||
Service = {
|
||||
Environment =
|
||||
"RUST_BACKTRACE=1 PATH=${pkgs.nix}/bin:${pkgs.coreutils}/bin";
|
||||
ExecStart = "${lorri}/bin/lorri daemon";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
}
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 31536000; # 1year
|
||||
maxCacheTtl = 31536000; # 1year
|
||||
};
|
||||
};
|
||||
|
||||
xdg.enable = true;
|
||||
}
|
||||
|
|
|
@ -1,33 +1,34 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let user = "maralorn";
|
||||
in
|
||||
{
|
||||
|
||||
{
|
||||
imports = [ ./init_ssh.nix ];
|
||||
|
||||
imports = [ ./init_ssh.nix ];
|
||||
|
||||
systemd.services.test-and-update = {
|
||||
startAt = "2:45";
|
||||
environment.NIX_PATH =
|
||||
"/etc/nix-path:nixos-config=/etc/nixos/configuration.nix";
|
||||
path = [ pkgs.nix pkgs.gnutar pkgs.gzip pkgs.git pkgs.git-crypt ];
|
||||
restartIfChanged = false;
|
||||
unitConfig.X-StopOnRemoval = false;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
WorkingDirectory = "/var/cache/gc-links";
|
||||
systemd.services.test-and-update = {
|
||||
startAt = "2:45";
|
||||
environment.NIX_PATH =
|
||||
"/etc/nix-path:nixos-config=/etc/nixos/configuration.nix";
|
||||
path = [ pkgs.nix pkgs.gnutar pkgs.gzip pkgs.git pkgs.git-crypt ];
|
||||
restartIfChanged = false;
|
||||
unitConfig.X-StopOnRemoval = false;
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
WorkingDirectory = "/var/cache/gc-links";
|
||||
};
|
||||
script = ''
|
||||
${(import ../../lib/test.nix).test-config}/bin/test-config
|
||||
/run/wrappers/bin/sudo -u ${user} git -C /etc/nixos pull
|
||||
${
|
||||
(import ../../lib/update-system.nix
|
||||
config.system.build.nixos-rebuild).update-system
|
||||
}/bin/update-system
|
||||
/run/wrappers/bin/sudo -u ${user} update-home
|
||||
'';
|
||||
};
|
||||
nix = {
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
};
|
||||
script = ''
|
||||
${(import ../../lib/test.nix).test-config}/bin/test-config
|
||||
/run/wrappers/bin/sudo -u maralorn git -C /home/maralorn/git/nixos/config pull
|
||||
${
|
||||
(import ../../lib/update-system.nix
|
||||
config.system.build.nixos-rebuild).update-system
|
||||
}/bin/update-system
|
||||
/run/wrappers/bin/sudo -u maralorn update-home
|
||||
'';
|
||||
};
|
||||
nix = {
|
||||
gc.automatic = true;
|
||||
optimise.automatic = true;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue