Remove most work-related configuration

I'm changing jobs
This commit is contained in:
Charlotte Van Petegem 2024-06-26 16:19:51 +02:00
parent c8de093095
commit c76a7cf1fa
No known key found for this signature in database
GPG key ID: 019E764B7184435A
12 changed files with 0 additions and 361 deletions

View file

@ -8,6 +8,5 @@
./graphical
./programs
./services
./work
];
}

View file

@ -410,23 +410,6 @@ in
];
};
}
{
profile = {
name = "work-undocked";
outputs = [
{ criteria = "LG Display 0x06D6 Unknown"; position = "0,0"; mode = "1920x1080"; scale = 1.0; }
];
};
}
{
profile = {
name = "work-docked";
outputs = [
{ criteria = "LG Display 0x06D6 Unknown"; position = "0,0"; mode = "1920x1080"; scale = 1.0; }
{ criteria = "Dell Inc. DELL U2718Q FN84K83Q1KHL"; position = "1920,0"; mode = "3840x2160"; scale = 1.0; }
];
};
}
];
};
mako = {

View file

@ -1,20 +0,0 @@
{ config, lib, ... }:
{
options.chvp.work.citrix.enable = lib.mkOption {
default = false;
example = true;
};
config = lib.mkIf config.chvp.work.citrix.enable {
chvp.base = {
nix.unfreePackages = [ "citrix-workspace" ];
zfs.homeLinks = [
{ path = ".ICAClient"; type = "data"; }
];
};
home-manager.users.charlotte = { pkgs, ... }: {
home.packages = with pkgs; [ citrix_workspace ];
};
};
}

View file

@ -1,32 +0,0 @@
{ config, lib, ... }:
{
imports = [
./citrix
./mounts
./teams
./vpn
./zotero
];
options.chvp.work.enable = lib.mkOption {
default = false;
example = true;
};
config = lib.mkIf config.chvp.work.enable {
chvp = {
development.enable = true;
work = {
citrix.enable = lib.mkDefault false;
mounts.enable = lib.mkDefault true;
teams.enable = lib.mkDefault true;
vpn.enable = lib.mkDefault true;
zotero.enable = lib.mkDefault true;
};
};
home-manager.users.charlotte = { pkgs, ... }: {
home.packages = with pkgs; [ libreoffice ];
};
};
}

View file

@ -1,58 +0,0 @@
{ config, lib, pkgs, ... }:
{
options.chvp.work.mounts.enable = lib.mkOption {
default = false;
example = true;
};
config = lib.mkIf config.chvp.work.mounts.enable {
fileSystems =
let
automount_opts = "x-systemd.automount,noauto,x-systemd.idle-timeout=60,x-systemd.device-timeout=5s,x-systemd.mount-timeout=5s";
in
{
"/mnt/ugent/files" = {
device = "//files.ugent.be/ecvpeteg";
fsType = "cifs";
options = [ "credentials=${config.age.secrets."passwords/ugent-mount-credentials".path},${automount_opts},users,vers=3.11,noperm,domain=UGENT,sec=ntlmv2i" ];
noCheck = true;
};
"/mnt/ugent/webhost" = {
device = "//webhost.ugent.be/ecvpeteg";
fsType = "cifs";
options = [ "credentials=${config.age.secrets."passwords/ugent-mount-credentials".path},${automount_opts},users,vers=3.0" ];
noCheck = true;
};
};
age.secrets."passwords/ugent-mount-credentials".file = ../../../secrets/passwords/ugent-mount-credentials.age;
environment.systemPackages = [ pkgs.keyutils ];
# Remove this once https://github.com/NixOS/nixpkgs/issues/34638 is resolved
# request-key expects a configuration file under /etc
environment.etc."request-key.conf" = {
text =
let
upcall = "${pkgs.cifs-utils}/bin/cifs.upcall";
keyctl = "${pkgs.keyutils}/bin/keyctl";
in
''
#OP TYPE DESCRIPTION CALLOUT_INFO PROGRAM
# -t is required for DFS share servers...
create cifs.spnego * * ${upcall} -t %k
create dns_resolver * * ${upcall} %k
# Everything below this point is essentially the default configuration,
# modified minimally to work under NixOS. Notably, it provides debug
# logging.
create user debug:* negate ${keyctl} negate %k 30 %S
create user debug:* rejected ${keyctl} reject %k 30 %c %S
create user debug:* expired ${keyctl} reject %k 30 %c %S
create user debug:* revoked ${keyctl} reject %k 30 %c %S
create user debug:loop:* * |${pkgs.coreutils}/bin/cat
create user debug:* * ${pkgs.keyutils}/share/keyutils/request-key-debug.sh %k %d %c %S
negate * * * ${keyctl} negate %k 30 %S
'';
};
};
}

View file

@ -1,25 +0,0 @@
{ config, lib, pkgs, ... }:
let
teamsWrapper = pkgs.writeShellScriptBin "teams-for-linux" ''
${pkgs.teams-for-linux}/bin/teams-for-linux --followSystemTheme
'';
in
{
options.chvp.work.teams.enable = lib.mkOption {
default = false;
example = true;
};
config = lib.mkIf config.chvp.work.teams.enable {
chvp.base = {
zfs.homeLinks = [
{ path = ".config/teams-for-linux"; type = "cache"; }
];
};
home-manager.users.charlotte = { pkgs, ... }: {
home.packages = with pkgs; [ teamsWrapper ];
};
};
}

View file

@ -1,48 +0,0 @@
{ config, lib, pkgs, ... }:
{
options = {
chvp.work.vpn.enable = lib.mkOption {
default = false;
example = true;
};
};
config = lib.mkIf config.chvp.work.vpn.enable {
systemd.services = {
ugent-global-vpn = {
after = [ "network.target" ];
conflicts = [ "ugent-local-vpn.service" ];
path = [ pkgs.sshuttle pkgs.openssh pkgs.bash ];
environment = { PASSWORD_FILE = config.age.secrets."passwords/ugent-vpn".path; };
serviceConfig.ExecStart = config.age.secrets."files/programs/vpn/global".path;
};
ugent-local-vpn = {
after = [ "network.target" ];
conflicts = [ "ugent-global-vpn.service" ];
path = [ pkgs.sshuttle pkgs.openssh pkgs.bash ];
environment = { PASSWORD_FILE = config.age.secrets."passwords/ugent-vpn".path; };
serviceConfig.ExecStart = config.age.secrets."files/programs/vpn/local".path;
};
};
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "ugent-global-vpn.service") {
return polkit.Result.YES;
}
if (action.id == "org.freedesktop.systemd1.manage-units" && action.lookup("unit") == "ugent-local-vpn.service") {
return polkit.Result.YES;
}
});
'';
age.secrets."passwords/ugent-vpn".file = ../../../secrets/passwords/ugent-vpn.age;
age.secrets."files/programs/vpn/local" = {
file = ../../../secrets/files/programs/vpn/local.age;
mode = "0500";
};
age.secrets."files/programs/vpn/global" = {
file = ../../../secrets/files/programs/vpn/global.age;
mode = "0500";
};
};
}

View file

@ -1,18 +0,0 @@
{ config, lib, pkgs, ... }:
{
options.chvp.work.zotero.enable = lib.mkOption {
default = false;
example = true;
};
config = lib.mkIf config.chvp.work.zotero.enable {
chvp.base.zfs.homeLinks = [
{ path = ".zotero"; type = "data"; }
{ path = ".local/share/Zotero"; type = "data"; }
];
home-manager.users.charlotte = { ... }: {
home.packages = [ pkgs.zotero ];
};
};
}