From 3fa8a6b331f339725abc57a9d175fbf396eccc57 Mon Sep 17 00:00:00 2001 From: Daryl Ronningen Date: Wed, 28 Dec 2022 00:22:43 -0800 Subject: [PATCH] slowly change to flake-util-plus --- flake.lock | 110 ++++++++++++++++++------------------------- flake.nix | 45 +++++++++--------- users/relms/home.nix | 2 +- 3 files changed, 70 insertions(+), 87 deletions(-) diff --git a/flake.lock b/flake.lock index 79e472e..8bb2466 100644 --- a/flake.lock +++ b/flake.lock @@ -1,28 +1,12 @@ { "nodes": { - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1668681692, - "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "009399224d5e398d03b22badca40a37ac85412a1", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-utils": { "locked": { - "lastModified": 1667395993, - "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=", + "lastModified": 1644229661, + "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", "owner": "numtide", "repo": "flake-utils", - "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f", + "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", "type": "github" }, "original": { @@ -52,21 +36,22 @@ "type": "github" } }, - "neovim-flake": { + "neovim": { "inputs": { - "flake-utils": "flake-utils", + "flake-utils": [ + "utils" + ], "nixpkgs": [ - "neovim-nightly-overlay", "nixpkgs" ] }, "locked": { "dir": "contrib", - "lastModified": 1672110838, - "narHash": "sha256-xZ5Rgzy1Xy57HCR6/F11wvmEjsQTO0wNt6or+u7j2Uk=", + "lastModified": 1672215132, + "narHash": "sha256-KygNY7mTxySQ40zEsWh7p3toGM64ViHf8q3NXaZ4ENY=", "owner": "neovim", "repo": "neovim", - "rev": "d4af8c6202e8734ef4a3a3dfe249353f8d5ba551", + "rev": "a731a40f78a407387fd60589e39bda960bdf5f1b", "type": "github" }, "original": { @@ -76,43 +61,7 @@ "type": "github" } }, - "neovim-nightly-overlay": { - "inputs": { - "flake-compat": "flake-compat", - "neovim-flake": "neovim-flake", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1672128854, - "narHash": "sha256-Oc9/4BtJ49oQ3017qdvlsZIuTfKDg0aqoY06HRg6iDc=", - "owner": "nix-community", - "repo": "neovim-nightly-overlay", - "rev": "f41cb91799e062aa8c1fbd7f3390eacd72ea96f1", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "neovim-nightly-overlay", - "type": "github" - } - }, "nixpkgs": { - "locked": { - "lastModified": 1672057183, - "narHash": "sha256-GN7/10DNNvs1FPj9tlZA2qgNdFuYKKuS3qlHTqAxasQ=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "b139e44d78c36c69bcbb825b20dbfa51e7738347", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { "locked": { "lastModified": 1671983799, "narHash": "sha256-Z2Ro6hFPZHkBqkVXY5/aBUzxi5xizQGvuHQ9+T5B/ks=", @@ -128,11 +77,28 @@ "type": "github" } }, + "nur": { + "locked": { + "lastModified": 1672212779, + "narHash": "sha256-hJHpceQIoyTTvZyzImH2SUrG4Ob6bjraDLPTwJXDRI8=", + "owner": "nix-community", + "repo": "NUR", + "rev": "64a9e2b6b07f8e5067f8e9e67f9a787a58e4c901", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "NUR", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", - "neovim-nightly-overlay": "neovim-nightly-overlay", - "nixpkgs": "nixpkgs_2" + "neovim": "neovim", + "nixpkgs": "nixpkgs", + "nur": "nur", + "utils": "utils_2" } }, "utils": { @@ -149,6 +115,24 @@ "repo": "flake-utils", "type": "github" } + }, + "utils_2": { + "inputs": { + "flake-utils": "flake-utils" + }, + "locked": { + "lastModified": 1657226504, + "narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=", + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a", + "type": "github" + }, + "original": { + "owner": "gytis-ivaskevicius", + "repo": "flake-utils-plus", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index c966908..581bd26 100644 --- a/flake.nix +++ b/flake.nix @@ -3,34 +3,33 @@ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay"; + neovim.url = "github:neovim/neovim?dir=contrib"; + neovim.inputs.nixpkgs.follows = "nixpkgs"; + neovim.inputs.flake-utils.follows = "utils"; home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; + + nur.url = "github:nix-community/NUR"; + + utils.url = "github:gytis-ivaskevicius/flake-utils-plus"; }; - outputs = { self, nixpkgs, home-manager, neovim-nightly-overlay, ... }: let - system = "x86_64-linux"; - lib = nixpkgs.lib; - overlays = [ - neovim-nightly-overlay.overlay - ]; - pkgs = import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = overlays; - }; - in { - nixosConfigurations = { - skynet = lib.nixosSystem { - inherit system; - modules = [ ./hosts/skynet/configuration.nix ]; - }; - }; - homeConfigurations = { - relms = home-manager.lib.homeManagerConfiguration { - inherit pkgs; - modules = [ ./users/relms/home.nix ]; + outputs = inputs@{ self, nixpkgs, utils, home-manager, neovim, nur, ... }: utils.lib.mkFlake { + inherit self inputs; + + hostDefaults.system = "x86_64-linux"; + + hosts.skynet.modules = [ ./hosts/skynet/configuration.nix ]; + + homeConfigurations.relms = home-manager.lib.homeManagerConfiguration { + pkgs = import nixpkgs { + system = "x86_64-linux"; + overlays = [nur.overlay (utils.lib.genPkgOverlay neovim "neovim")]; }; + + modules = [ + ./users/relms/home.nix + ]; }; }; } diff --git a/users/relms/home.nix b/users/relms/home.nix index 0d96e03..ecfbced 100644 --- a/users/relms/home.nix +++ b/users/relms/home.nix @@ -151,7 +151,7 @@ programs.neovim = { enable = true; - package = pkgs.neovim-nightly; + package = pkgs.neovim; viAlias = true; vimAlias = true; vimdiffAlias = true;