refactor(flake): refactor lib for flake-parts

This commit is contained in:
Artur Manuel 2025-02-02 16:37:47 +00:00
commit 6f79c94f11
6 changed files with 70 additions and 71 deletions

40
flake.lock generated
View file

@ -9,11 +9,11 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1738328739,
"narHash": "sha256-LHxIpDEsQ1MoIeAJSuUznJWLzFhceUPcCb8x1mRe/Fk=",
"lastModified": 1738499276,
"narHash": "sha256-w1DEom//LsBM+hQ7PO5p4tpTE7yBmW05Rgw94uPkIUY=",
"owner": "chaotic-cx",
"repo": "nyx",
"rev": "61b2c985f6b4e07a7f2c44928a0e45fe6315ed96",
"rev": "316741ee3d1b0f6baea9af0f177db26455bf728b",
"type": "github"
},
"original": {
@ -100,11 +100,11 @@
"nixpkgs-lib": ["nixpkgs"]
},
"locked": {
"lastModified": 1736143030,
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
"lastModified": 1738453229,
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
"type": "github"
},
"original": {
@ -314,11 +314,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1738142207,
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "github"
},
"original": {
@ -374,11 +374,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1738142207,
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
"lastModified": 1738410390,
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
"type": "github"
},
"original": {
@ -615,11 +615,11 @@
"nvf": "nvf"
},
"locked": {
"lastModified": 1738191670,
"narHash": "sha256-9FdrtLQvXKKsWwu1jLQrV0UnC54+9HBkfs1h2a8XlcM=",
"lastModified": 1738465927,
"narHash": "sha256-HWfSQMxa4Cpxyo44cY3Y4OzsBu4etaeejsENUjUHUss=",
"ref": "master",
"rev": "dbc066fed939618282f1f079ddc5b4d5e89c39a7",
"revCount": 20,
"rev": "841cddc0a522974439fe3332233ff334b7309e96",
"revCount": 21,
"type": "git",
"url": "https://codeberg.org/amadaluzia/painless-neovim.git"
},
@ -3444,16 +3444,16 @@
"systems": "systems_3"
},
"locked": {
"lastModified": 1738363663,
"narHash": "sha256-e3OQX21urTH68U80oL4PxIIISD6LuI1aJa62YNCPAZM=",
"lastModified": 1738503390,
"narHash": "sha256-k+lXb31oXWD2Sc8/+F4Tw9IAOEvi14e3hnx/hpBSbcE=",
"owner": "amadaluzia",
"repo": "wallpkgs",
"rev": "c0e09f07d46e3fe51e8198fee9003ac3ed282fbe",
"rev": "bd56d6c493bc7338000842663b07362085fc1462",
"type": "github"
},
"original": {
"owner": "amadaluzia",
"ref": "nord",
"ref": "docs-fixup",
"repo": "wallpkgs",
"type": "github"
}

View file

@ -35,7 +35,7 @@
type = "github";
owner = "amadaluzia";
repo = "wallpkgs";
ref = "nord";
ref = "docs-fixup";
inputs.nixpkgs.follows = "nixpkgs";
};
pankomacs = {
@ -67,11 +67,10 @@
};
outputs = inputs @ {
self,
nixpkgs,
flake-parts,
...
}: let
lib = nixpkgs.lib.extend (import ./lib {inherit inputs self;});
inherit ((import ./lib {inherit inputs self;}).flake) lib;
in
flake-parts.lib.mkFlake {
inherit inputs;
@ -82,7 +81,7 @@
./hosts
./overlays
./shells
./lib
];
flake = {inherit lib;};
};
}

View file

@ -4,7 +4,7 @@
...
}: {
flake = {
nixosConfigurations = lib.mkHosts {
nixosConfigurations = builtins.mapAttrs (n: v: lib.mkHost (v // {host = n;})) {
python = {
system = "x86_64-linux";
extraModules = [

View file

@ -8,13 +8,12 @@
tmpfiles = {
".config/qutebrowser/config.py" = ./configs/qutebrowser/config.py;
".config/qutebrowser/theme" = ./configs/qutebrowser/theme;
".config/vesktop/themes/system24.theme.css" = pkgs.fetchurl {
url = "https://raw.githubusercontent.com/refact0r/system24/refs/heads/main/theme/system24.theme.css";
hash = "sha256-WJYNWeo1DdgOh7cFne6QSEHQagqapFznqWfeoCsqM+8=";
".config/vesktop/themes/theme.user.css" = pkgs.fetchurl {
url = "https://github.com/deathbeam/base16-discord/raw/refs/heads/main/themes/base16-nord.theme.css";
hash = "sha256-LofqgsVl+XKisk/dmb/PpwuLEWdEgchIfIw4xZs6LQw=";
};
".config/vesktop/settings/quickCss.css" = ./configs/vesktop/quickCss.css;
".config/kanshi/" = ./configs/kanshi;
".config/kitty/" = ./configs/kitty;
".config/dunst/" = ./configs/dunst;
".config/niri/" = ./configs/niri;
};

View file

@ -1,6 +1,6 @@
[main]
pad=6x6
font=monospace:size=15
pad=8x8
font=monospace:size=13
[colors]
foreground=e5e9f0

View file

@ -1,7 +1,9 @@
{
inputs,
self,
}: _: _: let
...
}: {
flake.lib = inputs.nixpkgs.lib.extend (_: _: {
mkHost = {
host,
system,
@ -42,6 +44,5 @@
inherit inputs self;
};
};
in {
mkHosts = builtins.mapAttrs (n: v: mkHost (v // {host = n;}));
});
}