diff --git a/nix-system-configs/modules/scripts/compose_two_nix.zsh b/nix-system-configs/modules/scripts/compose_two_nix.zsh index 2fac9e7..b0e71b0 100644 --- a/nix-system-configs/modules/scripts/compose_two_nix.zsh +++ b/nix-system-configs/modules/scripts/compose_two_nix.zsh @@ -1,2 +1,3 @@ ## Todo, make a proper script for this +EDITOR=micro nix-shell -p sops --run "SOPS_AGE_KEY_FILE=$HOME/.config/sops/age/keys.txt sops nix-system-configs/secrets/songsheet/secrets.yaml" compose2nix --inputs nix-system-configs/modules/songsheet/wavelog/docker-compose.yml --sops_file nix-system-configs/secrets/songsheet/secrets.yaml --project=wavelog --output nix-system-configs/modules/songsheet/wavelog/docker-compose.nix --root_path nix-system-configs/modules/songsheet/wavelog \ No newline at end of file diff --git a/nix-system-configs/modules/secrets-config/sops-nix.nix b/nix-system-configs/modules/secrets-config/sops-nix.nix index 1bf326c..23cb2ed 100644 --- a/nix-system-configs/modules/secrets-config/sops-nix.nix +++ b/nix-system-configs/modules/secrets-config/sops-nix.nix @@ -15,18 +15,16 @@ }}/modules/sops" ]; - # This will add secrets.yml to the nix store - # You can avoid this by adding a string to the full path instead, i.e. - # sops.defaultSopsFile = "/root/.sops/secrets/example.yaml"; - sops.defaultSopsFile = ../../secrets/songsheet/secrets.yaml; - # This will automatically import SSH keys as age keys - sops.age.sshKeyPaths = [ "/home/songsheetprg/.ssh/id_ed25519.pub" ]; - # This is using an age key that is expected to already be in the filesystem - sops.age.keyFile = "/var/lib/sops-nix/key.txt"; - # This will generate a new key if the key specified above does not exist - sops.age.generateKey = true; - # Use the flat key name with quotes - sops.secrets."songsheet/database" = { - key = "songsheet/database"; - }; - } + # This will add secrets.yml to the nix store + # You can avoid this by adding a string to the full path instead, i.e. + # sops.defaultSopsFile = "/root/.sops/secrets/example.yaml"; + sops.defaultSopsFile = ../../secrets/songsheet/secrets.yaml; + # This will automatically import SSH keys as age keys + sops.age.sshKeyPaths = ["/home/songsheetprg/.ssh/id_ed25519.pub"]; + # This is using an age key that is expected to already be in the filesystem + sops.age.keyFile = "/var/lib/sops-nix/key.txt"; + # This will generate a new key if the key specified above does not exist + sops.age.generateKey = true; + # Use the flat key name with quotes + sops.secrets."songsheet/database" = {}; +} diff --git a/nix-system-configs/secrets/songsheet/secrets.yaml b/nix-system-configs/secrets/songsheet/secrets.yaml index b5bdf11..e6ef588 100644 --- a/nix-system-configs/secrets/songsheet/secrets.yaml +++ b/nix-system-configs/secrets/songsheet/secrets.yaml @@ -1,4 +1,7 @@ -songsheet/database: ENC[AES256_GCM,data:cNZsgTmTSjHXK7k0R7/Kz7kW6MacTkzcqZrZd/DswVm1yPQEm9oJyPNCv39LqEvKKNBa4XA0HmjaHzOBHMAr1zSG1vRRB7Fe3ZSQaxAeamRh7X7BxkxXkdvnCtcQ6wNe,iv:aF7skRVNlvoJp9UNBNMEZSMI/hRXnZ6GaDX+GOvVqdQ=,tag:Kytf5ciAd1uSUZVwfOJpbA==,type:str] +songsheet: + database: + - ENC[AES256_GCM,data:XYQGalSgB0tEhyelA5pK/pwa0lz0vgoUP3c=,iv:9AzdjDVi0yexJEYHQh0Opk+j1olZd292b3Uhk7uXLUI=,tag:eeKiekxMkma1qnD3yX1EMw==,type:str] + - ENC[AES256_GCM,data:efrpAQ3ulmJjZCj+G3suMkgX8YFRaADNGVHkX6H4VQoR/+ARe5bmfYSDqhrajKr35i7cx5wIzNYj3lxXUFas5Ysh8tY=,iv:rLPAOKfmqxSs1+ZIqMB+f8Q3VTPOoRgtt+2O/FvpRKQ=,tag:gADCX1ClMMQfLasxbfku/w==,type:str] sops: age: - recipient: age1746rvsvsc3snxfl7cndm222wd5kck4aqj3x7nednlegq0gdjhfcqx0qv7m @@ -19,7 +22,7 @@ sops: OVZNS1ErTm9hN3IvSHB3bkY1SE5OQlEK1g4PhqXmqIlDLYBiHnH7Z4hgDyhJLH8H yxfbmpCb9eF3qDhTVD7Cw20sO4YX32OujkCrbnEYS5/tRxEiOyoNHQ== -----END AGE ENCRYPTED FILE----- - lastmodified: "2026-02-07T16:09:47Z" - mac: ENC[AES256_GCM,data:BR7Vh6P+BseiL7kiK7aHDyV8P5yWxZH3FCX4ubUevOZyGqv+J7CwO+Ezz/E6N3V5E15krfqTPJZtsA+5lXxf8Jl13ylZ/kR27iOOLFy4XTOaQ5aKMGLIjJ7Mz/V4axdfvW/rNgpKAYXth1OaGrl054ua6i6AQ95LHphbofihtTo=,iv:YUku5Nu8xA5E9vNvcGp1M/3x3ug8yNDpciGhXneUtAQ=,tag:AM0rl4ScEji9jkykYoJvzA==,type:str] + lastmodified: "2026-02-07T17:12:12Z" + mac: ENC[AES256_GCM,data:pGADihksdyIGUiADiiLxtN9rdVDHBlsW3tDmfdPy1dweNRnogdv9U11nvBJyGLaHATEshDTk+uod27u85aD0mzNGFuBss8IFOVw0e2/MZMqwmQoKpyxCiyTB7y8uAY+TUAnDsU0O8xlKQa0nuAvvnCq9hUtRMq9OFYkxMO3nn2c=,iv:GO6BccK79WMbkKH6kQiooyxMgv4HqCfI7hvxEaDUd7A=,tag:NiaRtvkLtzVfj4wzV2GSNw==,type:str] unencrypted_suffix: _unencrypted version: 3.11.0