1 parent
1947ee0c9f
commit
6fa74fead8
22 files changed
+116
-144
No files matched your search
@@ -2,21 +2,21 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myUtils,
|
||||
lib',
|
||||
osConfig ? null,
|
||||
inputs ? null,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
sops = myUtils.sopsAvailability config osConfig;
|
||||
sops = lib'.sopsAvailability config osConfig;
|
||||
standalone = osConfig == null;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf config.ai-tools.opencode.enable (
|
||||
lib.optionalAttrs standalone {
|
||||
sops = {
|
||||
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
|
||||
secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
|
||||
opencode = [ "api-key" ];
|
||||
};
|
||||
templates."opencode/auth.json" = {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myUtils,
|
||||
lib',
|
||||
osConfig ? null,
|
||||
inputs ? null,
|
||||
...
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
let
|
||||
cfg = config.anki;
|
||||
sops = myUtils.sopsAvailability config osConfig;
|
||||
sops = lib'.sopsAvailability config osConfig;
|
||||
standalone = osConfig == null;
|
||||
in
|
||||
{
|
||||
@@ -18,7 +18,7 @@ in
|
||||
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.optionalAttrs standalone {
|
||||
sops.secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
|
||||
sops.secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
|
||||
anki = [
|
||||
"sync-user"
|
||||
"sync-key"
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myUtils,
|
||||
lib',
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
let
|
||||
dirs = myUtils.dirNames ./.;
|
||||
dirs = lib'.dirNames ./.;
|
||||
hasDef = name: builtins.pathExists ./${name}/default.nix;
|
||||
in
|
||||
map (name: ./${name}) (builtins.filter hasDef dirs);
|
||||
|
||||
@@ -3,23 +3,22 @@
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
myUtils,
|
||||
paths,
|
||||
lib',
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.deploy;
|
||||
|
||||
hostNames = myUtils.dirNames paths.hosts;
|
||||
inherit (lib') hostNames;
|
||||
hostsWithKeys = lib.filter (
|
||||
hostname: builtins.pathExists (paths.hosts + "/${hostname}/ssh_host.pub")
|
||||
hostname: builtins.pathExists (lib'.hostsPath + "/${hostname}/ssh_host.pub")
|
||||
) hostNames;
|
||||
|
||||
colmena = inputs.colmena.packages.${pkgs.stdenv.hostPlatform.system}.colmena;
|
||||
deployRs = inputs.deploy-rs.packages.${pkgs.stdenv.hostPlatform.system}.default;
|
||||
|
||||
hostTags = hostname: (myUtils.hostMeta (paths.hosts + "/${hostname}")).tags;
|
||||
hostTags = hostname: (lib'.hostMeta hostname).tags;
|
||||
nodeTagsDecl = ''
|
||||
declare -A _colmena_node_tags=(
|
||||
${lib.concatMapStringsSep "\n" (
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
myUtils,
|
||||
lib',
|
||||
osConfig ? null,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.git;
|
||||
sops = myUtils.sopsAvailability config osConfig;
|
||||
sops = lib'.sopsAvailability config osConfig;
|
||||
standalone = osConfig == null;
|
||||
|
||||
personalEmail = sops.templates.".gitconfig.email".path;
|
||||
@@ -50,7 +50,7 @@ in
|
||||
config = lib.mkIf cfg.enable (
|
||||
lib.optionalAttrs standalone {
|
||||
sops = {
|
||||
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
|
||||
secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
|
||||
email = [
|
||||
"personal"
|
||||
"work"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
paths,
|
||||
lib',
|
||||
...
|
||||
}:
|
||||
|
||||
@@ -66,6 +66,6 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
home.sessionPath = lib.optional cfg.addBinToPath "${paths.dots}/.bin";
|
||||
home.sessionPath = lib.optional cfg.addBinToPath "${lib'.dotsPath}/.bin";
|
||||
};
|
||||
}
|
||||
@@ -2,17 +2,16 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myUtils,
|
||||
paths,
|
||||
lib',
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.ssh;
|
||||
hostNames = myUtils.dirNames paths.hosts;
|
||||
|
||||
hostsWithKeys = lib.filter (
|
||||
hostname: builtins.pathExists (paths.hosts + "/${hostname}/ssh_host.pub")
|
||||
) hostNames;
|
||||
hostname: builtins.pathExists (lib'.hostsPath + "/${hostname}/ssh_host.pub")
|
||||
) lib'.hostNames;
|
||||
in
|
||||
{
|
||||
options.ssh.enable = lib.mkEnableOption "ssh";
|
||||
@@ -37,7 +36,7 @@ in
|
||||
lib.genAttrs hostsWithKeys (
|
||||
hostname:
|
||||
let
|
||||
meta = myUtils.hostMeta (paths.hosts + "/${hostname}");
|
||||
meta = lib'.hostMeta hostname;
|
||||
in
|
||||
{
|
||||
User = meta.host.username;
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
myUtils,
|
||||
lib',
|
||||
osConfig ? null,
|
||||
inputs ? null,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
sops = myUtils.sopsAvailability config osConfig;
|
||||
sops = lib'.sopsAvailability config osConfig;
|
||||
standalone = osConfig == null;
|
||||
|
||||
syncHook = pkgs.writers.writePython3 "on-exit.sync.py" { flakeIgnore = [ "E501" ]; } ''
|
||||
@@ -64,7 +64,7 @@ in
|
||||
config = lib.mkIf config.taskwarrior.enable (
|
||||
lib.optionalAttrs standalone {
|
||||
sops = {
|
||||
secrets = myUtils.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" {
|
||||
secrets = lib'.mkSopsSecrets "${toString inputs.nix-secrets}/secrets" null {
|
||||
taskwarrior = [
|
||||
"sync-server-url"
|
||||
"sync-server-client-id"
|
||||
|
||||
Reference in new issue
Block a user