From f25e201e50720b5465aac58b511c71917d1c6c5d Mon Sep 17 00:00:00 2001 From: materus Date: Sun, 8 Oct 2023 16:12:00 +0200 Subject: [PATCH] inputs --- configurations/home/genHomes.nix | 4 +- configurations/profile/common/default.nix | 4 +- configurations/profile/common/nixpkgs.nix | 4 +- .../profile/common/packages/default.nix | 2 +- flake.lock | 159 ++++++++++-------- flake.nix | 7 +- inputs/flake.nix | 52 ++++++ 7 files changed, 150 insertions(+), 82 deletions(-) create mode 100644 inputs/flake.nix diff --git a/configurations/home/genHomes.nix b/configurations/home/genHomes.nix index 46b6b67..b862f02 100644 --- a/configurations/home/genHomes.nix +++ b/configurations/home/genHomes.nix @@ -12,7 +12,7 @@ let ([{ name = builtins.elemAt _list i; value = let host = builtins.elemAt hosts i; in - inputs.home-manager.lib.homeManagerConfiguration { + inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration { pkgs = materusFlake.nixosConfigurations.${host}.pkgs; extraSpecialArgs = { inherit inputs; inherit materusFlake; }; modules = [ @@ -29,7 +29,7 @@ let in (builtins.listToAttrs (_for 0)) // { #Make generic x86_64-linux user profile "username" - ${username} = inputs.home-manager.lib.homeManagerConfiguration { + ${username} = inputs.configInputs.inputs.home-manager.lib.homeManagerConfiguration { pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = {allowUnfree = true;}; }; extraSpecialArgs = { inherit inputs; inherit materusFlake; }; modules = [ diff --git a/configurations/profile/common/default.nix b/configurations/profile/common/default.nix index ab1dd56..c90dcd2 100644 --- a/configurations/profile/common/default.nix +++ b/configurations/profile/common/default.nix @@ -4,6 +4,6 @@ ./nixpkgs.nix ./packages ]; - config._module.args.materusPkgs = (import inputs.nixerus { inherit pkgs; }) // - (if pkgs.system == "x86_64-linux" then { i686Linux = import inputs.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); + config._module.args.materusPkgs = (import inputs.configInputs.inputs.nixerus { inherit pkgs; }) // + (if pkgs.system == "x86_64-linux" then { i686Linux = import inputs.configInputs.inputs.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); } diff --git a/configurations/profile/common/nixpkgs.nix b/configurations/profile/common/nixpkgs.nix index 1b8719e..a69ee29 100644 --- a/configurations/profile/common/nixpkgs.nix +++ b/configurations/profile/common/nixpkgs.nix @@ -16,7 +16,7 @@ in config.nixpkgs.config = lib.mkIf cfg.enable{ allowUnfree = lib.mkDefault true; joypixels.acceptLicense = lib.mkDefault true; - #firefox.enablePlasmaBrowserIntegration = lib.mkDefault config.services.xserver.desktopManager.plasma5.enable; + firefox.enablePlasmaBrowserIntegration = true; }; - #config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [inputs.emacs-overlay.overlay]; + config.nixpkgs.overlays = lib.mkIf cfg.enableOverlays [inputs.configInputs.inputs.emacs-overlay.overlay]; } diff --git a/configurations/profile/common/packages/default.nix b/configurations/profile/common/packages/default.nix index 6446bf9..d11d5a1 100644 --- a/configurations/profile/common/packages/default.nix +++ b/configurations/profile/common/packages/default.nix @@ -6,7 +6,7 @@ with materusPkgs.lib; ]; #Single Packages - #options.materus.profile.packages.home-manager = mkPrivateVar inputs.home-manager.packages.${pkgs.system}.home-manager; + options.materus.profile.packages.home-manager = mkPrivateVar inputs.configInputs.inputs.home-manager.packages.${pkgs.system}.home-manager; options.materus.profile.packages.firefox = mkPrivateVar pkgs.firefox; #Package Lists diff --git a/flake.lock b/flake.lock index a1d7120..864ed01 100644 --- a/flake.lock +++ b/flake.lock @@ -1,20 +1,41 @@ { "nodes": { + "configInputs": { + "inputs": { + "emacs-overlay": "emacs-overlay", + "home-manager": "home-manager", + "nixerus": "nixerus", + "nixpkgs": [ + "nixpkgs" + ], + "nur": "nur_2" + }, + "locked": { + "lastModified": 1, + "narHash": "sha256-LhzDCcv6HxSKcviWhwJfgrCC8UWs84+G1nZR7BHuqn0=", + "path": "./inputs", + "type": "path" + }, + "original": { + "path": "./inputs", + "type": "path" + } + }, "emacs-overlay": { "inputs": { "flake-utils": "flake-utils", "nixpkgs": [ - "nixerus", + "configInputs", "nixpkgs" ], "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1696357822, - "narHash": "sha256-wAXP7mk5zJ2sIW9cH1Oxf/f1AY3jtAgLFwvQMvJ9o4s=", + "lastModified": 1696760954, + "narHash": "sha256-XsbxElB7PjHUC15MKzuRMInQyIPSOohIUvrWs7d+knc=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "d88c1d26a6874ab9ef657753e170bbcee7506ce1", + "rev": "c7ac54dd8409046d50d17c11d4fa29a782b37804", "type": "github" }, "original": { @@ -43,6 +64,28 @@ } }, "home-manager": { + "inputs": { + "nixpkgs": [ + "configInputs", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1696737557, + "narHash": "sha256-YD/pjDjj/BNmisEvRdM/vspkCU3xyyeGVAUWhvVSi5Y=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "3c1d8758ac3f55ab96dcaf4d271c39da4b6e836d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "master", + "repo": "home-manager", + "type": "github" + } + }, + "home-manager_2": { "inputs": { "nixpkgs": "nixpkgs" }, @@ -59,45 +102,25 @@ "type": "indirect" } }, - "home-manager_2": { - "inputs": { - "nixpkgs": [ - "nixerus", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1696349083, - "narHash": "sha256-hs7GLezeY40EQpZSYYhfgcKhAogF3MBYKWZ1o+Bxrog=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "55ce64c3ca031eefb1adac85bb0025887ed7a221", - "type": "github" - }, - "original": { - "owner": "nix-community", - "ref": "master", - "repo": "home-manager", - "type": "github" - } - }, "nixerus": { "inputs": { - "emacs-overlay": "emacs-overlay", - "home-manager": "home-manager_2", + "home-manager": [ + "configInputs", + "home-manager" + ], "nixpkgs": [ + "configInputs", "nixpkgs" ], - "nur": "nur", - "private": "private" + "nur": "nur" }, "locked": { - "lastModified": 1696536322, - "narHash": "sha256-QalyabKvfLgK+VxpLp8PG193PhGo8b00jnliLtY8ot4=", - "owner": "materusPL", - "repo": "Nixerus", - "rev": "9eb2f3ec3326c81368a0322e2f62ce0a5f2bd96d", - "type": "github" + "dirtyRev": "29a0bd613c216d0c657e5a2f38bdba7fbd4f7ab7-dirty", + "dirtyShortRev": "29a0bd6-dirty", + "lastModified": 1696757058, + "narHash": "sha256-Cu6C1fMUE5spH53B4ccv8RHOlWkQ2V6SgJF0YoM7f/g=", + "type": "git", + "url": "file:///materus/config/Nixerus" }, "original": { "owner": "materusPL", @@ -124,11 +147,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1696039360, - "narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=", + "lastModified": 1696697597, + "narHash": "sha256-q26Qv4DQ+h6IeozF2o1secyQG0jt2VUT3V0K58jr3pg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "32dcb45f66c0487e92db8303a798ebc548cadedc", + "rev": "5a237aecb57296f67276ac9ab296a41c23981f56", "type": "github" }, "original": { @@ -156,11 +179,25 @@ }, "nur": { "locked": { - "lastModified": 1696362342, - "narHash": "sha256-cEWraMnkXlQS1gG/SoAdrYXxN53rrIZ+ZE5DrmiIu00=", + "lastModified": 1696758426, + "narHash": "sha256-8ebGev/aEoy9NUhexXLg1gFtcdgT+pmYXoc1rg4U5TM=", "owner": "nix-community", "repo": "NUR", - "rev": "c16910a91529fb6ac161feaf427c34e8ab118d8c", + "rev": "2a1a76ccc91abc61c09521931253f9fe9e012a85", + "type": "github" + }, + "original": { + "id": "nur", + "type": "indirect" + } + }, + "nur_2": { + "locked": { + "lastModified": 1696758426, + "narHash": "sha256-8ebGev/aEoy9NUhexXLg1gFtcdgT+pmYXoc1rg4U5TM=", + "owner": "nix-community", + "repo": "NUR", + "rev": "2a1a76ccc91abc61c09521931253f9fe9e012a85", "type": "github" }, "original": { @@ -170,20 +207,18 @@ "type": "github" } }, - "nur_2": { + "nur_3": { "locked": { - "lastModified": 1696749357, - "narHash": "sha256-DOinkqGrYPGqE0cQ6iQfN8Rwhdj43OGmn4U0402PSKk=", + "lastModified": 1696758426, + "narHash": "sha256-8ebGev/aEoy9NUhexXLg1gFtcdgT+pmYXoc1rg4U5TM=", "owner": "nix-community", "repo": "NUR", - "rev": "f77ed4768c0b2763cae81a30a1905145178c105e", + "rev": "2a1a76ccc91abc61c09521931253f9fe9e012a85", "type": "github" }, "original": { - "owner": "nix-community", - "ref": "master", - "repo": "NUR", - "type": "github" + "id": "nur", + "type": "indirect" } }, "private": { @@ -202,29 +237,13 @@ "type": "github" } }, - "private_2": { - "locked": { - "lastModified": 1684365822, - "narHash": "sha256-qly3A3GgIYYwCSYIrmYRI7SJ6Q1I4Mo2zipJOrj50r0=", - "owner": "materusPL", - "repo": "Nixerus", - "rev": "f07f3e99a7cd8680dd6bb082108a67830857e542", - "type": "github" - }, - "original": { - "owner": "materusPL", - "ref": "mock", - "repo": "Nixerus", - "type": "github" - } - }, "root": { "inputs": { - "home-manager": "home-manager", - "nixerus": "nixerus", + "configInputs": "configInputs", + "home-manager": "home-manager_2", "nixpkgs": "nixpkgs_2", - "nur": "nur_2", - "private": "private_2" + "nur": "nur_3", + "private": "private" } }, "systems": { diff --git a/flake.nix b/flake.nix index 194cabb..502a59e 100644 --- a/flake.nix +++ b/flake.nix @@ -13,11 +13,8 @@ repo = "Nixerus"; ref = "mock"; }; - nixerus = { - type = "github"; - owner = "materusPL"; - repo = "Nixerus"; - ref = "master"; + configInputs = { + url = "path:./inputs"; inputs = { nixpkgs.follows = "nixpkgs"; }; diff --git a/inputs/flake.nix b/inputs/flake.nix new file mode 100644 index 0000000..7175bb5 --- /dev/null +++ b/inputs/flake.nix @@ -0,0 +1,52 @@ +{ + description = "Materus hosts and user config"; + inputs = { + nixpkgs = { + type = "github"; + owner = "NixOS"; + repo = "nixpkgs"; + ref = "nixos-unstable"; + }; + home-manager = { + type = "github"; + owner = "nix-community"; + repo = "home-manager"; + ref = "master"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + emacs-overlay = { + type = "github"; + owner = "nix-community"; + repo = "emacs-overlay"; + ref = "master"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; + nur = { + type = "github"; + owner = "nix-community"; + repo = "NUR"; + ref = "master"; + }; + + }; + + + outputs = inputs @ { self, nixpkgs, home-manager, nur, ... }: + let + systems = [ + "x86_64-linux" + "i686-linux" + "aarch64-linux" + ]; + forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system); + in + rec { + + inherit inputs; + + }; +}