From dca603a58396c9dbdfa973f083fd04057cead3d5 Mon Sep 17 00:00:00 2001 From: chn Date: Fri, 28 Jul 2023 20:06:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20vps6=20=E7=9A=84=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E9=85=8D=E7=BD=AE=E7=94=A8=E4=BA=8E=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- flake.nix | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/flake.nix b/flake.nix index e752e843..21fda67d 100644 --- a/flake.nix +++ b/flake.nix @@ -220,6 +220,43 @@ };}) ]; }; + # 安装一个带加密、不带 impermanence 的系统 + # 增加 impermanence + # 增加 initrd 中的网络 + # 使用 yubikey 解锁 + "vps6.chn.moe" = inputs.nixpkgs.lib.nixosSystem + { + system = "x86_64-linux"; + specialArgs = { topInputs = inputs; inherit localLib; }; + modules = localLib.mkModules + [ + (inputs: { config.nixpkgs.overlays = [(final: prev: { localPackages = + (import ./local/pkgs { inherit (inputs) lib; pkgs = final; });})]; }) + ./modules + (inputs: { config.nixos = + { + fileSystems = + { + mount = + { + btrfs = + { + "/dev/disk/by-uuid/52e6db14-f7c1-4bf0-9cee-d858613906ba"."/" = "/boot"; + "/dev/mapper/root"."/" = "/"; + }; + }; + decrypt.auto."/dev/disk/by-uuid/cc0c27bb-15b3-4932-98a9-583b426002be" = + { mapper = "root"; ssd = true; }; + }; + packages = + { + packageSet = "server"; + }; + boot.grub.installDevice = "/dev/disk/by-path/pci-0000:05:00.0"; + system.hostname = "vps6.chn.moe"; + };}) + ]; + }; }; }; }