refactor(flake): refactor lib for flake-parts
This commit is contained in:
parent
c2b4d1adb9
commit
6f79c94f11
6 changed files with 70 additions and 71 deletions
40
flake.lock
generated
40
flake.lock
generated
|
@ -9,11 +9,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738328739,
|
"lastModified": 1738499276,
|
||||||
"narHash": "sha256-LHxIpDEsQ1MoIeAJSuUznJWLzFhceUPcCb8x1mRe/Fk=",
|
"narHash": "sha256-w1DEom//LsBM+hQ7PO5p4tpTE7yBmW05Rgw94uPkIUY=",
|
||||||
"owner": "chaotic-cx",
|
"owner": "chaotic-cx",
|
||||||
"repo": "nyx",
|
"repo": "nyx",
|
||||||
"rev": "61b2c985f6b4e07a7f2c44928a0e45fe6315ed96",
|
"rev": "316741ee3d1b0f6baea9af0f177db26455bf728b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -100,11 +100,11 @@
|
||||||
"nixpkgs-lib": ["nixpkgs"]
|
"nixpkgs-lib": ["nixpkgs"]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1736143030,
|
"lastModified": 1738453229,
|
||||||
"narHash": "sha256-+hu54pAoLDEZT9pjHlqL9DNzWz0NbUn8NEAHP7PQPzU=",
|
"narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "b905f6fc23a9051a6e1b741e1438dbfc0634c6de",
|
"rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -314,11 +314,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738142207,
|
"lastModified": 1738410390,
|
||||||
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
|
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
|
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -374,11 +374,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738142207,
|
"lastModified": 1738410390,
|
||||||
"narHash": "sha256-NGqpVVxNAHwIicXpgaVqJEJWeyqzoQJ9oc8lnK9+WC4=",
|
"narHash": "sha256-xvTo0Aw0+veek7hvEVLzErmJyQkEcRk6PSR4zsRQFEc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "9d3ae807ebd2981d593cddd0080856873139aa40",
|
"rev": "3a228057f5b619feb3186e986dbe76278d707b6e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -615,11 +615,11 @@
|
||||||
"nvf": "nvf"
|
"nvf": "nvf"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738191670,
|
"lastModified": 1738465927,
|
||||||
"narHash": "sha256-9FdrtLQvXKKsWwu1jLQrV0UnC54+9HBkfs1h2a8XlcM=",
|
"narHash": "sha256-HWfSQMxa4Cpxyo44cY3Y4OzsBu4etaeejsENUjUHUss=",
|
||||||
"ref": "master",
|
"ref": "master",
|
||||||
"rev": "dbc066fed939618282f1f079ddc5b4d5e89c39a7",
|
"rev": "841cddc0a522974439fe3332233ff334b7309e96",
|
||||||
"revCount": 20,
|
"revCount": 21,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://codeberg.org/amadaluzia/painless-neovim.git"
|
"url": "https://codeberg.org/amadaluzia/painless-neovim.git"
|
||||||
},
|
},
|
||||||
|
@ -3444,16 +3444,16 @@
|
||||||
"systems": "systems_3"
|
"systems": "systems_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1738363663,
|
"lastModified": 1738503390,
|
||||||
"narHash": "sha256-e3OQX21urTH68U80oL4PxIIISD6LuI1aJa62YNCPAZM=",
|
"narHash": "sha256-k+lXb31oXWD2Sc8/+F4Tw9IAOEvi14e3hnx/hpBSbcE=",
|
||||||
"owner": "amadaluzia",
|
"owner": "amadaluzia",
|
||||||
"repo": "wallpkgs",
|
"repo": "wallpkgs",
|
||||||
"rev": "c0e09f07d46e3fe51e8198fee9003ac3ed282fbe",
|
"rev": "bd56d6c493bc7338000842663b07362085fc1462",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "amadaluzia",
|
"owner": "amadaluzia",
|
||||||
"ref": "nord",
|
"ref": "docs-fixup",
|
||||||
"repo": "wallpkgs",
|
"repo": "wallpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
type = "github";
|
type = "github";
|
||||||
owner = "amadaluzia";
|
owner = "amadaluzia";
|
||||||
repo = "wallpkgs";
|
repo = "wallpkgs";
|
||||||
ref = "nord";
|
ref = "docs-fixup";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
pankomacs = {
|
pankomacs = {
|
||||||
|
@ -67,11 +67,10 @@
|
||||||
};
|
};
|
||||||
outputs = inputs @ {
|
outputs = inputs @ {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
|
||||||
flake-parts,
|
flake-parts,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
lib = nixpkgs.lib.extend (import ./lib {inherit inputs self;});
|
inherit ((import ./lib {inherit inputs self;}).flake) lib;
|
||||||
in
|
in
|
||||||
flake-parts.lib.mkFlake {
|
flake-parts.lib.mkFlake {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
|
@ -82,7 +81,7 @@
|
||||||
./hosts
|
./hosts
|
||||||
./overlays
|
./overlays
|
||||||
./shells
|
./shells
|
||||||
|
./lib
|
||||||
];
|
];
|
||||||
flake = {inherit lib;};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
flake = {
|
flake = {
|
||||||
nixosConfigurations = lib.mkHosts {
|
nixosConfigurations = builtins.mapAttrs (n: v: lib.mkHost (v // {host = n;})) {
|
||||||
python = {
|
python = {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
extraModules = [
|
extraModules = [
|
||||||
|
|
|
@ -8,13 +8,12 @@
|
||||||
tmpfiles = {
|
tmpfiles = {
|
||||||
".config/qutebrowser/config.py" = ./configs/qutebrowser/config.py;
|
".config/qutebrowser/config.py" = ./configs/qutebrowser/config.py;
|
||||||
".config/qutebrowser/theme" = ./configs/qutebrowser/theme;
|
".config/qutebrowser/theme" = ./configs/qutebrowser/theme;
|
||||||
".config/vesktop/themes/system24.theme.css" = pkgs.fetchurl {
|
".config/vesktop/themes/theme.user.css" = pkgs.fetchurl {
|
||||||
url = "https://raw.githubusercontent.com/refact0r/system24/refs/heads/main/theme/system24.theme.css";
|
url = "https://github.com/deathbeam/base16-discord/raw/refs/heads/main/themes/base16-nord.theme.css";
|
||||||
hash = "sha256-WJYNWeo1DdgOh7cFne6QSEHQagqapFznqWfeoCsqM+8=";
|
hash = "sha256-LofqgsVl+XKisk/dmb/PpwuLEWdEgchIfIw4xZs6LQw=";
|
||||||
};
|
};
|
||||||
".config/vesktop/settings/quickCss.css" = ./configs/vesktop/quickCss.css;
|
".config/vesktop/settings/quickCss.css" = ./configs/vesktop/quickCss.css;
|
||||||
".config/kanshi/" = ./configs/kanshi;
|
".config/kanshi/" = ./configs/kanshi;
|
||||||
".config/kitty/" = ./configs/kitty;
|
|
||||||
".config/dunst/" = ./configs/dunst;
|
".config/dunst/" = ./configs/dunst;
|
||||||
".config/niri/" = ./configs/niri;
|
".config/niri/" = ./configs/niri;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[main]
|
[main]
|
||||||
pad=6x6
|
pad=8x8
|
||||||
font=monospace:size=15
|
font=monospace:size=13
|
||||||
|
|
||||||
[colors]
|
[colors]
|
||||||
foreground=e5e9f0
|
foreground=e5e9f0
|
||||||
|
|
|
@ -1,47 +1,48 @@
|
||||||
{
|
{
|
||||||
inputs,
|
inputs,
|
||||||
self,
|
self,
|
||||||
}: _: _: let
|
...
|
||||||
mkHost = {
|
}: {
|
||||||
host,
|
flake.lib = inputs.nixpkgs.lib.extend (_: _: {
|
||||||
system,
|
mkHost = {
|
||||||
extraModules ? [],
|
host,
|
||||||
}:
|
system,
|
||||||
inputs.nixpkgs.lib.nixosSystem {
|
extraModules ? [],
|
||||||
inherit system;
|
}:
|
||||||
modules =
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
extraModules
|
inherit system;
|
||||||
++ [
|
modules =
|
||||||
../hosts/${host}
|
extraModules
|
||||||
inputs.self.nixosModules.default
|
++ [
|
||||||
({config, ...}: {
|
../hosts/${host}
|
||||||
config = {
|
inputs.self.nixosModules.default
|
||||||
nix = {
|
({config, ...}: {
|
||||||
settings.extra-experimental-features = [
|
config = {
|
||||||
"nix-command"
|
nix = {
|
||||||
"flakes"
|
settings.extra-experimental-features = [
|
||||||
];
|
"nix-command"
|
||||||
gc = {
|
"flakes"
|
||||||
automatic = true;
|
];
|
||||||
dates = "weekly";
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
environment.shellAliases = {
|
||||||
|
rebs = "nixos-rebuild --use-remote-sudo switch --flake .#${host}";
|
||||||
|
rebt = "nixos-rebuild --use-remote-sudo test --flake .#${host}";
|
||||||
|
};
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.self.overlays.default
|
||||||
|
];
|
||||||
|
networking.hostName = host;
|
||||||
};
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
})
|
||||||
environment.shellAliases = {
|
];
|
||||||
rebs = "nixos-rebuild --use-remote-sudo switch --flake .#${host}";
|
specialArgs = {
|
||||||
rebt = "nixos-rebuild --use-remote-sudo test --flake .#${host}";
|
inherit inputs self;
|
||||||
};
|
};
|
||||||
nixpkgs.overlays = [
|
|
||||||
inputs.self.overlays.default
|
|
||||||
];
|
|
||||||
networking.hostName = host;
|
|
||||||
};
|
|
||||||
})
|
|
||||||
];
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs self;
|
|
||||||
};
|
};
|
||||||
};
|
});
|
||||||
in {
|
|
||||||
mkHosts = builtins.mapAttrs (n: v: mkHost (v // {host = n;}));
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue