aboutsummaryrefslogtreecommitdiff
path: root/nix/scripts/default.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2025-07-07 16:03:51 -0700
committerFranck Cuny <franck@fcuny.net>2025-07-07 16:03:51 -0700
commitc214a560f0500e4be077086e557c3e6d336c7c27 (patch)
tree760d484ecdf1c242075394fbcd97927f95f1048c /nix/scripts/default.nix
parentadd a few tags to org-mode (diff)
downloadinfra-c214a560f0500e4be077086e557c3e6d336c7c27.tar.gz
move scripts managed by nix out of the flake
In order to keep the flake readable, the various scripts managed by nix are now moved to their own files under `nix/scripts`.
Diffstat (limited to 'nix/scripts/default.nix')
-rw-r--r--nix/scripts/default.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/nix/scripts/default.nix b/nix/scripts/default.nix
new file mode 100644
index 0000000..90851df
--- /dev/null
+++ b/nix/scripts/default.nix
@@ -0,0 +1,20 @@
+{
+ pkgs,
+ system,
+ inputs,
+}:
+let
+ common = import ./common.nix { inherit pkgs; };
+ darwin = import ./darwin.nix { inherit pkgs system inputs; };
+ linux = import ./linux.nix { inherit pkgs system inputs; };
+in
+{
+ common = common;
+ darwin = if pkgs.lib.hasSuffix "darwin" system then darwin else [ ];
+ linux = if pkgs.lib.hasSuffix "linux" system then linux else [ ];
+
+ all =
+ common
+ ++ (if pkgs.lib.hasSuffix "darwin" system then darwin else [ ])
+ ++ (if pkgs.lib.hasSuffix "linux" system then linux else [ ]);
+}