From 7aadb62077a89a1069b9f4d7470479cf53471c6f Mon Sep 17 00:00:00 2001 From: _cry64 Date: Fri, 13 Feb 2026 03:28:03 +1000 Subject: [PATCH] install deploy-rs also begin adding support for multiple pkgs repos --- cerulean/nixos-module/config.nix | 14 --------- cerulean/nixos-module/default.nix | 10 +++++-- cerulean/nixos-module/nixpkgs.nix | 48 +++++++++++++++++++++++++++++++ cerulean/nixos-module/options.nix | 20 ------------- 4 files changed, 55 insertions(+), 37 deletions(-) delete mode 100644 cerulean/nixos-module/config.nix create mode 100644 cerulean/nixos-module/nixpkgs.nix delete mode 100644 cerulean/nixos-module/options.nix diff --git a/cerulean/nixos-module/config.nix b/cerulean/nixos-module/config.nix deleted file mode 100644 index 26d459c..0000000 --- a/cerulean/nixos-module/config.nix +++ /dev/null @@ -1,14 +0,0 @@ -# Copyright 2026 Emile Clark-Boman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -{...}: {} diff --git a/cerulean/nixos-module/default.nix b/cerulean/nixos-module/default.nix index cc92212..e7561ee 100644 --- a/cerulean/nixos-module/default.nix +++ b/cerulean/nixos-module/default.nix @@ -11,8 +11,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -{...} @ inputs: { - options = import ./options.nix inputs; +{deploy-rs, ...}: { + imports = [ + # ./nixpkgs.nix + ]; - config = import ./config.nix inputs; + environment.systemPackages = [ + deploy-rs.packages.default + ]; } diff --git a/cerulean/nixos-module/nixpkgs.nix b/cerulean/nixos-module/nixpkgs.nix new file mode 100644 index 0000000..f4bb2ae --- /dev/null +++ b/cerulean/nixos-module/nixpkgs.nix @@ -0,0 +1,48 @@ +# Copyright 2026 Emile Clark-Boman +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +{ + lib, + config, + ... +}: let + cfg = config.pkgrepo; +in { + options.pkgrepo = lib.mkOption { + type = lib.types.attrsOf lib.types.attrs; + default = {}; + description = "Declare and import custom package repositories."; + example = { + "pkgs" = { + source = "inputs.nixpkgs"; + system = "x86-64-linux"; + config = { + allowUnfree = true; + allowBroken = false; + }; + }; + }; + }; + + config.nixpkgs = + lib.mkIf (cfg ? pkgs) + (let + pkgs = cfg.pkgs; + in + lib.mkForce ( + (builtins.removeAttrs pkgs ["source"]) + // { + flake.source = pkgs.source; + } + )); +} diff --git a/cerulean/nixos-module/options.nix b/cerulean/nixos-module/options.nix deleted file mode 100644 index 8fb6a46..0000000 --- a/cerulean/nixos-module/options.nix +++ /dev/null @@ -1,20 +0,0 @@ -# Copyright 2026 Emile Clark-Boman -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -{lib, ...}: { - cerulean.nexus.node = { - group = lib.mkOption { - type = lib.types.enum; - }; - }; -}