diff --git a/modules/config/default.nix b/modules/config/default.nix index 365cce4..84398dc 100755 --- a/modules/config/default.nix +++ b/modules/config/default.nix @@ -106,6 +106,7 @@ let ip = genOptions stringType "address"; label = stringType; name = stringType; + short = stringType; sync = genOptions stringType "address"; wireguard = genOptions stringType "ip"; } diff --git a/modules/config/devices/config/lamdagibson.nix b/modules/config/devices/config/lamdagibson.nix index 3f21c4f..36dac85 100755 --- a/modules/config/devices/config/lamdagibson.nix +++ b/modules/config/devices/config/lamdagibson.nix @@ -6,6 +6,7 @@ let in { name = "lamdagibson"; + short = "lamda"; ip = { address0 = lamdagibsonIP; }; diff --git a/profiles/user0/files/misc/justfile.nix b/profiles/user0/files/misc/justfile.nix index 6202e5e..3a472fa 100755 --- a/profiles/user0/files/misc/justfile.nix +++ b/profiles/user0/files/misc/justfile.nix @@ -25,6 +25,14 @@ let ${name}: ssh -p ${builtins.toString ssh} root@localhost ''; + balanceHosts = lib.concatStringsSep ", " [ + ''{name: "${devices.ceres.name}", ssh: "${devices.ceres.ip.address0}"}'' + ''{name: "${devices.eris.name}", ssh: "${devices.eris.ip.address0}"}'' + ''{name: "${devices.mars.name}", ssh: "${devices.mars.ip.address0}"}'' + ''{name: "${devices.deimos.name}", ssh: "${devices.deimos.ip.address0}"}'' + ''{name: "${devices.phobos.name}", ssh: "${devices.phobos.ip.address0}"}'' + ''{name: "${devices.lamdagibson.short}", ssh: "-o StrictHostKeyChecking=no denise@${devices.lamdagibson.ip.address0}"}'' + ]; systemRecords = command: lib.concatStrings [ @@ -33,6 +41,7 @@ let (command devices.mars.name devices.mars.ip.address0) (command devices.deimos.name devices.deimos.ip.address0) (command devices.phobos.name devices.phobos.ip.address0) + (command "lamba" "-o StrictHostKeyChecking=no denise@192.168.50.131") ]; instanceRecords = command: @@ -54,5 +63,11 @@ in ${remoteRebuild} ${sshCommand} ${microVMSshCommand} + balance: + #!/usr/bin/env nu + let results = [${balanceHosts}] | each { |h| let val = (^ssh ...($h.ssh | split row " ") 'nu -c "open /var/lib/defenseio-data/MidnightMiner/balances.json | get snapshots | last | get balance"' | into float); print $"($h.name):"; print $val; $val } + print "---" + print "total:" + $results | math sum ''; } diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index 29d26de..a28c440 100755 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -11,6 +11,7 @@ mastodon: database: ENC[AES256_GCM,data:dYdLk9s4xZjHaIZCiKvLf/7HbcHVdMOk69JzYmXkX4lf,iv:IJKSR47LR08OuzPJZmfQnVUyOSjtUEmv0c/sGT9eIws=,tag:KUtW8ZKoZHBKvixVLYkNrQ==,type:str] redis: ENC[AES256_GCM,data:lrbTQAuay170fXNUGooG7bJg5lROItwUrnlKYBalo7Zp,iv:osaPJhqOpT5fm4ZYP7rbn0y/jzCfOu8+iPwO8KhRkuM=,tag:ByQjwCT7MtJjgpGWNAoffA==,type:str] pass: ENC[AES256_GCM,data:VlWIQQK89E4FaIUNXu1+sPuEbSQIVdYeGVWt8eztCMpikVsmeFd+G3XxS1Zm76m0tNFZjF7oHILpCudHU4M8k810ePwadcUOiglCP4P2Dkn1vrrB384T5Ed9gn8NHo3S1HlXczsNKmy6j8fP2CNKSb8Mar5VQBbajqryA73bB9pI,iv:EvlNrU4ImdYe5/HQytXCxqDui3Df3oIcC1vLkor7be4=,tag:lnkyjWHyEUTWPVqjwYx+cg==,type:str] + fedifetcher-token: ENC[AES256_GCM,data:dKAzD+hDQgbhNosvR7xo8UWe8g8LtaTAvF4oHY9hw5ThXJKN/LplmfoDGSY=,iv:yXaRQGHiJDk+1kco9jTjzD/ava0k6YqcIefm2X/ouYA=,tag:ouqufvNfHA50Sg+IkSgSXw==,type:str] peertube-smtp: ENC[AES256_GCM,data:rYwL0RNVvC9DUsSRJ5WpLX3VqT4zHYarxSe/tdRBHqs=,iv:cQKRbxdMOF+g84djLZcOk3hMYifucO+r0JxV8EnRjro=,tag:ZnN/LmQ/A3FR4bdJ9DYoEw==,type:str] peertube-database: ENC[AES256_GCM,data:nm0bHwTcT+ROZc2BC9jx+tXWjZ3689rdn4fdYW+7JTU=,iv:EeQVBAIXPut9gs+I9WpRf7L3f7ACTeTWycUFIKAneKk=,tag:QjGQmZ3zMAgB/WDbxTZVIQ==,type:str] peertube-redis: ENC[AES256_GCM,data:SQoPzPjgf4YN9dhvO0wo2DEra7cTgfZBx4vCBpNVSXI=,iv:mcCwYtE9E/Mb4V0j9NnU9WhaUMeBpX7BOcc8HGDiEvI=,tag:CsSiS4peZhnZ22uNtUC44w==,type:str] @@ -65,7 +66,7 @@ sops: bXBOa1VSakoyaWxpODJEOU11QUZCaUEK8Ch9Ten3DdrPHF1DTH2qei85AlHUOaLD aNfzakake7ej+MxJYdKEU0bcWofNMKzIlZa2uM10KZSENDP8d8qlig== -----END AGE ENCRYPTED FILE----- - lastmodified: "2025-11-18T04:44:47Z" - mac: ENC[AES256_GCM,data:B7g1vWlTq3SgmEr5ZMRXMJDmZa9G0OMaNqQLciNVTEwbR8h98K/5qdUl9XieA2Pr5114XwpV838iniCOeQfW3R7YTfhATw71flr1p6mXdHPIErVSFdeCT+xLhRk2uxCQLfQGiiZDcsuFt82byEYhgeXgrgp6ivo/sQOLaXAnbSY=,iv:eK9F3/tLxiEJnumuU6zVDh34fvXl3skCb0e4woZ59kI=,tag:hcaf72tZ4WuL3oAR/nuuEA==,type:str] + lastmodified: "2025-11-21T10:16:47Z" + mac: ENC[AES256_GCM,data:cgsHkgbaVkMYIaWPugPjX9yRbV6eBPcMmQnD1qRJbp647c/FF+KA4qJhB8eQD5/yA+u76in1LSEopRuKaXEGX9LRNzpUKknih/QN8bjHbbwpC2zKm/cxgkkING9Or5Fk821+RPhAb4ezZoUOl+lSG3LUl66GoDcbNAW3qxZhwO8=,iv:3rKoaAKKTskY47IqxZuKUDXeNFC58Av45nk/P/xYIzg=,tag:vfWE0td8UHxCquWW6WlqBg==,type:str] unencrypted_suffix: _unencrypted version: 3.11.0