Better colorscheme generation
This commit is contained in:
parent
161c096f49
commit
84191c1a37
|
@ -1,8 +1,8 @@
|
|||
{ lib, pkgs, ... }: {
|
||||
colorscheme = name: image: rec {
|
||||
generate = pkgs.callPackage ({ runCommand, colorz }:
|
||||
runCommand "colors-${name}" { nativeBuildInputs = [ colorz ]; } ''
|
||||
colorz ${image} --no-preview -n 8 --minv 0 --maxv 255 | awk '{print $1} {print $2}' > $out
|
||||
generate = pkgs.callPackage ({ runCommand, colorpickle }:
|
||||
runCommand "colors-${name}" { nativeBuildInputs = [ colorpickle ]; } ''
|
||||
colorpickle ${image} --lighten 0.05 --bold-delta 0.1 > $out
|
||||
'') { };
|
||||
|
||||
colors = builtins.listToAttrs (lib.lists.imap0 (i: v: {
|
||||
|
|
165
flake.lock
165
flake.lock
|
@ -1,5 +1,25 @@
|
|||
{
|
||||
"nodes": {
|
||||
"colorpickle": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1681058620,
|
||||
"narHash": "sha256-dethIZN9+Tcu/FbcyQnS4e8Ly+S50tnjBdLQBscxcF4=",
|
||||
"owner": "AgathaSorceress",
|
||||
"repo": "colorpickle",
|
||||
"rev": "06b6ae85e8a141ccee67f3597ccf37ca61f8dcc3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "AgathaSorceress",
|
||||
"repo": "colorpickle",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"crane": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
@ -187,16 +207,16 @@
|
|||
"helix": {
|
||||
"inputs": {
|
||||
"nci": "nci",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"parts": "parts_2",
|
||||
"rust-overlay": "rust-overlay"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680646269,
|
||||
"narHash": "sha256-MRohWyeJJf3zwMWUt4XQnD1qbem0/3D0cbomvJ47YuE=",
|
||||
"lastModified": 1680958354,
|
||||
"narHash": "sha256-lU5r4RgrRmlqiRsefZFahvD/bsnKJbVHNRwRjBXg3fY=",
|
||||
"owner": "helix-editor",
|
||||
"repo": "helix",
|
||||
"rev": "531b745c54e5d316603601cc05ade50ab02066ab",
|
||||
"rev": "58e457a4e1037caf43c17dea93c5321c1ae74103",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -210,14 +230,14 @@
|
|||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"utils": "utils"
|
||||
"utils": "utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680597706,
|
||||
"narHash": "sha256-ZqJ3T+BxzjPH9TnmeUwS4Uu9ZQPeBXAFC9sUWlharT4=",
|
||||
"lastModified": 1680667162,
|
||||
"narHash": "sha256-2vgxK4j42y73S3XB2cThz1dSEyK9J9tfu4mhuEfAw68=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "ec06f419af79207b33d797064dfb3fc9dbe1df4a",
|
||||
"rev": "440faf5ae472657ef2d8cc7756d77b6ab0ace68d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -283,7 +303,26 @@
|
|||
},
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_4"
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1679567394,
|
||||
"narHash": "sha256-ZvLuzPeARDLiQUt6zSZFGOs+HZmE+3g4QURc8mkBsfM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "88cd22380154a2c36799fe8098888f0f59861a15",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "master",
|
||||
"repo": "naersk",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"naersk_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1679567394,
|
||||
|
@ -331,7 +370,7 @@
|
|||
"nix": {
|
||||
"inputs": {
|
||||
"lowdown-src": "lowdown-src",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixpkgs": "nixpkgs_4",
|
||||
"nixpkgs-regression": "nixpkgs-regression"
|
||||
},
|
||||
"locked": {
|
||||
|
@ -350,18 +389,16 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1680213900,
|
||||
"narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
|
||||
"owner": "nixos",
|
||||
"lastModified": 1681002951,
|
||||
"narHash": "sha256-nD9fXN7EVKGovtjrXIuA7Si9M6PD9b02GNtvQPTSuOk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
|
||||
"rev": "431bf1e6cdd494e5230fbb72884afb4ca612c578",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-lib": {
|
||||
|
@ -414,6 +451,38 @@
|
|||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681002951,
|
||||
"narHash": "sha256-nD9fXN7EVKGovtjrXIuA7Si9M6PD9b02GNtvQPTSuOk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "431bf1e6cdd494e5230fbb72884afb4ca612c578",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1680213900,
|
||||
"narHash": "sha256-cIDr5WZIj3EkKyCgj/6j3HBH4Jj1W296z7HTcWj1aMA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "e3652e0735fbec227f342712f180f4f21f0594f2",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1657693803,
|
||||
"narHash": "sha256-G++2CJ9u0E7NNTAi9n5G8TdDmGJXcIjkJ3NF8cetQB8=",
|
||||
|
@ -429,13 +498,13 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"nixpkgs_5": {
|
||||
"locked": {
|
||||
"lastModified": 1680588688,
|
||||
"narHash": "sha256-SW95w50Pdw3nivgTuCebtbbPqaCTp9ctnFMNj24vdck=",
|
||||
"lastModified": 1680865339,
|
||||
"narHash": "sha256-H6rmJ1CyJ3Q5ZyoLMYq/UEYMS9Q1orJjRpWiQ47HudE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "3e01f83884b8ed7cbafa784727fb343f1876d56f",
|
||||
"rev": "0040164e473509b4aee6aedb3b923e400d6df10b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -444,7 +513,7 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1680273054,
|
||||
"narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=",
|
||||
|
@ -458,7 +527,7 @@
|
|||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_5": {
|
||||
"nixpkgs_7": {
|
||||
"locked": {
|
||||
"lastModified": 1680273054,
|
||||
"narHash": "sha256-Bs6/5LpvYp379qVqGt9mXxxx9GSE789k3oFc+OAL07M=",
|
||||
|
@ -516,10 +585,11 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"colorpickle": "colorpickle",
|
||||
"helix": "helix",
|
||||
"home-manager": "home-manager",
|
||||
"mms": "mms",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"url-eater": "url-eater"
|
||||
}
|
||||
},
|
||||
|
@ -545,11 +615,26 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"url-eater": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_5",
|
||||
"utils": "utils_2"
|
||||
"naersk": "naersk_2",
|
||||
"nixpkgs": "nixpkgs_7",
|
||||
"utils": "utils_3"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1680708368,
|
||||
|
@ -566,12 +651,15 @@
|
|||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||
"lastModified": 1681037374,
|
||||
"narHash": "sha256-XL6X3VGbEFJZDUouv2xpKg2Aljzu/etPLv5e1FPt1q0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||
"rev": "033b9f258ca96a10e543d4442071f614dc3f8412",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -594,6 +682,21 @@
|
|||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_3": {
|
||||
"locked": {
|
||||
"lastModified": 1678901627,
|
||||
"narHash": "sha256-U02riOqrKKzwjsxc/400XnElV+UtPUQWpANPlyazjH0=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "93a2b84fc4b70d9e089d029deacc3583435c2ed6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
92
flake.nix
92
flake.nix
|
@ -14,65 +14,69 @@
|
|||
|
||||
url-eater.url = "github:AgathaSorceress/url-eater";
|
||||
|
||||
colorpickle.url = "github:AgathaSorceress/colorpickle";
|
||||
|
||||
helix.url = "github:helix-editor/helix";
|
||||
};
|
||||
outputs = { nixpkgs, home-manager, mms, helix, url-eater, ... }: {
|
||||
colmena = {
|
||||
network = {
|
||||
description = "Agatha's Nix Infra";
|
||||
outputs =
|
||||
{ nixpkgs, home-manager, mms, helix, url-eater, colorpickle, ... }: {
|
||||
colmena = {
|
||||
network = {
|
||||
description = "Agatha's Nix Infra";
|
||||
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
helix = helix.packages.${final.system}.default;
|
||||
url-eater = url-eater.defaultPackage.${final.system};
|
||||
})
|
||||
];
|
||||
nixpkgs = import nixpkgs {
|
||||
system = "x86_64-linux";
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
helix = helix.packages.${final.system}.default;
|
||||
url-eater = url-eater.defaultPackage.${final.system};
|
||||
colorpickle = colorpickle.defaultPackage.${final.system};
|
||||
})
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
bloodletting = {
|
||||
imports = [
|
||||
./common
|
||||
./hosts/bloodletting/configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
mms.module
|
||||
];
|
||||
bloodletting = {
|
||||
imports = [
|
||||
./common
|
||||
./hosts/bloodletting/configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
mms.module
|
||||
];
|
||||
|
||||
deployment = {
|
||||
targetUser = "root";
|
||||
targetHost = "bloodletting";
|
||||
deployment = {
|
||||
targetUser = "root";
|
||||
targetHost = "bloodletting";
|
||||
|
||||
tags = [ "prod" ];
|
||||
tags = [ "prod" ];
|
||||
|
||||
keys = {
|
||||
"nyandroid-token" = {
|
||||
keyCommand = [ "cat" "./secrets/nyandroid-token" ];
|
||||
destDir = "/var/lib/secrets/";
|
||||
};
|
||||
"rfc2136-technogothic-net" = {
|
||||
keyCommand = [ "cat" "./secrets/rfc2136-technogothic-net" ];
|
||||
destDir = "/var/lib/secrets/";
|
||||
keys = {
|
||||
"nyandroid-token" = {
|
||||
keyCommand = [ "cat" "./secrets/nyandroid-token" ];
|
||||
destDir = "/var/lib/secrets/";
|
||||
};
|
||||
"rfc2136-technogothic-net" = {
|
||||
keyCommand = [ "cat" "./secrets/rfc2136-technogothic-net" ];
|
||||
destDir = "/var/lib/secrets/";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
ritual = {
|
||||
imports = [
|
||||
./common
|
||||
./hosts/ritual/configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
ritual = {
|
||||
imports = [
|
||||
./common
|
||||
./hosts/ritual/configuration.nix
|
||||
(import "${home-manager}/nixos")
|
||||
];
|
||||
|
||||
deployment = {
|
||||
targetUser = "root";
|
||||
targetHost = "ritual";
|
||||
deployment = {
|
||||
targetUser = "root";
|
||||
targetHost = "ritual";
|
||||
|
||||
allowLocalDeployment = true;
|
||||
allowLocalDeployment = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue