From e0f3e2fe799b1949ba0dc93ff0ebb54b38a6044e Mon Sep 17 00:00:00 2001 From: aviac Date: Thu, 24 Apr 2025 17:21:13 +0200 Subject: [PATCH] feat: move colmena.nix to flake.nix and create flake.lock This also includes some little syntactical fixes. The commit is needed since colmena works mostly with nix' flake experiemental feature. It attempts to find a locked version of nixpkgs, which wasn't there yet. By using the standard name "flake.nix", nix automatically picks up the file and generates a `flake.lock` if it doesn't exist yet. This brings us one step closer to a buildable system. --- colmena.nix | 33 -------------------------------- flake.lock | 27 +++++++++++++++++++++++++++ flake.nix | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 33 deletions(-) delete mode 100644 colmena.nix create mode 100644 flake.lock create mode 100644 flake.nix diff --git a/colmena.nix b/colmena.nix deleted file mode 100644 index 3879af2..0000000 --- a/colmena.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; - }; - outputs = { nixpkgs, ... }: { - colmena = { - meta = { - nixpkgs = import nixpkgs { - system = "x86_64-linux"; - overlays = []; - }; - }; - - # needed ? - # - # deployment = { - # targetHost = "somehost.tld"; - # targetPort = 1234; - # targetUser = "luser"; - # }; - - git-system = { name, nodes, pkgs, ... }: { - import = "git_system.nix"; - }; - runner-system = { name, nodes, pkgs, ... }: { - import = "runner_system.nix"; - }; - dev-system = { name, nodes, pkgs, ... }: { - import = "dev_system.nix"; - }; - }; - }; -} \ No newline at end of file diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..16e093b --- /dev/null +++ b/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1745279238, + "narHash": "sha256-AQ7M9wTa/Pa/kK5pcGTgX/DGqMHyzsyINfN7ktsI7Fo=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9684b53175fc6c09581e94cc85f05ab77464c7e3", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-24.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..fe67172 --- /dev/null +++ b/flake.nix @@ -0,0 +1,54 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; + }; + + outputs = + { nixpkgs, ... }: + { + colmena = { + meta = { + nixpkgs = import nixpkgs { + system = "x86_64-linux"; + overlays = [ ]; + }; + }; + + git-system = + { + name, + nodes, + pkgs, + ... + }: + { + deployment = { + targetHost = "somehost.tld"; + targetPort = 1234; + targetUser = "luser"; + }; + imports = [ ./git_system.nix ]; + }; + runner-system = + { + name, + nodes, + pkgs, + ... + }: + { + imports = [ ./runner_system.nix ]; + }; + dev-system = + { + name, + nodes, + pkgs, + ... + }: + { + imports = [ ./dev_system.nix ]; + }; + }; + }; +}