From abc18954920b02491e8e2d3366f07f40f73c303e Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Wed, 23 Mar 2022 23:18:23 +0000 Subject: [PATCH 1/2] Remove examples from flake.nix inputs Subflakes are not really a stable part of the flakes api, so they shouldn't be included in the flake.nix. --- flake.lock | 64 +----------------------------------------------------- flake.nix | 4 +--- 2 files changed, 2 insertions(+), 66 deletions(-) diff --git a/flake.lock b/flake.lock index 975daaa..18c47f3 100644 --- a/flake.lock +++ b/flake.lock @@ -1,67 +1,6 @@ { "nodes": { - "examples": { - "inputs": { - "nixinate": "nixinate", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "narHash": "sha256-OsFQxO7h4YHrRQX8oHIjvgjTbeJx0oIP+pOIpfiwMiU=", - "path": "./examples", - "type": "path" - }, - "original": { - "path": "./examples", - "type": "path" - } - }, - "nixinate": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "narHash": "sha256-lk8eIWYxtHqDT4ZmSFuXMlG067RdPqLCQocnN+hNE7U=", - "path": "/etc/nixos/nixinate", - "type": "path" - }, - "original": { - "path": "/etc/nixos/nixinate", - "type": "path" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1640887906, - "narHash": "sha256-Eupk1UlNicCD2UNZuEKt6yhE6kFWAxXM/HyziOjG9CA=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "8a053bc2255659c5ca52706b9e12e76a8f50dbdd", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-21.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1641147223, - "narHash": "sha256-eJnmISYGR7LeqEev4bsI/qcU0SgeFKHs3jnL4vMGL+k=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "08370e1e271f6fe00d302bebbe510fe0e2c611ca", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-21.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { "locked": { "lastModified": 1643852787, "narHash": "sha256-RHrvroV61jcfTXfW0Rwc0qu/8lHmfYxSy49adyXkB0I=", @@ -79,8 +18,7 @@ }, "root": { "inputs": { - "examples": "examples", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs" } } }, diff --git a/flake.nix b/flake.nix index b72109d..6a986de 100644 --- a/flake.nix +++ b/flake.nix @@ -2,9 +2,8 @@ description = "Nixinate your systems 🕶️"; inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - examples.url = "path:./examples"; }; - outputs = { self, nixpkgs, examples, ... }: + outputs = { self, nixpkgs, ... }: let version = builtins.substring 0 8 self.lastModifiedDate; supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; @@ -71,6 +70,5 @@ }; }; nixinate = forAllSystems (system: nixpkgsFor.${system}.generateApps); - apps = nixinate.x86_64-linux examples; }; } -- 2.45.3 From 56878e1a42057d5b640aaa88c52930e76615bb7d Mon Sep 17 00:00:00 2001 From: matthewcroughan Date: Wed, 23 Mar 2022 23:53:17 +0000 Subject: [PATCH 2/2] Fix examples --- examples/flake.lock | 68 ++++++++++++++++++++++++++++++++++++++++++++- examples/flake.nix | 6 ++-- 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/examples/flake.lock b/examples/flake.lock index b926986..f89872e 100644 --- a/examples/flake.lock +++ b/examples/flake.lock @@ -1,6 +1,40 @@ { "nodes": { + "examples": { + "inputs": { + "nixinate": "nixinate_2", + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "narHash": "sha256-1iruH96Aame+4NAAwSwVZAbHzfnKxhMLjgoVvJar6ls=", + "path": "./examples", + "type": "path" + }, + "original": { + "path": "./examples", + "type": "path" + } + }, "nixinate": { + "inputs": { + "examples": "examples", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1646587087, + "narHash": "sha256-SwOHL/tte1H8VvftnxtWCr5FIlZaGvNy57P9sMSrZ5Q=", + "owner": "matthewcroughan", + "repo": "nixinate", + "rev": "886c6a2b3bef14cacf6c3021df0a75bb57f9fbc7", + "type": "github" + }, + "original": { + "owner": "matthewcroughan", + "repo": "nixinate", + "type": "github" + } + }, + "nixinate_2": { "inputs": { "nixpkgs": "nixpkgs" }, @@ -46,10 +80,42 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1647893727, + "narHash": "sha256-pOi7VdCb+s5Cwh5CS7YEZVRgH9uCmE87J5W7iXv29Ck=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "1ec61dd4167f04be8d05c45780818826132eea0d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1641147223, + "narHash": "sha256-eJnmISYGR7LeqEev4bsI/qcU0SgeFKHs3jnL4vMGL+k=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "08370e1e271f6fe00d302bebbe510fe0e2c611ca", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-21.11", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "nixinate": "nixinate", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_4" } } }, diff --git a/examples/flake.nix b/examples/flake.nix index 628edf1..9c6a426 100644 --- a/examples/flake.nix +++ b/examples/flake.nix @@ -1,7 +1,9 @@ +# TODO: use a relative path to nixinate, so that everything is contained within this repo. +# This would rely upon https://github.com/NixOS/nix/pull/5437 being merged. { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-21.11"; - nixinate.url = "path:///etc/nixos/nixinate"; + nixinate.url = "github:matthewcroughan/nixinate"; }; outputs = { self, nixpkgs, nixinate }: { @@ -10,7 +12,7 @@ myMachine = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ - { + { _module.args.nixinate = { host = "itchy.scratchy.com"; sshUser = "matthew"; -- 2.45.3