summaryrefslogtreecommitdiff
path: root/hosts/miniflux/default.nix
diff options
context:
space:
mode:
authorGrisha Shipunov2025-01-24 23:15:25 +0100
committerGrisha Shipunov2025-01-25 02:16:38 +0100
commit813ab5d40c627ba5b465ad849994a2087093d4b5 (patch)
tree6dcf7903d14107230163e4c8df400760b47217fc /hosts/miniflux/default.nix
parent56ac9e4fd5d5f2ff939ebf45f34a473a1c4f8eb6 (diff)
miniflux: init
Diffstat (limited to 'hosts/miniflux/default.nix')
-rw-r--r--hosts/miniflux/default.nix78
1 files changed, 78 insertions, 0 deletions
diff --git a/hosts/miniflux/default.nix b/hosts/miniflux/default.nix
new file mode 100644
index 0000000..5f166c3
--- /dev/null
+++ b/hosts/miniflux/default.nix
@@ -0,0 +1,78 @@
+
+{ config, lib, ... }:
+let
+ mac = "02:00:00:00:00:04";
+in
+{
+ imports = [
+ ./miniflux.nix
+ ];
+ sops.defaultSopsFile = ./secrets.yaml;
+ sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
+
+ sops.secrets = {
+ "wg/0xa-proxy" = {
+ owner = config.users.users.systemd-network.name;
+ };
+ };
+
+ microvm = {
+ hypervisor = "qemu";
+ mem = 4 * 1024;
+ vcpu = 2;
+ interfaces = [
+ {
+ type = "tap";
+ id = "uvm-miniflux";
+ mac = mac;
+ }
+ ];
+ shares =
+ [
+ {
+ source = "/nix/store";
+ mountPoint = "/nix/.ro-store";
+ tag = "store";
+ proto = "virtiofs";
+ socket = "store.socket";
+ }
+ ]
+ ++ map
+ (dir: {
+ source = dir;
+ mountPoint = "/${dir}";
+ tag = dir;
+ proto = "virtiofs";
+ socket = "${dir}.socket";
+ })
+ [
+ "etc"
+ "var"
+ "home"
+ ];
+ };
+
+ networking.useNetworkd = true;
+ networking.firewall.enable = lib.mkForce false; # firewalling done by the host
+
+ systemd.network = {
+ enable = true;
+ networks."11-host" = {
+ matchConfig.MACAddress = mac;
+ networkConfig = {
+ Address = "10.99.99.14/24";
+ DHCP = "no";
+ };
+ routes = [
+ {
+ Gateway = "10.99.99.1";
+ Destination = "0.0.0.0/0";
+ Metric = 1024;
+ }
+ ];
+ };
+ };
+
+ networking.hostName = "miniflux";
+ system.stateVersion = "24.11";
+}