This commit is contained in:
Mateusz Słodkowicz 2023-10-08 16:12:00 +02:00
parent bf276c349f
commit f25e201e50
Signed by: materus
GPG Key ID: 28D140BCA60B4FD1
7 changed files with 150 additions and 82 deletions

View File

@ -12,7 +12,7 @@ let
([{ ([{
name = builtins.elemAt _list i; name = builtins.elemAt _list i;
value = let host = builtins.elemAt hosts i; in 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; pkgs = materusFlake.nixosConfigurations.${host}.pkgs;
extraSpecialArgs = { inherit inputs; inherit materusFlake; }; extraSpecialArgs = { inherit inputs; inherit materusFlake; };
modules = [ modules = [
@ -29,7 +29,7 @@ let
in in
(builtins.listToAttrs (_for 0)) // { (builtins.listToAttrs (_for 0)) // {
#Make generic x86_64-linux user profile "username" #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;}; }; pkgs = import inputs.nixpkgs { system = "x86_64-linux"; config = {allowUnfree = true;}; };
extraSpecialArgs = { inherit inputs; inherit materusFlake; }; extraSpecialArgs = { inherit inputs; inherit materusFlake; };
modules = [ modules = [

View File

@ -4,6 +4,6 @@
./nixpkgs.nix ./nixpkgs.nix
./packages ./packages
]; ];
config._module.args.materusPkgs = (import inputs.nixerus { inherit pkgs; }) // config._module.args.materusPkgs = (import inputs.configInputs.inputs.nixerus { inherit pkgs; }) //
(if pkgs.system == "x86_64-linux" then { i686Linux = import inputs.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { }); (if pkgs.system == "x86_64-linux" then { i686Linux = import inputs.configInputs.inputs.nixerus { pkgs = pkgs.pkgsi686Linux; }; } else { });
} }

View File

@ -16,7 +16,7 @@ in
config.nixpkgs.config = lib.mkIf cfg.enable{ config.nixpkgs.config = lib.mkIf cfg.enable{
allowUnfree = lib.mkDefault true; allowUnfree = lib.mkDefault true;
joypixels.acceptLicense = 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];
} }

View File

@ -6,7 +6,7 @@ with materusPkgs.lib;
]; ];
#Single Packages #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; options.materus.profile.packages.firefox = mkPrivateVar pkgs.firefox;
#Package Lists #Package Lists

View File

@ -1,20 +1,41 @@
{ {
"nodes": { "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": { "emacs-overlay": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": [
"nixerus", "configInputs",
"nixpkgs" "nixpkgs"
], ],
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1696357822, "lastModified": 1696760954,
"narHash": "sha256-wAXP7mk5zJ2sIW9cH1Oxf/f1AY3jtAgLFwvQMvJ9o4s=", "narHash": "sha256-XsbxElB7PjHUC15MKzuRMInQyIPSOohIUvrWs7d+knc=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "d88c1d26a6874ab9ef657753e170bbcee7506ce1", "rev": "c7ac54dd8409046d50d17c11d4fa29a782b37804",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -43,6 +64,28 @@
} }
}, },
"home-manager": { "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": { "inputs": {
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
@ -59,45 +102,25 @@
"type": "indirect" "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": { "nixerus": {
"inputs": { "inputs": {
"emacs-overlay": "emacs-overlay", "home-manager": [
"home-manager": "home-manager_2", "configInputs",
"home-manager"
],
"nixpkgs": [ "nixpkgs": [
"configInputs",
"nixpkgs" "nixpkgs"
], ],
"nur": "nur", "nur": "nur"
"private": "private"
}, },
"locked": { "locked": {
"lastModified": 1696536322, "dirtyRev": "29a0bd613c216d0c657e5a2f38bdba7fbd4f7ab7-dirty",
"narHash": "sha256-QalyabKvfLgK+VxpLp8PG193PhGo8b00jnliLtY8ot4=", "dirtyShortRev": "29a0bd6-dirty",
"owner": "materusPL", "lastModified": 1696757058,
"repo": "Nixerus", "narHash": "sha256-Cu6C1fMUE5spH53B4ccv8RHOlWkQ2V6SgJF0YoM7f/g=",
"rev": "9eb2f3ec3326c81368a0322e2f62ce0a5f2bd96d", "type": "git",
"type": "github" "url": "file:///materus/config/Nixerus"
}, },
"original": { "original": {
"owner": "materusPL", "owner": "materusPL",
@ -124,11 +147,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1696039360, "lastModified": 1696697597,
"narHash": "sha256-g7nIUV4uq1TOVeVIDEZLb005suTWCUjSY0zYOlSBsyE=", "narHash": "sha256-q26Qv4DQ+h6IeozF2o1secyQG0jt2VUT3V0K58jr3pg=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "32dcb45f66c0487e92db8303a798ebc548cadedc", "rev": "5a237aecb57296f67276ac9ab296a41c23981f56",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -156,11 +179,25 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1696362342, "lastModified": 1696758426,
"narHash": "sha256-cEWraMnkXlQS1gG/SoAdrYXxN53rrIZ+ZE5DrmiIu00=", "narHash": "sha256-8ebGev/aEoy9NUhexXLg1gFtcdgT+pmYXoc1rg4U5TM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "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" "type": "github"
}, },
"original": { "original": {
@ -170,20 +207,18 @@
"type": "github" "type": "github"
} }
}, },
"nur_2": { "nur_3": {
"locked": { "locked": {
"lastModified": 1696749357, "lastModified": 1696758426,
"narHash": "sha256-DOinkqGrYPGqE0cQ6iQfN8Rwhdj43OGmn4U0402PSKk=", "narHash": "sha256-8ebGev/aEoy9NUhexXLg1gFtcdgT+pmYXoc1rg4U5TM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "f77ed4768c0b2763cae81a30a1905145178c105e", "rev": "2a1a76ccc91abc61c09521931253f9fe9e012a85",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "id": "nur",
"ref": "master", "type": "indirect"
"repo": "NUR",
"type": "github"
} }
}, },
"private": { "private": {
@ -202,29 +237,13 @@
"type": "github" "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": { "root": {
"inputs": { "inputs": {
"home-manager": "home-manager", "configInputs": "configInputs",
"nixerus": "nixerus", "home-manager": "home-manager_2",
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_2",
"nur": "nur_2", "nur": "nur_3",
"private": "private_2" "private": "private"
} }
}, },
"systems": { "systems": {

View File

@ -13,11 +13,8 @@
repo = "Nixerus"; repo = "Nixerus";
ref = "mock"; ref = "mock";
}; };
nixerus = { configInputs = {
type = "github"; url = "path:./inputs";
owner = "materusPL";
repo = "Nixerus";
ref = "master";
inputs = { inputs = {
nixpkgs.follows = "nixpkgs"; nixpkgs.follows = "nixpkgs";
}; };

52
inputs/flake.nix Normal file
View File

@ -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;
};
}