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
@ -37,49 +37,31 @@ let
|
||||
modules;
|
||||
};
|
||||
|
||||
global =
|
||||
let
|
||||
inherit (lock) nodes;
|
||||
global = {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
|
||||
lock = builtins.fromJSON (builtins.readFile ../flake.lock);
|
||||
in
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
|
||||
hardware.enableRedistributableFirmware = lib.mkDefault true;
|
||||
networking.hostName = hostName;
|
||||
|
||||
networking.hostName = hostName;
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${nixos}"
|
||||
"nixos-config=${self}/compat/nixos"
|
||||
"home-manager=${home}"
|
||||
];
|
||||
|
||||
nix.nixPath = [
|
||||
"nixpkgs=${nixos}"
|
||||
"nixos-config=${self}/compat/nixos"
|
||||
"home-manager=${home}"
|
||||
];
|
||||
nixpkgs = { inherit pkgs; };
|
||||
|
||||
nixpkgs = { inherit pkgs; };
|
||||
|
||||
nix.registry = {
|
||||
flk.flake = self;
|
||||
|
||||
nixos = {
|
||||
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;
|
||||
nix.registry = {
|
||||
devos.flake = self;
|
||||
nixos.flake = nixos;
|
||||
override.flake = override;
|
||||
};
|
||||
|
||||
system.configurationRevision = lib.mkIf (self ? rev) self.rev;
|
||||
};
|
||||
|
||||
local = {
|
||||
require = [
|
||||
(import "${toString ./.}/${hostName}.nix")
|
||||
|
@ -67,7 +67,8 @@ in
|
||||
ns = "n search --no-update-lock-file";
|
||||
nf = "n flake";
|
||||
nepl = "n repl '<nixpkgs>'";
|
||||
srch = "nsni";
|
||||
srch = "ns nixos";
|
||||
orch = "ns override";
|
||||
nrb = ifSudo "sudo nixos-rebuild";
|
||||
mn = ''
|
||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="manix '{}'" | xargs manix
|
||||
@ -94,21 +95,7 @@ in
|
||||
dn = ifSudo "s systemctl stop";
|
||||
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 = {
|
||||
|
Loading…
Reference in New Issue
Block a user