1
1
mirror of https://github.com/divnix/digga.git synced 2024-12-23 16:11:51 +03:00
This commit is contained in:
nrdxp 2021-03-02 03:14:00 +00:00
parent 94568b17ab
commit f9719863ce
2 changed files with 21 additions and 52 deletions

View File

@ -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")

View File

@ -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 = {