diff --git a/hosts/dlaptop/age.nix b/hosts/dlaptop/age.nix new file mode 100644 index 0000000..8227bd3 --- /dev/null +++ b/hosts/dlaptop/age.nix @@ -0,0 +1,9 @@ +{ stable, inputs, config, pkgs, lib, ... }: + +{ + age.secrets = { + socks_v2ray_sweden = { file = ../../secrets/singboxaus.age; owner = "socks"; group = "socks"; }; + }; + + age.identityPaths = [ "/home/delta/.ssh/id_ed25519" ]; +} \ No newline at end of file diff --git a/hosts/dlaptop/configuration.nix b/hosts/dlaptop/configuration.nix index 3bb408f..01fbcfb 100644 --- a/hosts/dlaptop/configuration.nix +++ b/hosts/dlaptop/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ inputs, stable, unstable, config, pkgs, ... }: +{ inputs, stable, unstable, config, pkgs, age, ... }: { time.timeZone = "Europe/Moscow"; @@ -264,7 +264,7 @@ User = "socks"; Group = "socks"; }; - script = "sing-box run -c /etc/sing-box/config.json"; + script = "sing-box run -c /run/agenix/singboxaus"; path = with unstable; [ shadowsocks-libev shadowsocks-v2ray-plugin @@ -272,6 +272,8 @@ ]; }; + #config.services.openssh.hostKeys = [ "/home/delta/.ssh/id_ed25519" ]; + systemd.services.NetworkManager-wait-online.enable = false; # This value determines the NixOS release from which the default diff --git a/secrets/secrets.nix b/secrets/secrets.nix new file mode 100644 index 0000000..9fdc1e7 --- /dev/null +++ b/secrets/secrets.nix @@ -0,0 +1,6 @@ +let + dlaptop = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGGL2UD0frl9F2OPBiPlSQqxDsuACbAVgwH24F0KT14L delta@dlaptop"; +in { + "test.age".publicKeys = [ dlaptop ]; + "singboxaus.age".publicKeys = [ dlaptop ]; +} \ No newline at end of file diff --git a/secrets/singboxporta.age b/secrets/singboxporta.age new file mode 100644 index 0000000..ebea1b8 Binary files /dev/null and b/secrets/singboxporta.age differ diff --git a/secrets/test.age b/secrets/test.age new file mode 100644 index 0000000..bb200d1 --- /dev/null +++ b/secrets/test.age @@ -0,0 +1,5 @@ +age-encryption.org/v1 +-> ssh-ed25519 WaXiIA d5rkOEoS+1Hbm1052rjg2syFrAjK/zAUncW4PeIJDwA +Rdkm26cHFw9erjUZOJipAZ51/D8poXtMdCzY0FlIuTM +--- ODDKDz/Bn3WFnqLfQGfjR9SE5mfp1Ob1aOvxAf+vhLY +O~MT0YDTo!K^nLsw@ \ No newline at end of file