diff --git a/machines/common/configuration.nix b/machines/common/configuration.nix index a6c822b..c2b17d3 100644 --- a/machines/common/configuration.nix +++ b/machines/common/configuration.nix @@ -8,7 +8,6 @@ }: { imports = [ ../../pkgs/zsh.nix -# inputs.sops-nix.nixosModules.sops ]; nixpkgs = { @@ -52,51 +51,58 @@ fallbackDns = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; }; -# sops = { -# defaultSopsFile = ../../secrets/secrets.yaml; -# defaultSopsFormat = "yaml"; -# age = { -# sshKeyPaths = [ "/etc/ssh/id_ed25519" ]; -# keyFile = "/home/horseman/.config/sops/age/keys.txt"; -# generateKey = true; -# }; -# -# secrets = { -# "syncthing/solis".owner = "horseman"; -# "syncthing/terra".owner = "horseman"; -# "syncthing/luna".owner = "horseman"; -# }; -# }; + sops = { + defaultSopsFile = ../../secrets/secrets.yaml; + defaultSopsFormat = "yaml"; + age = { + sshKeyPaths = [ "/home/horseman/.ssh/id_ed25519" ]; + keyFile = "/home/horseman/.config/sops/age/keys.txt"; + generateKey = true; + }; -# services.syncthing = { -# enable = true; -# user = "horseman"; -# dataDir = "/home/horseman"; -# configDir = "/home/horseman/.config/syncthing"; -# overrideDevices = true; -# overrideFolders = true; -# settings = { -# devices = { -# "luna" = ; -# "terra" = ; -# "solis" = ; -# }; -# folders = { -# "Documents" = { -# path = "/home/horseman/Documents"; + secrets = { + "syncthing/solis".owner = "horseman"; + "syncthing/terra".owner = "horseman"; + "syncthing/luna".owner = "horseman"; + "syncthing/gui_user".owner = "horseman"; + "syncthing/gui_password".owner = "horseman"; + + }; + }; + +# services.syncthing.enable = true; + + services.syncthing = { + enable = true; + user = "horseman"; + dataDir = "/home/horseman"; + configDir = "/home/horseman/.config/syncthing"; + overrideDevices = true; + overrideFolders = true; + settings = { + devices = { + "luna" = config.sops.secrets."syncthing/luna"; + "terra" = config.sops.secrets."syncthing/terra"; +# "solis" = config.sops.secrets."syncthing/solis"; + }; + folders = { + "Documents" = { + path = "/home/horseman/Documents"; # devices = [ "solis" "terra" "luna" ]; -# }: -# "Programming" = { -# path = "/home/horseman/Programming"; + devices = [ "terra" "luna" ]; + }; + "Programming" = { + path = "/home/horseman/Programming"; # devices = [ "solis" "terra" "luna" ]; -# }; -# }; -# gui = { -# user = ; -# password = ; -# }; -# }; -# }; + devices = [ "terra" "luna" ]; + }; + }; + gui = { + user = config.sops.secrets."syncthing/gui_user"; + password = config.sops.secrets."syncthing/gui_password"; + }; + }; + }; users.users = { horseman = { diff --git a/secrets/secrets.yaml b/secrets/secrets.yaml index 5fc9eb4..5837154 100644 --- a/secrets/secrets.yaml +++ b/secrets/secrets.yaml @@ -1,10 +1,9 @@ syncthing: - #ENC[AES256_GCM,data:LJUC,iv:MlEcsaCuH7W/cj/JQhYAKJVwyQ+Uqk7I4/WFZeBpr04=,tag:hlEgSpdtXx1Twt+SIIckGg==,type:comment] - solis: null - #ENC[AES256_GCM,data:6MOB,iv:7Rmzh5LYM7wD+K6Idi2DLkyKSSm8/rgQtUWf8gPEMzQ=,tag:EmCkhFO7016xszMogrNUpg==,type:comment] - terra: null - #ENC[AES256_GCM,data:1EoT,iv:ytmfI03F4A4qMtk3l7HYGyng/NIWHho+Riq8Fj6vtCE=,tag:U/4qWsZYA+dU4dcJ7lkx5Q==,type:comment] - luna: null + solis: ENC[AES256_GCM,data:qm3bG1I=,iv:TRWRnSpESraDIC4xPbG59fWR/HEnNomAveQSNCsIbNw=,tag:CQ0WH6KZpKYX8xdZZYDn/w==,type:str] + terra: ENC[AES256_GCM,data:j6NcCwBfc68vZV0dbIyDcTJ0E4QuDG/XC+A2YA+29HyWtDD+tWubmHKdP479CMrAqL/WpD+wGtdIznIA0uVb,iv:8k4oIE2wiHaMlH4H19QK/wXEMRCnQxk8nK6jz5Q1/Wc=,tag:xZfyFxXWOoBoMF5z0gMRNw==,type:str] + luna: ENC[AES256_GCM,data:tGoD,iv:uqlhHBOKM6ts/U3t3VNh05n3FoKZiP4EIAg28IQXHvQ=,tag:NsMrQ8QEhJZZ2WhnGXsWXA==,type:str] + gui_user: ENC[AES256_GCM,data:Ca9ra2g=,iv:wwtCnERfKxGI3oiW2uEvdmKMAibeyOkpSgFokSjC4U4=,tag:jbiovNbhArFjsQ/Dk+GiZA==,type:str] + gui_password: ENC[AES256_GCM,data:CZJGYVCtwtHsOIjUatjqrw==,iv:LPszBvCaxUnFKy0K2EJnVVSpXPbAn0TUAwHnwBuqAgg=,tag:lpN6ksE4HbdkdeRbLz/orQ==,type:str] sops: kms: [] gcp_kms: [] @@ -20,8 +19,8 @@ sops: ckJwQ3EzU2JzdGhnWkNnRExRNlprM28KUHkZe8FvLOAt+UVqvgOxBQdApbEXQ44v vXW8UtZuq7GjsP5qD2MK6oKs/ZDfe+PhqiWl4ONNHvpn8rmfbQDcRw== -----END AGE ENCRYPTED FILE----- - lastmodified: "2024-05-24T19:11:16Z" - mac: ENC[AES256_GCM,data:UAz/pCKzV0HPFfus7tKafOLr1DWIBWWBVNDs6C43m+QdWpUHQ99jgK7yyq8YbAglGIfWB3AIlriQkcem9Wx3ExVh1BPKtCzwnfjFBEhzPws428JIzEOIZzrSk6tho2bvjaaOTQOWOERmbJhiL/e1pXdX+pln+kEtLdeq/9TDRK8=,iv:QtJPxvq9mGCu2Df5m+E+2+XD25so1cyDga/mdjBaH5c=,tag:TGllydw+4XGLIqnZ5QDxdg==,type:str] + lastmodified: "2024-06-25T14:57:53Z" + mac: ENC[AES256_GCM,data:DFibspQWjHjnTcMe33eUoekHTmbCx8MTdwbFF3qsQ/1+KVI6HdgGhkA9gJV9P5osG/wR+TI2eOCdQQpGW2VF56BoP2uXrjbdYNVFjBWaIKurrxKKnRPlT1X1PerjTqvLH83HYqwwTjk6ANOa0HH2piC3JG/KJ+TM/RqmzCTV36Q=,iv:NrnL+w2dJucrkqqyxlKLDkR22mTboaNgD/OCUK84AmE=,tag:sRdEzZhs4kta/2f/XV1Ikw==,type:str] pgp: [] unencrypted_suffix: _unencrypted version: 3.8.1