nix#registry: update names
Continuing the work from 487fa7ea26
,
simplify the registry entries a bit more by simply refering to the
input flakes. Also add alias `orch` for easy search `override`.
This commit is contained in:
parent
8733f2b5dc
commit
44bae21564
2 changed files with 21 additions and 52 deletions
|
@ -37,13 +37,7 @@ let
|
||||||
modules;
|
modules;
|
||||||
};
|
};
|
||||||
|
|
||||||
global =
|
global = {
|
||||||
let
|
|
||||||
inherit (lock) nodes;
|
|
||||||
|
|
||||||
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
|
||||||
in
|
|
||||||
{
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
|
|
||||||
|
@ -60,21 +54,9 @@ let
|
||||||
nixpkgs = { inherit pkgs; };
|
nixpkgs = { inherit pkgs; };
|
||||||
|
|
||||||
nix.registry = {
|
nix.registry = {
|
||||||
flk.flake = self;
|
devos.flake = self;
|
||||||
|
nixos.flake = nixos;
|
||||||
nixos = {
|
override.flake = override;
|
||||||
exact = true;
|
|
||||||
from = {
|
|
||||||
id = "nixos";
|
|
||||||
type = "indirect";
|
|
||||||
};
|
|
||||||
to = {
|
|
||||||
inherit (nixos) lastModified narHash rev;
|
|
||||||
|
|
||||||
path = override.outPath;
|
|
||||||
type = "path";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
||||||
|
|
|
@ -67,7 +67,8 @@ in
|
||||||
ns = "n search --no-update-lock-file";
|
ns = "n search --no-update-lock-file";
|
||||||
nf = "n flake";
|
nf = "n flake";
|
||||||
nepl = "n repl '<nixpkgs>'";
|
nepl = "n repl '<nixpkgs>'";
|
||||||
srch = "nsni";
|
srch = "ns nixos";
|
||||||
|
orch = "ns override";
|
||||||
nrb = ifSudo "sudo nixos-rebuild";
|
nrb = ifSudo "sudo nixos-rebuild";
|
||||||
mn = ''
|
mn = ''
|
||||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
||||||
|
@ -94,21 +95,7 @@ in
|
||||||
dn = ifSudo "s systemctl stop";
|
dn = ifSudo "s systemctl stop";
|
||||||
jtl = "journalctl";
|
jtl = "journalctl";
|
||||||
|
|
||||||
} // lib.mapAttrs'
|
};
|
||||||
(n: v:
|
|
||||||
let
|
|
||||||
prefix = lib.concatStrings (lib.take 2 (lib.stringToCharacters n));
|
|
||||||
ref = from:
|
|
||||||
if from ? ref
|
|
||||||
then "ns ${from.id}/${from.ref}"
|
|
||||||
else "ns ${from.id}";
|
|
||||||
in
|
|
||||||
lib.nameValuePair
|
|
||||||
"ns${prefix}"
|
|
||||||
(ref v.from)
|
|
||||||
)
|
|
||||||
config.nix.registry;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
|
|
Loading…
Reference in a new issue