install deploy-rs

also begin adding support for multiple pkgs repos
This commit is contained in:
do butterflies cry? 2026-02-13 03:28:03 +10:00
parent 2512fc1c53
commit 7aadb62077
4 changed files with 55 additions and 37 deletions

View file

@ -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.
{...}: {}

View file

@ -11,8 +11,12 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
{...} @ inputs: { {deploy-rs, ...}: {
options = import ./options.nix inputs; imports = [
# ./nixpkgs.nix
];
config = import ./config.nix inputs; environment.systemPackages = [
deploy-rs.packages.default
];
} }

View file

@ -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;
}
));
}

View file

@ -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;
};
};
}