chore: update flake.lock
This commit is contained in:
parent
384fe2a6e1
commit
aab8ce92c3
5 changed files with 126 additions and 45 deletions
|
@ -1,3 +1,3 @@
|
|||
(final: prev: {
|
||||
spotifywm = final.callPackage ./spotifywm.nix {};
|
||||
spotifywm = final.callPackage ./spotifywm.nix {};
|
||||
})
|
||||
|
|
|
@ -1,21 +1,28 @@
|
|||
{lib, pkgs, ...}: let
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
mkPackage = name: v: {
|
||||
${name} = pkgs.callPackage ./${name} {};
|
||||
};
|
||||
|
||||
rmNotPackage = name: value:
|
||||
value == "directory" &&
|
||||
builtins.pathExists ./${name}/default.nix;
|
||||
value
|
||||
== "directory"
|
||||
&& builtins.pathExists ./${name}/default.nix;
|
||||
|
||||
packages = lib.attrsets.filterAttrs rmNotPackage (builtins.readDir ./.);
|
||||
|
||||
pkgSet = lib.attrsets.concatMapAttrs mkPackage packages;
|
||||
in {
|
||||
imports = [{
|
||||
options.customPkgs = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
}];
|
||||
imports = [
|
||||
{
|
||||
options.customPkgs = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
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
generated
72
flake.lock
generated
|
@ -100,11 +100,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1698882062,
|
||||
"narHash": "sha256-HkhafUayIqxXyHH1X8d9RDl1M2CkFgZLjKD3MzabiEo=",
|
||||
"lastModified": 1701473968,
|
||||
"narHash": "sha256-YcVE5emp1qQ8ieHUnxt1wCZCC3ZfAS+SRRWZ2TMda7E=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "8c9fa2545007b49a5db5f650ae91f227672c3877",
|
||||
"rev": "34fed993f1674c8d06d58b37ce1e0fe5eebcb9f5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -314,11 +314,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701071203,
|
||||
"narHash": "sha256-lQywA7QU/vzTdZ1apI0PfgCWNyQobXUYghVrR5zuIeM=",
|
||||
"lastModified": 1701433070,
|
||||
"narHash": "sha256-Gf9JStfENaUQ7YWFz3V7x/srIwr4nlnVteqaAxtwpgM=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "db1878f013b52ba5e4034db7c1b63e8d04173a86",
|
||||
"rev": "4a8545f5e737a6338814a4676dc8e18c7f43fc57",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -358,11 +358,11 @@
|
|||
"xdph": "xdph"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701393128,
|
||||
"narHash": "sha256-SYTztE8kHHpUVmVdHlQQVi2qhDi5oPQiXQ+K4/bc1nA=",
|
||||
"lastModified": 1701528705,
|
||||
"narHash": "sha256-SJENLaYS4hIuvQMgupKlclGZ5Mz40OvUc2Vu8vFBSow=",
|
||||
"owner": "hyprwm",
|
||||
"repo": "Hyprland",
|
||||
"rev": "8440a30231ea41a6b1dacc60a28837b265a6efec",
|
||||
"rev": "80b9b21f9f24b6e8db2fc6f7705cd124f436ffba",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -426,11 +426,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701389142,
|
||||
"narHash": "sha256-YBxJ2g7v8bCi1tncamTOPZvXMjG9+qNHphBSYLISOQ4=",
|
||||
"lastModified": 1701475484,
|
||||
"narHash": "sha256-Zg0SnZBAkiWOEu1fymQPdjLFigrSwHHq7WZmtb9Gowk=",
|
||||
"owner": "nix-community",
|
||||
"repo": "neovim-nightly-overlay",
|
||||
"rev": "9796182fba80ec1b2b24f119343d6121d1a47f28",
|
||||
"rev": "9575e3b4d35e88acacaf8493a2a28e2a71516cb9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -449,11 +449,11 @@
|
|||
},
|
||||
"locked": {
|
||||
"dir": "contrib",
|
||||
"lastModified": 1701382658,
|
||||
"narHash": "sha256-NeQ9lzphOm4ffRWz3Oo2sKAuOI+MyLi+uecuZeZTyvA=",
|
||||
"lastModified": 1701474944,
|
||||
"narHash": "sha256-24/lpcDjoVrNHcPzs1JfQpxZxl6/FaGCJ3VrPN3BHco=",
|
||||
"owner": "neovim",
|
||||
"repo": "neovim",
|
||||
"rev": "b32b5b2711ed338f4944c983a247f80c3163f87c",
|
||||
"rev": "f6e5366d0077e9f171651f37282cb5c47629d1b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -468,11 +468,11 @@
|
|||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701344951,
|
||||
"narHash": "sha256-F0jd1tbSFreIpxNGtqVCxzUHKdSxjKLl2XFZPiz83zY=",
|
||||
"lastModified": 1701522423,
|
||||
"narHash": "sha256-V5TQ/1loQnegDjfLh61DxBWEQZivYEBq2kQpT0fn2cQ=",
|
||||
"owner": "viperML",
|
||||
"repo": "nh",
|
||||
"rev": "c192a4a937ed3ab974e14c09b90092b226188281",
|
||||
"rev": "375c6cf57de3a839b7937358659bea526da27eae",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -508,11 +508,11 @@
|
|||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701364751,
|
||||
"narHash": "sha256-E1bufKdUPp3r+Tsfj0DyvuFz/hABUsQ/2n2NynPf0iw=",
|
||||
"lastModified": 1701479652,
|
||||
"narHash": "sha256-j1VN+ie5pAMTDyWyfClVAV0InQwN10emYjODpje2hGc=",
|
||||
"owner": "fufexan",
|
||||
"repo": "nix-gaming",
|
||||
"rev": "81af8b6232ed99c46413ca6d43aeb185c53f65b8",
|
||||
"rev": "b8f0f720bd51494c24f62a5f97d2ea397cbba43a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -583,11 +583,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1701156937,
|
||||
"narHash": "sha256-jpMJOFvOTejx211D8z/gz0ErRtQPy6RXxgD2ZB86mso=",
|
||||
"lastModified": 1701263465,
|
||||
"narHash": "sha256-lNXUIlkfyDyp9Ox21hr+wsEf/IBklLvb6bYcyeXbdRc=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7c4c20509c4363195841faa6c911777a134acdf3",
|
||||
"rev": "50aa30a13c4ab5e7ba282da460a3e3d44e9d0eb3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -638,11 +638,11 @@
|
|||
"nixpkgs": "nixpkgs_6"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701226630,
|
||||
"narHash": "sha256-7Mkgcr8icaOn41Uo+q44aKQ4fRXAgStKHPGUtEUoP5k=",
|
||||
"lastModified": 1701419847,
|
||||
"narHash": "sha256-gfZobhRzUj6ZX0wt803V8kxyIcI8VftjPmtWVuF9EGo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixpkgs-wayland",
|
||||
"rev": "1706d0acb842839a013aad5a7d82409e411ce2a5",
|
||||
"rev": "e0768c79657a2487bb28b7486b9f7abfc0761776",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -685,11 +685,11 @@
|
|||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1701068326,
|
||||
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
||||
"lastModified": 1701253981,
|
||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -717,11 +717,11 @@
|
|||
},
|
||||
"nixpkgs_6": {
|
||||
"locked": {
|
||||
"lastModified": 1701068326,
|
||||
"narHash": "sha256-vmMceA+q6hG1yrjb+MP8T0YFDQIrW3bl45e7z24IEts=",
|
||||
"lastModified": 1701253981,
|
||||
"narHash": "sha256-ztaDIyZ7HrTAfEEUt9AtTDNoCYxUdSd6NrRHaYOIxtk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8cfef6986adfb599ba379ae53c9f5631ecd2fd9c",
|
||||
"rev": "e92039b55bcd58469325ded85d4f58dd5a4eaf58",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -749,11 +749,11 @@
|
|||
},
|
||||
"nur": {
|
||||
"locked": {
|
||||
"lastModified": 1701403849,
|
||||
"narHash": "sha256-HhnZp2Mn7N0ySSbvZwZIMqNgNBw+DlZm0IgUq7TmqII=",
|
||||
"lastModified": 1701542727,
|
||||
"narHash": "sha256-SdihBXvt94ArmFSsNEZYO/BtHz9laN2YTyNI723W3p4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "NUR",
|
||||
"rev": "9425d59324d5d549b179c3b94e2e3dec55c20c3a",
|
||||
"rev": "2cd6706becb7fc6a52f755836bbbd2ef181deea8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
Loading…
Add table
Reference in a new issue