From a52507732a9658ad601f90813c983f9b30948198 Mon Sep 17 00:00:00 2001 From: Ingolf Wagner Date: Mon, 1 Nov 2021 09:40:39 +0100 Subject: [PATCH] git rid of useless modules --- nixos/configs/workhorse/jenkins.nix | 11 +++-------- nixos/flake.nix | 15 ++------------- nixos/krops.nix | 15 +++++++++------ 3 files changed, 14 insertions(+), 27 deletions(-) diff --git a/nixos/configs/workhorse/jenkins.nix b/nixos/configs/workhorse/jenkins.nix index 209383e..de10033 100644 --- a/nixos/configs/workhorse/jenkins.nix +++ b/nixos/configs/workhorse/jenkins.nix @@ -37,12 +37,8 @@ in }; }; - sops.secrets.jenkins_token = { }; - - krops.userKeys."accessToken" = { - user = "jenkins"; - source = config.sops.secrets.jenkins_token.path; - requiredBy = [ "jenkins-job-builder.service" ]; + sops.secrets.jenkins_token = { + owner = "jenkins"; }; services.jenkins = { @@ -57,9 +53,8 @@ in # - mattermost plugin jobBuilder = { enable = true; - # create an access token in the admin users panel - accessTokenFile = config.krops.userKeys."accessToken".target; + accessTokenFile = config.sops.secrets.jenkins_token.path; accessUser = "admin"; # https://docs.openstack.org/infra/jenkins-job-builder/definition.html#modules diff --git a/nixos/flake.nix b/nixos/flake.nix index 1fbc2c0..8833809 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -20,17 +20,8 @@ url = "github:mrvandalo/home-manager-utils"; inputs.home-manager.follows = "home-manager"; }; - backup-module = { - url = "git+https://git.ingolf-wagner.de/nix-modules/backup.git"; - flake = false; - }; - krops-lib = { - url = "git+https://git.ingolf-wagner.de/nix-modules/krops.git"; - flake = false; - }; cluster-module = { - url = - "git+https://git.ingolf-wagner.de/nix-modules/cluster.git?rev=ef621797a30f8a57de16bf33672abdd411cbcece"; + url = "git+https://git.ingolf-wagner.de/nix-modules/cluster.git?rev=ef621797a30f8a57de16bf33672abdd411cbcece"; flake = false; }; nixpkgs-fmt = { @@ -46,9 +37,7 @@ , home-manager , home-manager-utils , doom-emacs-nix - , backup-module , nixpkgs-unstable - , krops-lib , cluster-module , polygon-art , nixpkgs-fmt @@ -59,7 +48,7 @@ nixosSystem = nixpkgs.lib.nixosSystem; defaultModules = [ sops-nix.nixosModules.sops - { imports = [ "${krops-lib}" "${cluster-module}" "${backup-module}" ]; } + { imports = [ "${cluster-module}" ]; } ({ pkgs, ... }: { nix = { # no channesl needed this way diff --git a/nixos/krops.nix b/nixos/krops.nix index f9ab275..aa28d58 100644 --- a/nixos/krops.nix +++ b/nixos/krops.nix @@ -4,8 +4,7 @@ let # command that ensures we use flake.nix during switch command = targetPath: let - commandLine = - "TMPDIR=/tmp nixos-rebuild test --flake ${targetPath} -L --keep-going"; + commandLine = "TMPDIR=/tmp nixos-rebuild test --flake ${targetPath} -L --keep-going"; in '' echo '${commandLine}' @@ -105,16 +104,20 @@ in (desktop { name = "sterni"; host = "sterni.private"; -}) // (desktop { +}) // +(desktop { name = "sternchen"; host = "sternchen.secret"; -}) // (server { +}) // +(server { name = "pepe"; host = "pepe.private"; -}) // (server { +}) // +(server { name = "workhorse"; host = "workhorse.private"; -}) // (server { +}) // +(server { name = "sputnik"; host = "sputnik.private"; })