chore: update flake.lock
This commit is contained in:
parent
384fe2a6e1
commit
aab8ce92c3
5 changed files with 126 additions and 45 deletions
|
@ -1,21 +1,28 @@
|
||||||
{lib, pkgs, ...}: let
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
mkPackage = name: v: {
|
mkPackage = name: v: {
|
||||||
${name} = pkgs.callPackage ./${name} {};
|
${name} = pkgs.callPackage ./${name} {};
|
||||||
};
|
};
|
||||||
|
|
||||||
rmNotPackage = name: value:
|
rmNotPackage = name: value:
|
||||||
value == "directory" &&
|
value
|
||||||
builtins.pathExists ./${name}/default.nix;
|
== "directory"
|
||||||
|
&& builtins.pathExists ./${name}/default.nix;
|
||||||
|
|
||||||
packages = lib.attrsets.filterAttrs rmNotPackage (builtins.readDir ./.);
|
packages = lib.attrsets.filterAttrs rmNotPackage (builtins.readDir ./.);
|
||||||
|
|
||||||
pkgSet = lib.attrsets.concatMapAttrs mkPackage packages;
|
pkgSet = lib.attrsets.concatMapAttrs mkPackage packages;
|
||||||
in {
|
in {
|
||||||
imports = [{
|
imports = [
|
||||||
|
{
|
||||||
options.customPkgs = lib.mkOption {
|
options.customPkgs = lib.mkOption {
|
||||||
type = lib.types.attrs;
|
type = lib.types.attrs;
|
||||||
};
|
};
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
customPkgs = pkgSet;
|
customPkgs = pkgSet;
|
||||||
}
|
}
|
||||||
|
|
25
common/pkgs/repl/default.nix
Normal file
25
common/pkgs/repl/default.nix
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
# modified from https://github.com/gytis-ivaskevicius/flake-utils/plus
|
||||||
|
{
|
||||||
|
coreutils,
|
||||||
|
gnused,
|
||||||
|
writeShellScriptBin,
|
||||||
|
}: let
|
||||||
|
repl = ./repl.nix;
|
||||||
|
example = command: desc: ''\n\u001b[33m ${command}\u001b[0m - ${desc}'';
|
||||||
|
in
|
||||||
|
writeShellScriptBin "repl" ''
|
||||||
|
case "$1" in
|
||||||
|
"-h"|"--help"|"help")
|
||||||
|
printf "%b\n\e[4mUsage\e[0m: \
|
||||||
|
${example "repl" "Loads system flake if available."} \
|
||||||
|
${example "repl /path/to/flake.nix" "Loads specified flake."}\n"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
if [ -z "$1" ]; then
|
||||||
|
nix repl ${repl}
|
||||||
|
else
|
||||||
|
nix repl --arg flakePath $(${coreutils}/bin/readlink -f $1 | ${gnused}/bin/sed 's|/flake.nix||') ${repl}
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
''
|
49
common/pkgs/repl/repl.nix
Normal file
49
common/pkgs/repl/repl.nix
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
{
|
||||||
|
flakePath ? ../../../.,
|
||||||
|
hostnamePath ? "/etc/hostname",
|
||||||
|
registryPath ? /etc/nix/registry.json,
|
||||||
|
}: let
|
||||||
|
inherit (builtins) getFlake head match currentSystem readFile pathExists filter fromJSON;
|
||||||
|
|
||||||
|
selfFlake =
|
||||||
|
if pathExists registryPath
|
||||||
|
then filter (it: it.from.id == "self") (fromJSON (readFile registryPath)).flakes
|
||||||
|
else [];
|
||||||
|
|
||||||
|
flakePath' =
|
||||||
|
toString
|
||||||
|
(
|
||||||
|
if flakePath != null
|
||||||
|
then flakePath
|
||||||
|
else if selfFlake != []
|
||||||
|
then (head selfFlake).to.path
|
||||||
|
else "/etc/nixos"
|
||||||
|
);
|
||||||
|
|
||||||
|
flake =
|
||||||
|
if pathExists flakePath'
|
||||||
|
then getFlake flakePath'
|
||||||
|
else {};
|
||||||
|
hostname =
|
||||||
|
if pathExists hostnamePath
|
||||||
|
then head (match "([a-zA-Z0-9\\-]+)\n" (readFile hostnamePath))
|
||||||
|
else "";
|
||||||
|
|
||||||
|
nixpkgsFromInputsPath = flake.inputs.nixpkgs.outPath or "";
|
||||||
|
nixpkgs =
|
||||||
|
flake.pkgs.${currentSystem}.nixpkgs
|
||||||
|
or (
|
||||||
|
if nixpkgsFromInputsPath != ""
|
||||||
|
then import nixpkgsFromInputsPath {}
|
||||||
|
else {}
|
||||||
|
);
|
||||||
|
|
||||||
|
nixpkgsOutput = removeAttrs (nixpkgs // nixpkgs.lib or {}) ["options" "config"];
|
||||||
|
in
|
||||||
|
{inherit flake;}
|
||||||
|
// flake
|
||||||
|
// builtins
|
||||||
|
// (flake.nixosConfigurations or {})
|
||||||
|
// flake.nixosConfigurations.${hostname} or {}
|
||||||
|
// nixpkgsOutput
|
||||||
|
// {getFlake = path: getFlake (toString path);}
|
72
flake.lock
72
flake.lock
|
@ -100,11 +100,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1698882062,
|
"lastModified": 1701473968,
|
||||||
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
|
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
|
||||||
"owner": "hercules-ci",
|
"owner": "hercules-ci",
|
||||||
"repo": "flake-parts",
|
"repo": "flake-parts",
|
||||||
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
|
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -314,11 +314,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701071203,
|
"lastModified": 1701433070,
|
||||||
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=",
|
"narHash": "sha256-Gf9JStfENaUQ7YWFz3V7x/srIwr4nlnVteqaAxtwpgM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86",
|
"rev": "4a8545f5e737a6338814a4676dc8e18c7f43fc57",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -358,11 +358,11 @@
|
||||||
"xdph": "xdph"
|
"xdph": "xdph"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701393128,
|
"lastModified": 1701528705,
|
||||||
"narHash": "sha256-SYTztE8kHHpUVmVdHlQQVi2qhDi5oPQiXQ+K4/bc1nA=",
|
"narHash": "sha256-SJENLaYS4hIuvQMgupKlclGZ5Mz40OvUc2Vu8vFBSow=",
|
||||||
"owner": "hyprwm",
|
"owner": "hyprwm",
|
||||||
"repo": "Hyprland",
|
"repo": "Hyprland",
|
||||||
"rev": "8440a30231ea41a6b1dacc60a28837b265a6efec",
|
"rev": "80b9b21f9f24b6e8db2fc6f7705cd124f436ffba",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -426,11 +426,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701389142,
|
"lastModified": 1701475484,
|
||||||
"narHash": "sha256-YBxJ2g7v8bCi1tncamTOPZvXMjG9+qNHphBSYLISOQ4=",
|
"narHash": "sha256-Zg0SnZBAkiWOEu1fymQPdjLFigrSwHHq7WZmtb9Gowk=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "neovim-nightly-overlay",
|
"repo": "neovim-nightly-overlay",
|
||||||
"rev": "9796182fba80ec1b2b24f119343d6121d1a47f28",
|
"rev": "9575e3b4d35e88acacaf8493a2a28e2a71516cb9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -449,11 +449,11 @@
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dir": "contrib",
|
"dir": "contrib",
|
||||||
"lastModified": 1701382658,
|
"lastModified": 1701474944,
|
||||||
"narHash": "sha256-NeQ9lzphOm4ffRWz3Oo2sKAuOI+MyLi+uecuZeZTyvA=",
|
"narHash": "sha256-24/lpcDjoVrNHcPzs1JfQpxZxl6/FaGCJ3VrPN3BHco=",
|
||||||
"owner": "neovim",
|
"owner": "neovim",
|
||||||
"repo": "neovim",
|
"repo": "neovim",
|
||||||
"rev": "b32b5b2711ed338f4944c983a247f80c3163f87c",
|
"rev": "f6e5366d0077e9f171651f37282cb5c47629d1b6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -468,11 +468,11 @@
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701344951,
|
"lastModified": 1701522423,
|
||||||
"narHash": "sha256-F0jd1tbSFreIpxNGtqVCxzUHKdSxjKLl2XFZPiz83zY=",
|
"narHash": "sha256-V5TQ/1loQnegDjfLh61DxBWEQZivYEBq2kQpT0fn2cQ=",
|
||||||
"owner": "viperML",
|
"owner": "viperML",
|
||||||
"repo": "nh",
|
"repo": "nh",
|
||||||
"rev": "c192a4a937ed3ab974e14c09b90092b226188281",
|
"rev": "375c6cf57de3a839b7937358659bea526da27eae",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -508,11 +508,11 @@
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701364751,
|
"lastModified": 1701479652,
|
||||||
"narHash": "sha256-E1bufKdUPp3r+Tsfj0DyvuFz/hABUsQ/2n2NynPf0iw=",
|
"narHash": "sha256-j1VN+ie5pAMTDyWyfClVAV0InQwN10emYjODpje2hGc=",
|
||||||
"owner": "fufexan",
|
"owner": "fufexan",
|
||||||
"repo": "nix-gaming",
|
"repo": "nix-gaming",
|
||||||
"rev": "81af8b6232ed99c46413ca6d43aeb185c53f65b8",
|
"rev": "b8f0f720bd51494c24f62a5f97d2ea397cbba43a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -583,11 +583,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701156937,
|
"lastModified": 1701263465,
|
||||||
"narHash": "sha256-jpMJOFvOTejx211D8z/gz0ErRtQPy6RXxgD2ZB86mso=",
|
"narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7c4c20509c4363195841faa6c911777a134acdf3",
|
"rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -638,11 +638,11 @@
|
||||||
"nixpkgs": "nixpkgs_6"
|
"nixpkgs": "nixpkgs_6"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701226630,
|
"lastModified": 1701419847,
|
||||||
"narHash": "sha256-7Mkgcr8icaOn41Uo+q44aKQ4fRXAgStKHPGUtEUoP5k=",
|
"narHash": "sha256-gfZobhRzUj6ZX0wt803V8kxyIcI8VftjPmtWVuF9EGo=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixpkgs-wayland",
|
"repo": "nixpkgs-wayland",
|
||||||
"rev": "1706d0acb842839a013aad5a7d82409e411ce2a5",
|
"rev": "e0768c79657a2487bb28b7486b9f7abfc0761776",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -685,11 +685,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701068326,
|
"lastModified": 1701253981,
|
||||||
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -717,11 +717,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs_6": {
|
"nixpkgs_6": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701068326,
|
"lastModified": 1701253981,
|
||||||
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -749,11 +749,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1701403849,
|
"lastModified": 1701542727,
|
||||||
"narHash": "sha256-HhnZp2Mn7N0ySSbvZwZIMqNgNBw+DlZm0IgUq7TmqII=",
|
"narHash": "sha256-SdihBXvt94ArmFSsNEZYO/BtHz9laN2YTyNI723W3p4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "9425d59324d5d549b179c3b94e2e3dec55c20c3a",
|
"rev": "2cd6706becb7fc6a52f755836bbbd2ef181deea8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
Loading…
Reference in a new issue