From c3fb88e4ced15cf2b2a27b2e2ed858eac2a2e845 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Sun, 11 Feb 2024 17:54:29 +0100 Subject: [PATCH] The module should work regardless of system --- flake.nix | 24 +++++++++++++----------- satnogs-client-docker-module.nix | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/flake.nix b/flake.nix index 00849ad..c67a8ec 100644 --- a/flake.nix +++ b/flake.nix @@ -6,16 +6,18 @@ nixpkgs.url = "github:NixOS/nixpkgs/23.11"; }; outputs = { self, nixpkgs, flake-utils }: - flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system: - let - pkgs = nixpkgs.legacyPackages.${system}; - in - { - nixosModules.default = { config, pkgs, ... }: { - imports = [ ./stanogs-client-module.nix ]; - }; + flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] + (system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + formatter = pkgs.nixpkgs-fmt; + } + ) // { + nixosModules.default = { config, pkgs, ... }: { + imports = [ ./satnogs-client-docker-module.nix ]; + }; - formatter = pkgs.nixpkgs-fmt; - } - ); + }; } diff --git a/satnogs-client-docker-module.nix b/satnogs-client-docker-module.nix index 228eab8..2c54f0e 100644 --- a/satnogs-client-docker-module.nix +++ b/satnogs-client-docker-module.nix @@ -142,7 +142,7 @@ in SATNOGS_STATION_LAT = cfg.satnogs-station-lat; SATNOGS_STATION_LON = cfg.satnogs-station-lon; }) - ++ map (f: "--env-file ${escapeShellArg f}") container.environmentFiles + ++ map (f: "--env-file ${escapeShellArg f}") cfg.additional-env-files ++ [ "up" ]); preStop = "${pkgs.docker-compose}/bin/docker-compose -f ${./satnogs-docker-compose.yml} down";