Compare commits

..

5 commits

Author SHA1 Message Date
7230de5aa9
flake.lock: Update
Flake lock file updates:

• Updated input 'nixpkgs':
    'github:nixos/nixpkgs/a9eedea7232f5d00f0aca7267efb69a54da1b8a1' (2023-01-03)
  → 'github:nixos/nixpkgs/0874168639713f547c05947c76124f78441ea46c' (2023-01-01)
• Updated input 'nvfetcher':
    'github:berberman/nvfetcher/294826951113dcd3aa9abbcacfb1aa5b95a19116' (2022-11-05)
  → 'github:berberman/nvfetcher/0a9ac5fd07b52467d81163b1f8c94c12e5c9aff9' (2023-01-06)
• Updated input 'nvfetcher/flake-compat':
    'github:edolstra/flake-compat/b4a34015c698c7793d592d66adbab377907a2be8' (2022-04-19)
  → 'github:edolstra/flake-compat/009399224d5e398d03b22badca40a37ac85412a1' (2022-11-17)
• Updated input 'nvfetcher/flake-utils':
    'github:numtide/flake-utils/6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817' (2022-10-29)
  → 'github:numtide/flake-utils/5aed5285a952e0b949eb3ba02c12fa4fcfef535f' (2022-11-02)
• Updated input 'sops-nix':
    'github:Mic92/sops-nix/b35586cc5abacd4eba9ead138b53e2a60920f781' (2023-01-01)
  → 'github:Mic92/sops-nix/2253120d2a6147e57bafb5c689e086221df8032f' (2023-01-08)
• Updated input 'sops-nix/nixpkgs-stable':
    'github:NixOS/nixpkgs/feda52be1d59f13b9aa02f064b4f14784b9a06c8' (2022-12-31)
  → 'github:NixOS/nixpkgs/9f11a2df77cb945c115ae2a65f53f38121597d73' (2023-01-07)
2023-01-11 02:09:58 +00:00
c355b1746e
config: Make changes suggested post 22.11 update 2023-01-11 02:00:33 +00:00
64444a106d
firewall: Open Minecraft ports for port forwarding 2023-01-11 02:00:13 +00:00
4905a492af
gitea: Update configuration for 22.11 2023-01-11 01:59:54 +00:00
1053dc93d2
flake.nix: Build the VM using nix build 2023-01-11 01:59:45 +00:00
4 changed files with 38 additions and 33 deletions

View file

@ -35,11 +35,11 @@
''; '';
# Enable remote builds from tlater # Enable remote builds from tlater
trustedUsers = ["@wheel"]; settings.trusted-users = ["@wheel"];
}; };
nixpkgs.config.allowUnfreePredicate = pkg: nixpkgs.config.allowUnfreePredicate = pkg:
builtins.elem (lib.getName pkg) ["steam-original" "steam-runtime" "steamcmd"]; builtins.elem (lib.getName pkg) ["steam-original" "steam-runtime" "steam-run" "steamcmd"];
# Optimization for minecraft servers, see: # Optimization for minecraft servers, see:
# https://bugs.mojang.com/browse/MC-183518 # https://bugs.mojang.com/browse/MC-183518
@ -63,6 +63,8 @@
8448 8448
# starbound # starbound
21025 21025
# Minecraft
25565
config.services.coturn.listening-port config.services.coturn.listening-port
config.services.coturn.tls-listening-port config.services.coturn.tls-listening-port
@ -71,6 +73,9 @@
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
# More minecraft
25565
config.services.coturn.listening-port config.services.coturn.listening-port
config.services.coturn.tls-listening-port config.services.coturn.tls-listening-port
config.services.coturn.alt-listening-port config.services.coturn.alt-listening-port

View file

@ -8,12 +8,15 @@ in {
httpAddress = "127.0.0.1"; httpAddress = "127.0.0.1";
database.type = "postgres"; database.type = "postgres";
ssh.clonePort = 2222;
rootUrl = "https://${domain}/"; rootUrl = "https://${domain}/";
cookieSecure = true;
appName = "Gitea: Git with a cup of tea"; appName = "Gitea: Git with a cup of tea";
disableRegistration = true;
settings = {
server.SSH_PORT = 2222;
service.DISABLE_REGISTRATION = true;
session.COOKIE_SECURE = true;
};
}; };
# Set up SSL # Set up SSL

38
flake.lock generated
View file

