diff --git a/containers/beryllium/configuration.nix b/containers/beryllium/configuration.nix new file mode 100644 index 0000000..d877f3b --- /dev/null +++ b/containers/beryllium/configuration.nix @@ -0,0 +1,15 @@ +{ ... }: { + system.stateVersion = "25.11"; + fileSystems."/var/lib/private" = { + device = "/persist"; + fsType = "none"; + options = [ "bind" ]; + }; + + services.matrix-continuwuity = { + enable = true; + settings.global = { + server_name = "lava.moe"; + }; + }; +} diff --git a/containers/beryllium/flake.lock b/containers/beryllium/flake.lock new file mode 100644 index 0000000..88ab73f --- /dev/null +++ b/containers/beryllium/flake.lock @@ -0,0 +1,27 @@ +{ + "nodes": { + "nixpkgs": { + "locked": { + "lastModified": 1773282481, + "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/containers/beryllium/flake.nix b/containers/beryllium/flake.nix new file mode 100644 index 0000000..af3d7aa --- /dev/null +++ b/containers/beryllium/flake.nix @@ -0,0 +1,42 @@ +{ + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + }; + outputs = { nixpkgs, ... }: { + nixosConfigurations.container = nixpkgs.lib.nixosSystem { + modules = [ ./configuration.nix ]; + }; + nixosModule = { ... }: + let + name = "beryllium"; + subnet = "2"; + in { + networking.nat = { + enable = true; + enableIPv6 = true; + internalInterfaces = [ "ve-+" ]; + }; + + systemd.tmpfiles.rules = [ "d /persist/containers/${name} 755 root users" ]; + containers.${name} = { + autoStart = true; + privateNetwork = true; + hostAddress = "10.30.${subnet}.1"; + localAddress = "10.30.${subnet}.2"; + hostAddress6 = "fd0d:1::${subnet}:1"; + localAddress6 = "fd0d:1::${subnet}:2"; + # privateUsers = "pick"; + nixpkgs = nixpkgs; + ephemeral = true; + config = { imports = [ ./configuration.nix ]; }; + + bindMounts."persist" = { + hostPath = "/persist/containers/${name}"; + mountPoint = "/persist"; + isReadOnly = false; + }; + # flake = "path:" + ./.; + }; + }; + }; +} diff --git a/flake.lock b/flake.lock index 4d2cc7a..c3e63fc 100644 --- a/flake.lock +++ b/flake.lock @@ -57,6 +57,20 @@ }, "parent": [] }, + "c-beryllium": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "path": "./containers/beryllium", + "type": "path" + }, + "original": { + "path": "./containers/beryllium", + "type": "path" + }, + "parent": [] + }, "catppuccin": { "inputs": { "catppuccin-v1_1": "catppuccin-v1_1", @@ -429,7 +443,7 @@ "nix-gaming": { "inputs": { "flake-parts": "flake-parts_2", - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1770778188, @@ -541,6 +555,22 @@ } }, "nixpkgs_4": { + "locked": { + "lastModified": 1773282481, + "narHash": "sha256-b/GV2ysM8mKHhinse2wz+uP37epUrSE+sAKXy/xvBY4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fe416aaedd397cacb33a610b33d60ff2b431b127", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1770537093, "narHash": "sha256-pF1quXG5wsgtyuPOHcLfYg/ft/QMr8NnX0i6tW2187s=", @@ -556,7 +586,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { "lastModified": 1770562336, "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", @@ -632,6 +662,7 @@ "aagl": "aagl", "agenix": "agenix", "c-amethyst": "c-amethyst", + "c-beryllium": "c-beryllium", "catppuccin": "catppuccin", "catppuccin-palette": "catppuccin-palette", "fast-syntax-highlighting": "fast-syntax-highlighting", @@ -640,7 +671,7 @@ "linux-tkg": "linux-tkg", "neovim-nightly": "neovim-nightly", "nix-gaming": "nix-gaming", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "nixpkgs-stable": "nixpkgs-stable_2", "nvim-treesitter": "nvim-treesitter", "pure": "pure", diff --git a/flake.nix b/flake.nix index 3ee112e..03840e1 100644 --- a/flake.nix +++ b/flake.nix @@ -40,6 +40,7 @@ # containers c-amethyst.url = "path:./containers/amethyst"; + c-beryllium.url = "path:./containers/beryllium"; }; outputs = { self, agenix, catppuccin, nixpkgs, nixpkgs-stable, ... } @ inputs: diff --git a/hosts/anemone/default.nix b/hosts/anemone/default.nix index ee08a68..65e9d43 100644 --- a/hosts/anemone/default.nix +++ b/hosts/anemone/default.nix @@ -39,6 +39,7 @@ modules.services.syncthing inputs.c-amethyst.nixosModule + inputs.c-beryllium.nixosModule ]; me = {