mixed: gpg fixes, refactoring

This commit is contained in:
Kat Inskip 2023-01-17 15:32:14 -05:00
parent 53eed4454d
commit 1ec876812e
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
50 changed files with 235 additions and 183 deletions

29
common/home.nix Normal file
View file

@ -0,0 +1,29 @@
{
config,
tree,
machine,
systemType,
lib,
...
}: let
inherit (lib.lists) optional;
in {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = with tree;
[
modules.home
kat.state
]
++ optional (tree.${systemType} ? home) tree.${systemType}.home;
users.kat.imports = with tree.kat; [
common
];
extraSpecialArgs = {
inherit tree machine;
parent = config;
};
};
}

23
common/nix.nix Normal file
View file

@ -0,0 +1,23 @@
{
config,
lib,
inputs,
...
}: let
inherit (lib.attrsets) mapAttrs mapAttrsToList;
inherit (lib.lists) optional;
inherit (lib.strings) versionAtLeast;
in {
nix = {
nixPath = mapAttrsToList (name: flake: "${name}=${flake}") inputs;
registry = mapAttrs (_: flake: {inherit flake;}) inputs;
settings = {
experimental-features = optional (versionAtLeast config.nix.package.version "2.4") "nix-command flakes";
substituters = ["https://arc.cachix.org" "https://kittywitch.cachix.org" "https://nix-community.cachix.org"];
trusted-public-keys = ["arc.cachix.org-1:DZmhclLkB6UO0rc0rBzNpwFbbaeLfyn+fYccuAy7YVY=" "kittywitch.cachix.org-1:KIzX/G5cuPw5WgrXad6UnrRZ8UDr7jhXzRTK/lmqyK0=" "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="];
auto-optimise-store = true;
trusted-users = ["root" "@wheel"];
};
};
}

7
common/overlay.nix Normal file
View file

@ -0,0 +1,7 @@
{inputs, ...}: {
nixpkgs = {
overlays = map (path: import "${path}/overlay.nix") [
inputs.arcexprs
];
};
}