From 923ce7feff875706adb1d336fb959fbdb06b3f14 Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Fri, 14 May 2021 10:17:53 -0700 Subject: [PATCH 1/2] tree: rename devlib -> digga --- flake.lock | 77 +++++++++++++++++++++++++++------------- flake.nix | 19 +++++----- modules/customBuilds.nix | 6 ++-- 3 files changed, 64 insertions(+), 38 deletions(-) diff --git a/flake.lock b/flake.lock index 3e6b0f3..a4e7fd6 100644 --- a/flake.lock +++ b/flake.lock @@ -69,29 +69,6 @@ "type": "github" } }, - "devlib": { - "inputs": { - "deploy": "deploy", - "devshell": "devshell", - "nixpkgs": [ - "nixos" - ], - "utils": "utils_2" - }, - "locked": { - "lastModified": 1620950194, - "narHash": "sha256-3fh8kUxZ/by7QP7vop+C+X6nj/YzYHnld9epGbRWKQ0=", - "owner": "divnix", - "repo": "devlib", - "rev": "213afcefb2db0bb5fd3fad871303c43b158d8204", - "type": "github" - }, - "original": { - "owner": "divnix", - "repo": "devlib", - "type": "github" - } - }, "devshell": { "locked": { "lastModified": 1618523768, @@ -107,6 +84,28 @@ "type": "github" } }, + "digga": { + "inputs": { + "deploy": "deploy", + "devshell": "devshell", + "nixlib": "nixlib", + "nixpkgs": "nixpkgs_2", + "utils": "utils_2" + }, + "locked": { + "lastModified": 1621012625, + "narHash": "sha256-xRBbDpQDUz3mSwL2WoePz6c3zIUtZ2ML3qW0B9CVspU=", + "owner": "divnix", + "repo": "digga", + "rev": "b0de71f4924e513e21d21a0ec60a2cb180f2187c", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "digga", + "type": "github" + } + }, "flake-compat": { "flake": false, "locked": { @@ -229,6 +228,21 @@ "type": "github" } }, + "nixlib": { + "locked": { + "lastModified": 1620519687, + "narHash": "sha256-+6Dd72b2CASuXm2W7KRxZIE7AOy/dj4mU28vaF+zxcs=", + "owner": "divnix", + "repo": "nixpkgs.lib", + "rev": "c7b6169809c5f74dd0c34f3d69e9d12ba4d448de", + "type": "github" + }, + "original": { + "owner": "divnix", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixos": { "locked": { "lastModified": 1615797423, @@ -275,6 +289,21 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1620962350, + "narHash": "sha256-9ASW4d4/Z8HmRvuJI8rxbEOTbXTBpQ8y+CmFYBwtXzE=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "5d4a430472cafada97888cc80672fab255231f57", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, "nur": { "locked": { "lastModified": 1615921934, @@ -325,7 +354,7 @@ "inputs": { "ci-agent": "ci-agent", "darwin": "darwin", - "devlib": "devlib", + "digga": "digga", "home": "home", "latest": "latest", "naersk": "naersk_2", diff --git a/flake.nix b/flake.nix index 59d9155..212df34 100644 --- a/flake.nix +++ b/flake.nix @@ -5,10 +5,7 @@ { nixos.url = "nixpkgs/nixos-unstable"; latest.url = "nixpkgs"; - devlib.url = "github:divnix/devlib"; - devlib.inputs = { - nixpkgs.follows = "nixos"; - }; + digga.url = "github:divnix/digga"; ci-agent = { url = "github:hercules-ci/hercules-ci-agent"; @@ -26,8 +23,8 @@ pkgs.inputs.nixpkgs.follows = "nixos"; }; - outputs = inputs@{ self, pkgs, devlib, nixos, ci-agent, home, nixos-hardware, nur, ... }: - devlib.lib.mkFlake { + outputs = inputs@{ self, pkgs, digga, nixos, ci-agent, home, nixos-hardware, nur, ... }: + digga.lib.mkFlake { inherit self inputs; channelsConfig = { allowUnfree = true; }; @@ -35,7 +32,7 @@ channels = { nixos = { overlays = - (devlib.lib.importers.pathsIn ./overlays) ++ + (digga.lib.importers.pathsIn ./overlays) ++ [ ./pkgs/default.nix pkgs.overlay # for `srcs` @@ -45,7 +42,7 @@ latest = { }; }; - lib = import ./lib { lib = devlib.lib // nixos.lib; }; + lib = import ./lib { lib = digga.lib // nixos.lib; }; sharedOverlays = [ (final: prev: { @@ -66,7 +63,7 @@ ]; }; - imports = [ (devlib.lib.importers.importHosts ./hosts) ]; + imports = [ (digga.lib.importers.importHosts ./hosts) ]; hosts = { /* set host specific properties here */ NixOS = { }; @@ -86,9 +83,9 @@ }; }; - homeConfigurations = devlib.lib.mkHomeConfigurations self.nixosConfigurations; + homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; - deploy.nodes = devlib.lib.mkDeployNodes self.nixosConfigurations { }; + deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; #defaultTemplate = self.templates.flk; templates.flk.path = ./.; diff --git a/modules/customBuilds.nix b/modules/customBuilds.nix index 59ae524..875d23a 100644 --- a/modules/customBuilds.nix +++ b/modules/customBuilds.nix @@ -1,14 +1,14 @@ -{ lib, self, devlib, config, modules, channel, ... }: +{ lib, self, diggaLib, config, modules, channel, ... }: let mkBuild = buildModule: # TODO: get specialArgs as a module argument and drop builderArgs usage - channel.input.lib.nixosSystem (devlib.mergeAny config.lib.builderArgs { + channel.input.lib.nixosSystem (diggaLib.mergeAny config.lib.builderArgs { modules = [ buildModule ]; }); in { system.build = { - iso = (mkBuild (devlib.modules.isoConfig { + iso = (mkBuild (diggaLib.modules.isoConfig { inherit self; inherit (self) inputs; fullHostConfig = config; From dd6c481791cf38f5feb408253e40490ccd7d7716 Mon Sep 17 00:00:00 2001 From: Pacman99 Date: Fri, 14 May 2021 11:01:44 -0700 Subject: [PATCH 2/2] flake: format ourlib for consistency with digga --- flake.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/flake.nix b/flake.nix index 212df34..ffce39c 100644 --- a/flake.nix +++ b/flake.nix @@ -46,7 +46,9 @@ sharedOverlays = [ (final: prev: { - ourlib = self.lib; + lib = prev.lib.extend (lfinal: lprev: { + our = self.lib; + }); }) ]; @@ -56,7 +58,7 @@ channelName = "nixos"; modules = ./modules/module-list.nix; externalModules = [ - { _module.args.ourlib = self.lib; } + { _module.args.ourLib = self.lib; } ci-agent.nixosModules.agent-profile home.nixosModules.home-manager ./modules/customBuilds.nix