diff --git a/flake.lock b/flake.lock index 5dc234c..6daffd8 100644 --- a/flake.lock +++ b/flake.lock @@ -145,11 +145,11 @@ ] }, "locked": { - "lastModified": 1705806513, - "narHash": "sha256-FcOmNjhHFfPz2udZbRpZ1sfyhVMr+C2O8kOxPj+HDDk=", + "lastModified": 1706411424, + "narHash": "sha256-BzziJYucEZvdCE985vjPoo3ztWcmUiSQ1wJ2CoT6jCc=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "f8e04fbcebcc24cebc91989981bd45f69b963ed7", + "rev": "c782f2a4f6fc94311ab5ef31df2f1149a1856181", "type": "github" }, "original": { @@ -160,11 +160,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1706098335, - "narHash": "sha256-r3dWjT8P9/Ah5m5ul4WqIWD8muj5F+/gbCdjiNVBKmU=", + "lastModified": 1706373441, + "narHash": "sha256-S1hbgNbVYhuY2L05OANWqmRzj4cElcbLuIkXTb69xkk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "a77ab169a83a4175169d78684ddd2e54486ac651", + "rev": "56911ef3403a9318b7621ce745f5452fb9ef6867", "type": "github" }, "original": { @@ -176,11 +176,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1705033721, - "narHash": "sha256-K5eJHmL1/kev6WuqyqqbS1cdNnSidIZ3jeqJ7GbrYnQ=", + "lastModified": 1705957679, + "narHash": "sha256-Q8LJaVZGJ9wo33wBafvZSzapYsjOaNjP/pOnSiKVGHY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a1982c92d8980a0114372973cbdfe0a307f1bdea", + "rev": "9a333eaa80901efe01df07eade2c16d183761fa3", "type": "github" }, "original": { @@ -229,6 +229,26 @@ "type": "github" } }, + "print-interface": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1706536104, + "narHash": "sha256-cbXlVSO+iv7i+sqwaF/1UF0QV3RK+S94OVwSeahYuEs=", + "owner": "fsr", + "repo": "print-interface", + "rev": "9adba462c4538dab7a1d2ef26e85ae6391b68109", + "type": "github" + }, + "original": { + "owner": "fsr", + "repo": "print-interface", + "type": "github" + } + }, "root": { "inputs": { "course-management": "course-management", @@ -236,6 +256,7 @@ "kpp": "kpp", "nix-index-database": "nix-index-database", "nixpkgs": "nixpkgs", + "print-interface": "print-interface", "sops-nix": "sops-nix", "vscode-server": "vscode-server" } @@ -248,11 +269,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1706130372, - "narHash": "sha256-fHZxKH1DhsXPP36a2vJ91Zy6S+q6+QRIFlpLr9fZHU8=", + "lastModified": 1706410821, + "narHash": "sha256-iCfXspqUOPLwRobqQNAQeKzprEyVowLMn17QaRPQc+M=", "owner": "Mic92", "repo": "sops-nix", - "rev": "4606d9b1595e42ffd9b75b9e69667708c70b1d68", + "rev": "73bf36912e31a6b21af6e0f39218e067283c67ef", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 7ccfa1a..58824f5 100755 --- a/flake.nix +++ b/flake.nix @@ -7,6 +7,10 @@ nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; kpp.url = "github:fsr/kpp"; kpp.inputs.nixpkgs.follows = "nixpkgs"; + print-interface = { + url = "github:fsr/print-interface"; + inputs.nixpkgs.follows = "nixpkgs"; + }; ese-manual.url = "git+https://git.ifsr.de/ese/manual-website"; ese-manual.inputs.nixpkgs.follows = "nixpkgs"; vscode-server.url = "github:nix-community/nixos-vscode-server"; @@ -16,7 +20,18 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = { self, nixpkgs, sops-nix, nix-index-database, kpp, ese-manual, vscode-server, course-management, ... }@inputs: + outputs = + { self + , nixpkgs + , sops-nix + , nix-index-database + , kpp + , ese-manual + , vscode-server + , course-management + , print-interface + , ... + }@inputs: { packages."x86_64-linux".quitte = self.nixosConfigurations.quitte.config.system.build.toplevel; packages."x86_64-linux".default = self.packages."x86_64-linux".quitte; @@ -82,6 +97,7 @@ inputs.sops-nix.nixosModules.sops inputs.nix-index-database.nixosModules.nix-index vscode-server.nixosModules.default + print-interface.nixosModules.default ./hosts/tomate/configuration.nix ./modules/base.nix ./modules/zsh.nix diff --git a/hosts/tomate/configuration.nix b/hosts/tomate/configuration.nix index e2bea0d..63d03c5 100644 --- a/hosts/tomate/configuration.nix +++ b/hosts/tomate/configuration.nix @@ -73,6 +73,19 @@ listenAddresses = [ "0.0.0.0:631" ]; }; + sops.secrets."print/smtp-password" = { + owner = config.services.print-interface.user; + group = config.services.print-interface.group; + }; + + services.print-interface = { + enable = true; + smtp = { + username = "print"; + passwordFile = config.sops.secrets."print/smtp-password".path; + }; + }; + services.avahi = { enable = true; nssmdns = true; @@ -83,7 +96,10 @@ }; }; networking.firewall = { - allowedTCPPorts = [ 631 ]; + allowedTCPPorts = [ + 631 + config.services.print-interface.listenPort + ]; allowedUDPPorts = [ 631 ]; }; diff --git a/secrets/tomate.yaml b/secrets/tomate.yaml index 3eaef3c..0aee641 100644 --- a/secrets/tomate.yaml +++ b/secrets/tomate.yaml @@ -1,5 +1,7 @@ portunus: search-password: ENC[AES256_GCM,data:lUG8qGioYZOAQHRhDMCBq6rRRFOs9R4ohMHEctxi/f6soE4aQZHyENEW,iv:6wgDgre5wr630SkRlT2kHak4nnOkx3DVFbNcq4FehGw=,tag:S5EiXEsoId+pGYaQ8lq7JA==,type:str] +print: + smtp-password: ENC[AES256_GCM,data:XoaLiEpqAdKapeS9YoBfh2w7HFuTCV9rHIciH+qUbhHcdsgVpnPMsSlC,iv:WxfP5d2K9soJPoRPuS6O6PbNvo4TBQjPGiV0e+a501Q=,tag:ZsTdR+b/oYFAYz/MN73PFg==,type:str] sssd: env: ENC[AES256_GCM,data:9IbU7uaElmemQHVUvsM88hcyNl3WFehgQeLZPtUxt2Sd0IECm8qNkQhWJ4kuvoBnQsdsUrFm/0QuW7AfDFOeE7FxMxg0,iv:dyzsYHlqClWbfzsoJ36iYjaXWpidB1ZqHXI7RP7js2Y=,tag:97FMOeVwAEy8Ka79uZKC8Q==,type:str] sops: @@ -17,8 +19,8 @@ sops: TWV3NWFobHVGKzROOFIxVTZQRlJ2RkUK8N5Ay4rnQeKuKysYVqf3OeUc2f4nWrj7 sAZtl2eD973f7tj/eEJggX1zH3IStTcH0Ytrgq2rWVgpt8yA6fw3Sg== -----END AGE ENCRYPTED FILE----- - lastmodified: "2023-12-26T17:17:20Z" - mac: ENC[AES256_GCM,data:9wrm9VKLwSQ7D6ohIWdtOKEQeKem8hPn7EGks7bvi3mAaBuMuO47+u+cH2zsRIjgLFaKlo1Rgji16Jr16LeyhpKdMaK+zssdKaFN2R7eV99eM6OG19qqIypPzPAljgGrFeCtuJYECPxOVLksJGcvoHcGtfVu7qWfaCjLPomimj8=,iv:Wx4xWeNgqe+GGiSDVUJgksRwZnybs4F3QMLAWCuacZU=,tag:r6qTg6OuRur35fkTEes9Ww==,type:str] + lastmodified: "2024-01-29T13:36:12Z" + mac: ENC[AES256_GCM,data:CnoH4KmYy72E0L+X7SHYXrFH6z0KhRhfYXmIO8HnPlkYnwKXDeAYezv4kL3ItZG+8pnmbFdoyHxxVMT6rWtV//x16YPMI0zhwIEBs67ZxM+gzeei4fniktolydKmlXUgbtWw3/y3OtxzAn9Dne2LPz7CwN/imGOTgrWFYGWRhtU=,iv:gcurHYWPSijYRlt9FoutrGInWDOfSkjrNqwU6jxiHDk=,tag:qWhpQ9vLuuihOzJeOGYEog==,type:str] pgp: - created_at: "2023-12-26T17:17:20Z" enc: |-