Compare commits

...

2 Commits

Author SHA1 Message Date
5039842006 Switch from deprecated hw.opengl to hw.graphics
Some checks are pending
pre-commit / pre-commit (push) Waiting to run
2024-09-16 19:23:47 +02:00
99d0e6cf50 Make ssh to bmo not use proxy when on eduroam 2024-09-16 19:23:47 +02:00
4 changed files with 37 additions and 18 deletions

35
home/ssh/config.nix Normal file
View File

@ -0,0 +1,35 @@
{ pkgs, lib, ... }:
let
eduroam-active = pkgs.writeShellApplication {
name = "eduroam-active";
runtimeInputs = with pkgs; [
networkmanager
];
text = ''
nmcli -g GENERAL.STATE c s interface|grep -q -E '\bactiv'
'';
};
in
{
programs.ssh = {
enable = true;
controlMaster = "auto";
matchBlocks = {
"bmo.uio.no-on-eduroam" = lib.hm.dag.entryBefore [ "bmo.uio.no" ] {
match = "host bmo.uio.no exec \"nmcli -g GENERAL.STATE c s eduroam|grep -q -E '\\bactiv'\"";
hostname = "bmo.uio.no";
forwardAgent = false;
};
"bmo.uio.no" = {
setEnv = {
# TERM = "xterm-256color";
};
hostname = "bmo.uio.no";
forwardAgent = false;
proxyJump = "torjus@rlogin.uio.no";
};
};
};
}

View File

@ -1 +1 @@
{ imports = [ ./gunter.nix ]; }
{ imports = [ ./config.nix ]; }

View File

@ -1,16 +0,0 @@
{ pkgs, ... }:
{
programs.ssh = {
enable = true;
controlMaster = "auto";
matchBlocks."bmo.uio.no" = {
setEnv = {
# TERM = "xterm-256color";
};
hostname = "bmo.uio.no";
forwardAgent = false;
proxyJump = "torjus@rlogin.uio.no";
};
};
}

View File

@ -50,7 +50,7 @@
time.timeZone = "Europe/Oslo";
# Enable opengl
hardware.opengl = {
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver