diff --git a/README.md b/README.md new file mode 100644 index 0000000..998f6cb --- /dev/null +++ b/README.md @@ -0,0 +1,6 @@ +# A Dendritic Nix Flake + +```shell +nix run ".#write-flake" +nix flake check +``` diff --git a/modules/default.nix b/modules/default.nix index 747fe16..413ba56 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -2,15 +2,6 @@ { imports = [ inputs.flake-file.flakeModules.dendritic - # inputs.flake-parts.flakeModules.modules ]; flake-file.description = "A dendritic setup."; - # flake-file.inputs = { - # flake-file.url = "github:vic/flake-file"; - # flake-parts.url = "github:hercules-ci/flake-parts"; - # nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; - # systems.url = "github:nix-systems/default"; - # }; - - systems = import inputs.systems; } diff --git a/modules/home-manager/scripts.nix b/modules/home-manager/scripts.nix deleted file mode 100644 index e69de29..0000000 diff --git a/modules/home-manager/sops.nix b/modules/home-manager/sops.nix index 2696058..46306cf 100644 --- a/modules/home-manager/sops.nix +++ b/modules/home-manager/sops.nix @@ -26,9 +26,11 @@ in sops # This is necessary to make the sops binary available ssh-to-age (writeShellScriptBin "gen-age-key" '' - exec ${lib.getExe pkgs.ssh-to-age} -i ${config.sshIdentityFile} -private-key > ${ageKeyFile} + ${lib.getExe pkgs.ssh-to-age} -i ${config.sshIdentityFile} -private-key > ${ageKeyFile} + echo -n "Created ${ageKeyFile}: " + echo $(show-age-key) '') - (writeShellScriptBin "show-age-key" "exec ${lib.getExe pkgs.ssh-to-age} -i ${config.sshIdentityFile}.pub") + (writeShellScriptBin "show-age-key" "exec ${lib.getExe' pkgs.age "age-keygen"} -y ${ageKeyFile}") (writeShellScriptBin "edit-secrets" "exec ${sopsBin} --config ${sopsConfigPath} ${sopsSecretsPath}") (writeShellScriptBin "ls-secrets" "exec ${lib.getExe pkgs.eza} -alT --follow-symlinks ~/.config/sops-nix/secrets") ]; @@ -51,9 +53,9 @@ in defaultSopsFormat = "yaml"; # Not sure any of these are necessary - age.sshKeyPaths = [ "${config.sshIdentityFile}" ]; + # age.sshKeyPaths = [ "${config.sshIdentityFile}" ]; # age.keyFile = "${ageKeyFile}"; - age.generateKey = true; + # age.generateKey = true; # secrets."api/gmail_client_secret" = { # path = "${config.xdg.configHome}/resticprofile/dendrite.txt"; @@ -64,6 +66,7 @@ in content = '' { "installed": { + "bad: key, "client_id": "499012320469-vtml6emu6bmujpsj9lud2b44jqu7h26j.apps.googleusercontent.com", "project_id": "python-apis-423500", "auth_uri": "https://accounts.google.com/o/oauth2/auth",