@ -188,11 +188,11 @@
"flake-compat_2": { "flake-compat_2": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1650374568, "lastModified": 1668681692,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", "narHash": "sha256-Ht91NGdewz8IQLtWZ9LCeNXMSXHUss+9COoqu6JLmXU=",
"owner": "edolstra", "owner": "edolstra",
"repo": "flake-compat", "repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8", "rev": "009399224d5e398d03b22badca40a37ac85412a1",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -221,11 +221,11 @@
}, },
"flake-utils": { "flake-utils": {
"locked": { "locked": {
"lastModified": 1667077288, "lastModified": 1667395993,
"narHash": "sha256-bdC8sFNDpT0HK74u9fUkpbf1MEzVYJ+ka7NXCdgBoaA=", "narHash": "sha256-nuEHfE/LcWyuSWnS8t12N1wc105Qtau+/OdUAjtQ0rA=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "6ee9ebb6b1ee695d2cacc4faa053a7b9baa76817", "rev": "5aed5285a952e0b949eb3ba02c12fa4fcfef535f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -364,11 +364,11 @@
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": { "locked": {
"lastModified": 1672500394, "lastModified": 1673100377,
"narHash": "sha256-yzwBzCoeRBoRzm7ySHhm72kBG0QjgFalLz2FY48iLI4=", "narHash": "sha256-mT76pTd0YFxT6CwtPhDgHJhuIgLY+ZLSMiQpBufwMG4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "feda52be1d59f13b9aa02f064b4f14784b9a06c8", "rev": "9f11a2df77cb945c115ae2a65f53f38121597d73",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -380,16 +380,16 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1672781980, "lastModified": 1672580127,
"narHash": "sha256-L+yqt2szcp+BFiWoMJCisDsNA5OrpYVW1QSbbS5U8RU=", "narHash": "sha256-3lW3xZslREhJogoOkjeZtlBtvFMyxHku7I/9IVehhT8=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "a9eedea7232f5d00f0aca7267efb69a54da1b8a1", "rev": "0874168639713f547c05947c76124f78441ea46c",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixos-22.11", "ref": "nixos-22.05",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
@ -418,11 +418,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1667620329, "lastModified": 1672979485,
"narHash": "sha256-v1Zk7rtEbAGpevBGPZvZBKpwbmw4I+uVwxvd+pBlp3o=", "narHash": "sha256-LrY0K1yya3nvRlGDc98wm68ozVj7E6a1EXXEr7eHp8E=",
"owner": "berberman", "owner": "berberman",
"repo": "nvfetcher", "repo": "nvfetcher",
"rev": "294826951113dcd3aa9abbcacfb1aa5b95a19116", "rev": "0a9ac5fd07b52467d81163b1f8c94c12e5c9aff9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -526,11 +526,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1672543202, "lastModified": 1673147300,
"narHash": "sha256-nlCUtcIZxaBqUBG1GyaXhZmfyG5WK4e6LqypP8llX9E=", "narHash": "sha256-gR9OEfTzWfL6vG0qkbn1TlBAOlg4LuW8xK/u0V41Ihc=",
"owner": "Mic92", "owner": "Mic92",
"repo": "sops-nix", "repo": "sops-nix",
"rev": "b35586cc5abacd4eba9ead138b53e2a60920f781", "rev": "2253120d2a6147e57bafb5c689e086221df8032f",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -73,15 +73,14 @@
################### ###################
packages.${system} = let packages.${system} = let
inherit (nixpkgs.legacyPackages.${system}) writeShellScript; inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
vm = self.lib.makeNixosSystem {
inherit system;
extraModules = [(import ./configuration/hardware-specific/vm.nix)];
};
in { in {
default = self.packages.${system}.run-vm; default = vm.config.system.build.vm;
run-vm = let run-vm = let
vm = self.lib.makeNixosSystem {
inherit system;
extraModules = [(import ./configuration/hardware-specific/vm.nix)];
};
qemuNetOpts = self.lib.makeQemuNetOpts { qemuNetOpts = self.lib.makeQemuNetOpts {
"2222" = "2222"; "2222" = "2222";
"3080" = "80"; "3080" = "80";
@ -105,9 +104,7 @@
''; '';
}; };
apps.${system} = let apps.${system} = {
inherit (nixpkgs.legacyPackages.${system}) writeShellScript;
in {
default = { default = {
type = "app"; type = "app";
program = builtins.toString self.packages.${system}.run-vm; program = builtins.toString self.packages.${system}.run-vm;