From 9f4f97ad551ba1532672d75e7a3df0e427eeaf14 Mon Sep 17 00:00:00 2001 From: Greg Hellings Date: Tue, 20 Jan 2026 13:26:45 -0600 Subject: [PATCH] Almost add flake building --- flake.lock | 44 +++++++++++++++++++++++++++++++++++++++----- flake.nix | 15 +++++++++++---- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/flake.lock b/flake.lock index 3efb586..f9f98cb 100644 --- a/flake.lock +++ b/flake.lock @@ -18,18 +18,35 @@ "type": "github" } }, + "nix2container": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1767430085, + "narHash": "sha256-SiXJ6xv4pS2MDUqfj0/mmG746cGeJrMQGmoFgHLS25Y=", + "owner": "nlewo", + "repo": "nix2container", + "rev": "66f4b8a47e92aa744ec43acbb5e9185078983909", + "type": "github" + }, + "original": { + "owner": "nlewo", + "repo": "nix2container", + "type": "github" + } + }, "nixpkgs": { "locked": { - "lastModified": 1763934636, - "narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=", + "lastModified": 1767028467, + "narHash": "sha256-7G+2aXClSMaTY1ogpX14CAxjRsvyVzpE0GRwL71WO7g=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261", + "rev": "1cabc318c11299f07ca53e3cb719854682fe6eb3", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } @@ -49,10 +66,27 @@ "type": "github" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1763934636, + "narHash": "sha256-9glbI7f1uU+yzQCq5LwLgdZqx6svOhZWkd4JRY265fc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "ee09932cedcef15aaf476f9343d1dea2cb77e261", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nix2container": "nix2container", + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 602e14a..eb07123 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,9 @@ { description = "Standard images that Greg wants to build"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-parts.url = "github:hercules-ci/flake-parts"; + nix2container.url = "github:nlewo/nix2container"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; }; outputs = @@ -26,10 +27,16 @@ system, ... }: + let + lib' = import ./lib { inherit (pkgs) lib; }; + in { - _module.args.pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; + _module.args = { + pkgs = import nixpkgs { + inherit system; + config.allowUnfree = true; + }; + lib = lib'; }; packages = let