diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/athena-bccr/default.nix | 14 | ||||
| -rw-r--r-- | modules/athena-bccr/hm.nix | 14 | ||||
| -rw-r--r-- | modules/athena-bccr/options.nix | 30 | ||||
| -rw-r--r-- | modules/athena-bccr/sys.nix | 35 | ||||
| -rw-r--r-- | modules/default.nix | 3 | ||||
| -rw-r--r-- | modules/laptop/default.nix | 10 | ||||
| -rw-r--r-- | modules/laptop/sys.nix | 11 | ||||
| -rw-r--r-- | modules/nix-registry/default.nix | 16 | ||||
| -rw-r--r-- | modules/nix-registry/hm.nix | 23 | ||||
| -rw-r--r-- | modules/nix-registry/options.nix | 19 | ||||
| -rw-r--r-- | modules/soju/default.nix | 13 | ||||
| -rw-r--r-- | modules/soju/options.nix | 16 | ||||
| -rw-r--r-- | modules/soju/sys.nix | 47 | ||||
| -rw-r--r-- | modules/sway/default.nix | 13 | ||||
| -rw-r--r-- | modules/sway/options.nix | 3 | ||||
| -rw-r--r-- | modules/sway/sys.nix | 45 | ||||
| -rw-r--r-- | modules/thinkpad/default.nix | 11 | ||||
| -rw-r--r-- | modules/thinkpad/sys.nix | 30 | ||||
| -rw-r--r-- | modules/trivionomiconMotd/default.nix | 10 | ||||
| -rw-r--r-- | modules/trivionomiconMotd/sys.nix | 22 | ||||
| -rw-r--r-- | modules/yubico/default.nix | 13 | ||||
| -rw-r--r-- | modules/yubico/hm.nix | 9 | ||||
| -rw-r--r-- | modules/yubico/sys.nix | 14 |
23 files changed, 0 insertions, 421 deletions
diff --git a/modules/athena-bccr/default.nix b/modules/athena-bccr/default.nix deleted file mode 100644 index 93c5660..0000000 --- a/modules/athena-bccr/default.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - config, - lib, - pkgs, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "athena-bccr"; - hm = ./hm.nix; - sys = ./sys.nix; - options = ./options.nix; -} diff --git a/modules/athena-bccr/hm.nix b/modules/athena-bccr/hm.nix deleted file mode 100644 index 0678e3c..0000000 --- a/modules/athena-bccr/hm.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - pkgs, - lib, - cfg, - doctrine, - ... -}: let - athena = pkgs.${doctrine.prefix}.athena-bccr.${cfg.release}; -in { - home.packages = [ - athena.firmador - (athena.gaudi.override {inherit (cfg) gaudiHash;}) - ]; -} diff --git a/modules/athena-bccr/options.nix b/modules/athena-bccr/options.nix deleted file mode 100644 index eb61cf5..0000000 --- a/modules/athena-bccr/options.nix +++ /dev/null @@ -1,30 +0,0 @@ -{lib, ...}: -with lib.types; { - hm = { - gaudiHash = lib.mkOption { - type = nullOr str; - default = null; - description = "hash of the Gaudi client"; - }; - - release = lib.mkOption { - type = str; - default = "latest"; - description = "pinned athena-bccr release tag"; - }; - }; - - sys = { - group = lib.mkOption { - type = str; - default = "users"; - description = "user group with full access to the smartcard reader"; - }; - - release = lib.mkOption { - type = str; - default = "latest"; - description = "pinned athena-bccr release tag"; - }; - }; -} diff --git a/modules/athena-bccr/sys.nix b/modules/athena-bccr/sys.nix deleted file mode 100644 index 631185d..0000000 --- a/modules/athena-bccr/sys.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs, - lib, - cfg, - doctrine, - ... -}: let - athena = pkgs.${doctrine.prefix}.athena-bccr.${cfg.release}; -in { - environment = { - etc = { - "Athena".source = "${athena.ase-pkcs11}/etc/Athena"; - - "pkcs11/modules/asep11".text = '' - module: ${athena.libasep11} - ''; - }; - - systemPackages = [athena.ase-pkcs11]; - }; - - #FIXME: Extremadamente peligroso si BCCR o MICITT caen, investigar polĂtica nacional de root CA - security.pki.certificateFiles = ["${athena.bccr-cacerts}/root-ca.pem"]; - - services = { - pcscd.enable = true; - - udev.extraRules = '' - # Athena Smartcard Solutions, Inc. ASEDrive V3CR - ATTRS{idVendor}=="0dc3", ATTRS{idProduct}=="1004", MODE="660", GROUP="${cfg.group}", TAG+="uaccess" - ''; - }; - - users.groups.${cfg.group} = {}; -} diff --git a/modules/default.nix b/modules/default.nix deleted file mode 100644 index 0c0fd4c..0000000 --- a/modules/default.nix +++ /dev/null @@ -1,3 +0,0 @@ -{doctrine, ...}: { - imports = builtins.attrValues (doctrine.lib.importAll {root = ./.;}); -} diff --git a/modules/laptop/default.nix b/modules/laptop/default.nix deleted file mode 100644 index b908d47..0000000 --- a/modules/laptop/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "laptop"; - sys = ./sys.nix; -} diff --git a/modules/laptop/sys.nix b/modules/laptop/sys.nix deleted file mode 100644 index 252f49c..0000000 --- a/modules/laptop/sys.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - services = { - tlp.enable = lib.mkDefault true; - upower.enable = lib.mkDefault true; - }; -} diff --git a/modules/nix-registry/default.nix b/modules/nix-registry/default.nix deleted file mode 100644 index 8406d88..0000000 --- a/modules/nix-registry/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ - config, - lib, - pkgs, - doctrine, - flakes, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "nix-registry"; - hm = ./hm.nix; - options = ./options.nix; - - passthru = {inherit flakes;}; -} diff --git a/modules/nix-registry/hm.nix b/modules/nix-registry/hm.nix deleted file mode 100644 index 1c57e95..0000000 --- a/modules/nix-registry/hm.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - pkgs, - lib, - cfg, - flakes, - ... -}: let - registryName = name: - if name == "self" - then cfg.renameSelf - else name; - - registryFilter = { - nixpkgs = true; - unstable = true; - self = cfg.renameSelf != null; - }; -in { - nix.registry = - lib.mapAttrs' - (name: value: lib.nameValuePair (registryName name) {flake = value;}) - (lib.filterAttrs (name: _: registryFilter.${name} or cfg.allInputs) flakes); -} diff --git a/modules/nix-registry/options.nix b/modules/nix-registry/options.nix deleted file mode 100644 index e8898ec..0000000 --- a/modules/nix-registry/options.nix +++ /dev/null @@ -1,19 +0,0 @@ -{lib, ...}: -with lib.types; { - hm = { - allInputs = mkOption { - type = bool; - default = default; - description = '' - Include all flake inputs. If false, only 'nixpkgs' and 'unstable' - (if available) will be added to the flake registry by default. - ''; - }; - - renameSelf = mkOption { - type = nullOr str; - default = "self"; - description = "Registry name to use for the 'self' input"; - }; - }; -} diff --git a/modules/soju/default.nix b/modules/soju/default.nix deleted file mode 100644 index 2b302f0..0000000 --- a/modules/soju/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "soju"; - sys = ./sys.nix; - options = ./options.nix; -} diff --git a/modules/soju/options.nix b/modules/soju/options.nix deleted file mode 100644 index 06c3381..0000000 --- a/modules/soju/options.nix +++ /dev/null @@ -1,16 +0,0 @@ -{lib, ...}: -with lib.types; { - sys = { - fullyQualifiedDomain = lib.mkOption { - type = str; - example = "soju.trivionomicon.com"; - description = "fully qualified domain name to be used by soju"; - }; - - port = lib.mkOption { - type = port; - default = 6697; - description = "port to be used by soju"; - }; - }; -} diff --git a/modules/soju/sys.nix b/modules/soju/sys.nix deleted file mode 100644 index 83c3560..0000000 --- a/modules/soju/sys.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - config, - pkgs, - lib, - cfg, - doctrine, - ... -}: -with lib; { - security.acme.certs."${cfg.fullyQualifiedDomain}" = { - reloadServices = ["soju.service"]; - group = "soju"; - }; - - networking.firewall.allowedTCPPorts = [cfg.port]; - - services.soju = let - sojuCertDir = config.security.acme.certs."${cfg.fullyQualifiedDomain}".directory; - in { - enable = true; - hostName = "${cfg.fullyQualifiedDomain}"; - listen = ["ircs://[::]:${toString cfg.port}"]; - tlsCertificate = "${sojuCertDir}/fullchain.pem"; - tlsCertificateKey = "${sojuCertDir}/key.pem"; - }; - - systemd.services.soju = { - after = ["acme-${cfg.fullyQualifiedDomain}.service"]; - serviceConfig = { - DynamicUser = mkForce false; # fuck dynamic users - User = "soju"; - Group = "soju"; - ProtectSystem = "strict"; - ProtectHome = "read-only"; - PrivateTmp = true; - RemoveIPC = true; - }; - }; - - users = { - users.soju = { - isSystemUser = true; - group = "soju"; - }; - groups.soju = {}; - }; -} diff --git a/modules/sway/default.nix b/modules/sway/default.nix deleted file mode 100644 index 9f49e7c..0000000 --- a/modules/sway/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "sway"; - sys = ./sys.nix; - options = ./options.nix; -} diff --git a/modules/sway/options.nix b/modules/sway/options.nix deleted file mode 100644 index e433039..0000000 --- a/modules/sway/options.nix +++ /dev/null @@ -1,3 +0,0 @@ -{...}: { - sys = {}; -} diff --git a/modules/sway/sys.nix b/modules/sway/sys.nix deleted file mode 100644 index 9c8b664..0000000 --- a/modules/sway/sys.nix +++ /dev/null @@ -1,45 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - services.libinput.enable = true; - hardware.graphics.enable = true; - - xdg.portal = { - enable = true; - wlr.enable = true; - extraPortals = with pkgs; [xdg-desktop-portal-gtk]; - xdgOpenUsePortal = true; - - # warning: xdg-desktop-portal 1.17 reworked how portal implementations are loaded, you - # should either set `xdg.portal.config` or `xdg.portal.configPackages` - # to specify which portal backend to use for the requested interface. - # - # https://github.com/flatpak/xdg-desktop-portal/blob/1.18.1/doc/portals.conf.rst.in - # - # If you simply want to keep the behaviour in < 1.17, which uses the first - # portal implementation found in lexicographical order, use the following: - # - # xdg.portal.config.common.default = "*"; - config.common.default = "*"; - }; - - environment = { - sessionVariables.NIXOS_OZONE_WL = "1"; - - systemPackages = with pkgs; [ - qt5.qtwayland - qt6.qtwayland - ]; - }; - - programs = { - gtklock = { - enable = lib.mkDefault true; - - config = {}; - modules = []; - }; - }; -} diff --git a/modules/thinkpad/default.nix b/modules/thinkpad/default.nix deleted file mode 100644 index e210947..0000000 --- a/modules/thinkpad/default.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ - config, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "thinkpad"; - sys = ./sys.nix; - requires = ["laptop"]; -} diff --git a/modules/thinkpad/sys.nix b/modules/thinkpad/sys.nix deleted file mode 100644 index bc96146..0000000 --- a/modules/thinkpad/sys.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: { - # For suspending to RAM to work, set Config -> Power -> Sleep State to "Linux" in EFI. - # See https://wiki.archlinux.org/index.php/Lenovo_ThinkPad_X1_Carbon_(Gen_6)#Suspend_issues - # Fingerprint sensor requires a firmware-update to work. - - boot = { - extraModulePackages = with config.boot.kernelPackages; [acpi_call]; - extraModprobeConfig = "options iwlwifi 11n_disable=1 wd_disable=1"; - - # acpi_call makes tlp work for newer thinkpads - kernelModules = ["acpi_call"]; - - # Force use of the thinkpad_acpi driver for backlight control. - # This allows the backlight save/load systemd service to work. - kernelParams = ["acpi_backlight=native"]; - }; - - hardware.firmware = [pkgs.sof-firmware]; - - services = { - fprintd.enable = lib.mkDefault true; - thinkfan.enable = lib.mkDefault true; - tp-auto-kbbl.enable = lib.mkDefault true; - }; -} diff --git a/modules/trivionomiconMotd/default.nix b/modules/trivionomiconMotd/default.nix deleted file mode 100644 index 0844b5a..0000000 --- a/modules/trivionomiconMotd/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ - config, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "trivionomiconMotd"; - sys = ./sys.nix; -} diff --git a/modules/trivionomiconMotd/sys.nix b/modules/trivionomiconMotd/sys.nix deleted file mode 100644 index 5b38e3d..0000000 --- a/modules/trivionomiconMotd/sys.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: { - users.motd = '' - _ _ _ _ - | | | | | | | | - _ __ _____ _____ _ __ ___ __| | | |__ _ _ | |_| |__ ___ - | '_ \ / _ \ \ /\ / / _ \ '__/ _ \/ _` | | '_ \| | | | | __| '_ \ / _ \ - | |_) | (_) \ V V / __/ | | __/ (_| | | |_) | |_| | | |_| | | | __/ - | .__/ \___/ \_/\_/ \___|_| \___|\__,_| |_.__/ \__, | \__|_| |_|\___| - | | __/ | - |_|_____ _____ _______ _______ ____ _ _|___/_ __ __ _____ _____ ____ _ _ - |__ __| __ \|_ _\ \ / /_ _/ __ \| \ | |/ __ \| \/ |_ _/ ____/ __ \| \ | | - | | | |__) | | | \ \ / / | || | | | \| | | | | \ / | | || | | | | | \| | - | | | _ / | | \ \/ / | || | | | . ` | | | | |\/| | | || | | | | | . ` | - | | | | \ \ _| |_ \ / _| || |__| | |\ | |__| | | | |_| || |___| |__| | |\ | - |_| |_| \_\_____| \/ |_____\____/|_| \_|\____/|_| |_|_____\_____\____/|_| \_| - ''; -} diff --git a/modules/yubico/default.nix b/modules/yubico/default.nix deleted file mode 100644 index 71bed70..0000000 --- a/modules/yubico/default.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ - config, - lib, - pkgs, - doctrine, - ... -}: -doctrine.lib.mkModule { - inherit config; - name = "yubico"; - hm = ./hm.nix; - sys = ./sys.nix; -} diff --git a/modules/yubico/hm.nix b/modules/yubico/hm.nix deleted file mode 100644 index 8d06368..0000000 --- a/modules/yubico/hm.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - home.packages = [ - pkgs.yubikey-manager - ]; -} diff --git a/modules/yubico/sys.nix b/modules/yubico/sys.nix deleted file mode 100644 index 3cd009f..0000000 --- a/modules/yubico/sys.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ - pkgs, - lib, - ... -}: { - environment.etc."pkcs11/modules/ykcs11".text = '' - module: ${pkgs.yubico-piv-tool}/lib/libykcs11.so - ''; - - services = { - pcscd.enable = true; - udev.packages = [pkgs.yubikey-personalization]; - }; -} |
