sops nix configured

This commit is contained in:
bogale 2026-10-24 17:18:06 +09:00
commit db022df80b
9 changed files with 143 additions and 27 deletions

View file

@ -5,9 +5,8 @@
i18n.defaultLocale = "ru_RU.UTF-8";
swapDevices = [ { device = "/var/swapfile"; } ];
imports = [ ./mods/pxeboot.nix ./mods/vps-init.nix ];
users.users.root.hashedPasswordFile = "/secrets/user/root-pw";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [ jq _7zz sbctl openssl python314 speedtest-go ];
users.users.root.hashedPasswordFile = sops.secrets.root-passwd.path;
console = {
font = "cyr-sun16";
keyMap = "ruwin_alt_sh-UTF-8";
@ -19,8 +18,8 @@
systemd.tmpfiles.rules = [
"d /root/backup"
"d /root/backup/base"
"L /root/backup/base/root - - - - /root"
"L /root/backup/base/nixos - - - - /etc/nixos"
"L /root/backup/base/secrets - - - - /secrets"
"L /root/backup/base/sbctl - - - - /var/lib/sbctl"
];
boot = {
@ -44,6 +43,31 @@
server = [ "1.1.1.2" "1.0.0.2" "2606:4700:4700::1112" "2606:4700:4700::1002" ];
};
};
environment.systemPackages = with pkgs; [
jq
_7zz
file
sops
sbctl
openssl
binutils
qrencode
python314
speedtest-go
];
sops = {
defaultSopsFile = ./.secrets.yaml;
secrets = {
awg-obf = {};
wifi-env = {};
root-passwd = {};
};
age = {
generateKey = true;
sshKeyPaths = [ "/root/.ssh/sops" ];
keyFile = "/var/lib/sops-nix/key.txt";
};
};
networking = {
wg-quick.interfaces.awg0 = {
type = "amneziawg";
@ -56,7 +80,7 @@
enable = true;
dns = "dnsmasq";
ensureProfiles = {
environmentFiles = [ "/secrets/wifi.env" ];
environmentFiles = [ config.sops.secrets.wifi-env.path ];
profiles.home-wifi = {
wifi-security.key-mgmt = "sae";
connection = {