From: Ismaƫl Bouya Date: Thu, 31 Dec 2020 10:39:00 +0000 (+0100) Subject: Remove flaked modules X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=0ba91bdd57fd6b08f00197d65cd298c317aa164f;p=perso%2FImmae%2FConfig%2FNix.git Remove flaked modules --- diff --git a/modules/default.nix b/modules/default.nix index 059a9d8..53e3932 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,7 +2,7 @@ let flakeCompat = import ../lib/flake-compat.nix; in { - myids = ./myids.nix; + myids = (flakeCompat ../flakes/myuids).nixosModule; secrets = ./secrets.nix; filesWatcher = ./filesWatcher.nix; diff --git a/modules/myids.nix b/modules/myids.nix deleted file mode 100644 index 1a1a5d6..0000000 --- a/modules/myids.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ ... }: -{ - # Check that there is no clash with nixos/modules/misc/ids.nix - config = { - ids.uids = { - acme = 388; - backup = 389; - vhost = 390; - openarc = 391; - opendmarc = 392; - peertube = 394; - redis = 395; - nullmailer = 396; - mediagoblin = 397; - diaspora = 398; - mastodon = 399; - }; - ids.gids = { - nagios = 11; # commented in the ids file - acme = 388; - backup = 389; - vhost = 390; - openarc = 391; - opendmarc = 392; - peertube = 394; - redis = 395; - nullmailer = 396; - mediagoblin = 397; - diaspora = 398; - mastodon = 399; - }; - }; -} diff --git a/modules/openarc.nix b/modules/openarc.nix deleted file mode 100644 index 9dc49de..0000000 --- a/modules/openarc.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; - -let - - cfg = config.services.openarc; - - defaultSock = "local:/run/openarc/openarc.sock"; - - args = [ "-f" - "-p" cfg.socket - ] ++ optionals (cfg.configFile != null) [ "-c" cfg.configFile ]; - -in { - - ###### interface - - options = { - - services.openarc = { - - enable = mkOption { - type = types.bool; - default = false; - description = "Whether to enable the OpenARC sender authentication system."; - }; - - socket = mkOption { - type = types.str; - default = defaultSock; - description = "Socket which is used for communication with OpenARC."; - }; - - user = mkOption { - type = types.str; - default = "opendmarc"; - description = "User for the daemon."; - }; - - group = mkOption { - type = types.str; - default = "opendmarc"; - description = "Group for the daemon."; - }; - - configFile = mkOption { - type = types.nullOr types.path; - default = null; - description = "Additional OpenARC configuration."; - }; - - }; - - }; - - - ###### implementation - - config = mkIf cfg.enable { - - users.users = optionalAttrs (cfg.user == "openarc") (singleton - { name = "openarc"; - group = cfg.group; - uid = config.ids.uids.openarc; - }); - - users.groups = optionalAttrs (cfg.group == "openarc") (singleton - { name = "openarc"; - gid = config.ids.gids.openarc; - }); - - environment.systemPackages = [ pkgs.openarc ]; - - systemd.services.openarc = { - description = "OpenARC daemon"; - after = [ "network.target" ]; - wantedBy = [ "multi-user.target" ]; - - serviceConfig = { - ExecStart = "${pkgs.openarc}/bin/openarc ${escapeShellArgs args}"; - User = cfg.user; - Group = cfg.group; - RuntimeDirectory = optional (cfg.socket == defaultSock) "openarc"; - PermissionsStartOnly = true; - }; - }; - - }; -} diff --git a/pkgs/openarc/default.nix b/pkgs/openarc/default.nix deleted file mode 100644 index e5c9a81..0000000 --- a/pkgs/openarc/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ stdenv, autoconf, automake, file, libtool, libbsd, mylibs, openssl, pkg-config, libmilter }: - -stdenv.mkDerivation (mylibs.fetchedGithub ./openarc.json // rec { - buildInputs = [ automake autoconf libbsd libtool openssl pkg-config libmilter ]; - - configureFlags = [ - "--with-milter=${libmilter}" - ]; - preConfigure = '' - autoreconf --force --install - sed -i -e "s@/usr/bin/file@${file}/bin/file@" ./configure - ''; - meta = with stdenv.lib; { - description = "Open source ARC implementation"; - homepage = https://github.com/trusteddomainproject/OpenARC; - platforms = platforms.unix; - }; -}) diff --git a/pkgs/openarc/openarc.json b/pkgs/openarc/openarc.json deleted file mode 100644 index 1081b09..0000000 --- a/pkgs/openarc/openarc.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "tag": "355ee2a-master", - "meta": { - "name": "openarc", - "url": "https://github.com/trusteddomainproject/OpenARC", - "branch": "master" - }, - "github": { - "owner": "trusteddomainproject", - "repo": "OpenARC", - "rev": "355ee2a1ca85acccce494478991983b54f794f4e", - "sha256": "0101k6hwwf3pb3jrc88x86d4l698gjmynn9v2rpvxwxv200r2i65", - "fetchSubmodules": true - } -}