summaryrefslogtreecommitdiff
path: root/trivionomicon/templates/system-flake/sys
diff options
context:
space:
mode:
Diffstat (limited to 'trivionomicon/templates/system-flake/sys')
-rw-r--r--trivionomicon/templates/system-flake/sys/default.nix14
-rw-r--r--trivionomicon/templates/system-flake/sys/platform/foo/default.nix6
2 files changed, 20 insertions, 0 deletions
diff --git a/trivionomicon/templates/system-flake/sys/default.nix b/trivionomicon/templates/system-flake/sys/default.nix
new file mode 100644
index 0000000..fa0f994
--- /dev/null
+++ b/trivionomicon/templates/system-flake/sys/default.nix
@@ -0,0 +1,14 @@
+{pkgs, ...}: {
+ # Let 'nixos-version --json' know about the Git revision
+ # of this flake.
+ system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
+
+ # Network configuration.
+ networking.firewall.allowedTCPPorts = [80];
+
+ # Enable a web server.
+ services.httpd = {
+ enable = true;
+ adminAddr = "morty@example.org";
+ };
+}
diff --git a/trivionomicon/templates/system-flake/sys/platform/foo/default.nix b/trivionomicon/templates/system-flake/sys/platform/foo/default.nix
new file mode 100644
index 0000000..ef84269
--- /dev/null
+++ b/trivionomicon/templates/system-flake/sys/platform/foo/default.nix
@@ -0,0 +1,6 @@
+{pkgs, ...}: {
+ boot.isContainer = true;
+
+ # Network configuration.
+ networking.useDHCP = false;
+}