From 83c130a3dc7f994277f437450532569076b6f5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Mon, 28 Oct 2024 10:56:58 +0100 Subject: [PATCH] make ci compatible --- default.nix | 14 ++++++++++++++ flake.lock | 17 +++++++++++++++++ flake.nix | 12 ++++++++---- 3 files changed, 39 insertions(+), 4 deletions(-) create mode 100644 default.nix diff --git a/default.nix b/default.nix new file mode 100644 index 00000000..2b625713 --- /dev/null +++ b/default.nix @@ -0,0 +1,14 @@ +( + import + ( + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + in + fetchTarball { + url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + {src = ./.;} +) +.defaultNix diff --git a/flake.lock b/flake.lock index 894b808b..2b587ed4 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,21 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1696426674, + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1730101162, @@ -17,6 +33,7 @@ }, "root": { "inputs": { + "flake-compat": "flake-compat", "nixpkgs": "nixpkgs" } } diff --git a/flake.nix b/flake.nix index 17e2b9a7..07859c14 100644 --- a/flake.nix +++ b/flake.nix @@ -2,6 +2,11 @@ description = "Lotteā€™s nix configuration"; inputs = { + flake-compat = { + url = "github:edolstra/flake-compat"; + flake = false; + }; + nixpkgs.url = "github:nixos/nixpkgs"; }; @@ -70,9 +75,8 @@ self.nixosContainers; in containers; - + hydraJobs = { + inherit (self) checks nixosConfigurations; + }; }; - hydraJobs = { - inherit (self) checks nixosConfigurations; - } }