From 3a13160741b33eeb245fa692b8f9beeebcfcef81 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 11 Nov 2024 14:11:55 +0100 Subject: [PATCH] Remove university software --- configuration.nix | 1 - flake.lock | 144 +--------------------------------------- flake.nix | 4 -- modules/datasync.nix | 51 ++------------ modules/periodic.nix | 23 +------ modules/software.nix | 6 -- secrets/samba-ugent.age | Bin 332 -> 0 bytes secrets/secrets.nix | 1 - 8 files changed, 9 insertions(+), 221 deletions(-) delete mode 100644 secrets/samba-ugent.age diff --git a/configuration.nix b/configuration.nix index 10b5a0c..6196dc2 100644 --- a/configuration.nix +++ b/configuration.nix @@ -107,7 +107,6 @@ with pkgs; group = "systemd-network"; }; secrets.syncthing.file = secrets/syncthing.age; - secrets.samba-ugent.file = secrets/samba-ugent.age; secrets.msmtp.file = secrets/msmtp.age; identityPaths = [ "/etc/ssh/id_ed25519" ]; }; diff --git a/flake.lock b/flake.lock index f0a41e2..3928842 100644 --- a/flake.lock +++ b/flake.lock @@ -149,27 +149,6 @@ "type": "github" } }, - "flake-utils_2": { - "inputs": { - "systems": [ - "openconnect-sso", - "systems" - ] - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, "gitignore": { "inputs": { "nixpkgs": [ @@ -253,27 +232,6 @@ "type": "path" } }, - "nix-github-actions": { - "inputs": { - "nixpkgs": [ - "openconnect-sso", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1720066371, - "narHash": "sha256-uPlLYH2S0ACj0IcgaK9Lsf4spmJoGejR9DotXiXSBZQ=", - "owner": "nix-community", - "repo": "nix-github-actions", - "rev": "622f829f5fe69310a866c8a6cd07e747c44ef820", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nix-github-actions", - "type": "github" - } - }, "nix-index-database": { "inputs": { "nixpkgs": [ @@ -340,69 +298,6 @@ "type": "github" } }, - "openconnect-sso": { - "inputs": { - "flake-utils": "flake-utils_2", - "nix-github-actions": "nix-github-actions", - "nixpkgs": [ - "nixpkgs" - ], - "poetry2nix": "poetry2nix", - "systems": "systems_3", - "treefmt-nix": "treefmt-nix" - }, - "locked": { - "lastModified": 1724283233, - "narHash": "sha256-XMPn6YHwFOJCGLE9M5F3AEFKA0u+maf8CpIEWmvaQTQ=", - "owner": "ThinkChaos", - "repo": "openconnect-sso", - "rev": "94f1ddfef1662d56ede0a093bcfc3d23156bc1a1", - "type": "github" - }, - "original": { - "owner": "ThinkChaos", - "ref": "fix/nix-flake", - "repo": "openconnect-sso", - "type": "github" - } - }, - "poetry2nix": { - "inputs": { - "flake-utils": [ - "openconnect-sso", - "flake-utils" - ], - "nix-github-actions": [ - "openconnect-sso", - "nix-github-actions" - ], - "nixpkgs": [ - "openconnect-sso", - "nixpkgs" - ], - "systems": [ - "openconnect-sso", - "systems" - ], - "treefmt-nix": [ - "openconnect-sso", - "treefmt-nix" - ] - }, - "locked": { - "lastModified": 1721039874, - "narHash": "sha256-XANsG9GYHip8pxZpbqKf/YGv8tIa0xTh289Y+WNBNfw=", - "owner": "nix-community", - "repo": "poetry2nix", - "rev": "d11c01e58587e5f21037ed6477465a7f26a32e27", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "poetry2nix", - "type": "github" - } - }, "pre-commit-hooks-nix": { "inputs": { "flake-compat": [ @@ -442,8 +337,7 @@ "local-bitwig": "local-bitwig", "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs", - "openconnect-sso": "openconnect-sso" + "nixpkgs": "nixpkgs" } }, "rust-overlay": { @@ -500,42 +394,6 @@ "repo": "default", "type": "github" } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "treefmt-nix": { - "inputs": { - "nixpkgs": [ - "openconnect-sso", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1721769617, - "narHash": "sha256-6Pqa0bi5nV74IZcENKYRToRNM5obo1EQ+3ihtunJ014=", - "owner": "numtide", - "repo": "treefmt-nix", - "rev": "8db8970be1fb8be9c845af7ebec53b699fe7e009", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "treefmt-nix", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4a5ac2a..63fd1de 100644 --- a/flake.nix +++ b/flake.nix @@ -16,10 +16,6 @@ url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - openconnect-sso = { - url = "github:ThinkChaos/openconnect-sso/fix/nix-flake"; - inputs.nixpkgs.follows = "nixpkgs"; - }; cyrus-sasl-xoauth2 = { url = "github:robn/sasl2-oauth"; flake = false; diff --git a/modules/datasync.nix b/modules/datasync.nix index 69c17e9..b61d912 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: { # ZFS automatic snapshots @@ -88,48 +93,4 @@ }; }; - # Automount external storage - systemd.mounts = [ - # UGent Samba - { - what = "//files.ugent.be/akasroua/home"; - type = "cifs"; - where = "/ugent"; - options = - "credentials=${config.age.secrets.samba-ugent.path},noperm,vers=3.11,sec=ntlmv2i,noserverino"; - mountConfig = { TimeoutSec = "5"; }; - } - ]; - systemd.automounts = [ - # UGent Samba - { - where = "/ugent"; - automountConfig = { TimeoutIdleSec = "5"; }; - wantedBy = [ "default.target" ]; - } - ]; - - # HACK Workaround to change the configuration of keyutils in order to get CIFS working - 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 - ''; - }; - } diff --git a/modules/periodic.nix b/modules/periodic.nix index e59a578..6860fba 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -38,36 +38,17 @@ in { }; # Sync mail using IDLE - systemd.user.services.goimapnotify-ugent = { - description = "Sync UGent mail using IMAP IDLE"; + systemd.user.services.goimapnotify-gmail = { + description = "Sync gmail mail using IMAP IDLE"; wantedBy = [ "default.target" ]; path = [ goimapnotify pass-wayland isync-oauth2 mu - python39 - gnupg - nix procps emacs-vterm ]; - script = '' - ${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/ugent.conf - ''; - serviceConfig = { - ExecStartPre = "/home/coolneng/.local/share/scripts/mail-sync ugent"; - Type = "simple"; - Restart = "always"; - RestartSec = 20; - }; - after = [ "network-online.target" ]; - }; - - systemd.user.services.goimapnotify-gmail = { - description = "Sync gmail mail using IMAP IDLE"; - wantedBy = [ "default.target" ]; - path = [ goimapnotify pass-wayland isync-oauth2 mu procps emacs-vterm ]; script = '' ${pkgs.goimapnotify}/bin/goimapnotify -conf /home/coolneng/.config/goimapnotify/gmail.conf ''; diff --git a/modules/software.nix b/modules/software.nix index dc9cc3b..71bfeab 100644 --- a/modules/software.nix +++ b/modules/software.nix @@ -80,8 +80,6 @@ in libreoffice-fresh simple-scan bc - citrix_workspace - teams-for-linux pdfgrep # Mail stack mu @@ -99,12 +97,8 @@ in zip unzip unar - cifs-utils - keyutils # Overlays cachix - # Networking - inputs.openconnect-sso.packages.${config.nixpkgs.localSystem.system}.default # Budgeting beancount beancount-language-server diff --git a/secrets/samba-ugent.age b/secrets/samba-ugent.age deleted file mode 100644 index c171e28c464d4a855a0b70bebb4a689bf81a681e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 332 zcmV-S0ki&LXJsvAZewzJaCB*JZZ2SPdXm=o3 zPEJU5MMzFbb!AyfV|HmycxrDnN=R`uGg)YGMsqW6Ok!znLRK$WNKFb=GIlghSvGBC zZ%cYFW>!mDaCA9XIZ#o0Lt$!3ZBJuqQCdcHQ+H!aMKB62J|HS2O)Y0~Wnpt=AX_d* zWD0LjQAILZWOXrkZb(@{dSx(kFLrNXG&OigZwf6fEg*DeWJ7U7R(CIBWHT#MHZ)o` zRBCxEcvfp^M>$hiOjR;8YGyM}Ml^0xQ3{rIZ3q>L36NE@tB(pu;0^+fexiT`tda;v zm)dZM1YHh?MJn|tL{}mILsNt`mPRghH>E5v?*Ncil-=gv`g5O7VqnNUUszmLF?Nr(`f{So?bOT$qCwPGX diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 05e1bd0..75332b8 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -4,6 +4,5 @@ let in { "wireguard.age".publicKeys = [ coolneng ]; "syncthing.age".publicKeys = [ coolneng ]; - "samba-ugent.age".publicKeys = [ coolneng ]; "msmtp.age".publicKeys = [ coolneng ]; }