Compare commits

..

No commits in common. "5af29d9004fee262559405cac622fb3077071df0" and "e8c9077a2686a39fd5f344d850866fa9a73d963b" have entirely different histories.

8 changed files with 21 additions and 157 deletions

67
flake.lock generated
View file

@ -127,11 +127,11 @@
]
},
"locked": {
"lastModified": 1733873195,
"narHash": "sha256-dTosiZ3sZ/NKoLKQ++v8nZdEHya0eTNEsaizNp+MUPM=",
"lastModified": 1732482255,
"narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "f26aa4b76fb7606127032d33ac73d7d507d82758",
"rev": "a9953635d7f34e7358d5189751110f87e3ac17da",
"type": "github"
},
"original": {
@ -184,11 +184,11 @@
]
},
"locked": {
"lastModified": 1733709556,
"narHash": "sha256-u0ll0DDrKlO7tiLGGtmphv3wFy5ReDuf0USo/OlfROU=",
"lastModified": 1732585961,
"narHash": "sha256-qZk3i/Kk3JL4roSeXlrD2rqjsowBVzoBkXHIzxBGyPs=",
"owner": "Infinidoge",
"repo": "nix-minecraft",
"rev": "8d11f147df83fe137d3d94f6f3646e3a52bec855",
"rev": "eb1c9ac4398dcc55d644003548c64964c854fac1",
"type": "github"
},
"original": {
@ -197,49 +197,13 @@
"type": "github"
}
},
"nixlib": {
"locked": {
"lastModified": 1733620091,
"narHash": "sha256-5WoMeCkaXqTZwwCNLRzyLxEJn8ISwjx4cNqLgqKwg9s=",
"owner": "nix-community",
"repo": "nixpkgs.lib",
"rev": "f4dc9a6c02e5e14d91d158522f69f6ab4194eb5b",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixpkgs.lib",
"type": "github"
}
},
"nixos-generators": {
"inputs": {
"nixlib": "nixlib",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1733706547,
"narHash": "sha256-BdFW7TMgES7q8I5FGX5hlz+0Xp4WyfAP3tHDwEupSWU=",
"owner": "nix-community",
"repo": "nixos-generators",
"rev": "f5a0197ccfef7388885fc9455e74d6dd39e0c5e8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nixos-generators",
"type": "github"
}
},
"nixos-hardware": {
"locked": {
"lastModified": 1733861262,
"narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=",
"lastModified": 1732483221,
"narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=",
"owner": "NixOS",
"repo": "nixos-hardware",
"rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5",
"rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405",
"type": "github"
},
"original": {
@ -251,11 +215,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733759999,
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
"lastModified": 1732014248,
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
"type": "github"
},
"original": {
@ -270,7 +234,6 @@
"home-manager": "home-manager",
"lix-module": "lix-module",
"nix-minecraft": "nix-minecraft",
"nixos-generators": "nixos-generators",
"nixos-hardware": "nixos-hardware",
"nixpkgs": "nixpkgs",
"snowfall-lib": "snowfall-lib",
@ -306,11 +269,11 @@
]
},
"locked": {
"lastModified": 1733785344,
"narHash": "sha256-pm4cfEcPXripE36PYCl0A2Tu5ruwHEvTee+HzNk+SQE=",
"lastModified": 1732575825,
"narHash": "sha256-xtt95+c7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "a80af8929781b5fe92ddb8ae52e9027fae780d2a",
"rev": "3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa",
"type": "github"
},
"original": {

View file

@ -12,8 +12,6 @@
home-manager.inputs.nixpkgs.follows = "nixpkgs";
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = inputs: inputs.snowfall-lib.mkFlake {

View file

@ -48,6 +48,7 @@ in {
signal-desktop
webcord
# Customization
nerdfonts
razergenie
firefoxpwa
# Development
@ -60,7 +61,6 @@ in {
mangohud
prismlauncher
# Terminal Tools
mosh
btop
fastfetch
];

View file

@ -1,36 +0,0 @@
{ inputs, config, lib, pkgs, ... }:
let
cfg = config.services.binary-cache;
in
{
imports = [
];
options.services.binary-cache = {
enable = lib.mkOption {
type = with lib.types; uniq bool;
default = false;
description = "Enable minecraft server";
};
};
config = lib.mkIf cfg.enable {
services.nix-serve = {
enable = true;
secretKeyFile = "/var/secrets/cache-games01-private-key.pem";
bindAddress = "cache.game01.kb-one.de";
};
# Configure Reverse-Proxy
services.traefik-proxy.enable = true;
services.traefik.staticConfigOptions = {
http.routers.nix-cache.entrypoints = "websecure";
http.routers.nix-cache.tls.certresolver = "letsencrypt";
http.routers.nix-cache.rule = "Host(`${config.services.nix-serve.bindAddress}`)";
http.routers.nix-cache.service = "nix-cache";
services.nix-cache.loadBalancer.servers = [ { url = "http://localhost:${toString config.services.nix-serve.port}/"; } ];
};
};
}

View file

@ -1,50 +0,0 @@
{ inputs, config, lib, pkgs, ... }:
let
cfg = config.services.traefik-proxy;
in
{
imports = [
];
options.services.traefik-proxy = {
enable = lib.mkOption {
type = with lib.types; uniq bool;
default = false;
description = "Enable Pre-Configured Traefik Proxy";
};
};
config = lib.mkIf cfg.enable {
services.traefik = {
enable = true;
staticConfigOptions = {
entryPoints.web.address = ":80";
entryPoints.websecure.address = ":443";
};
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
# Enable Secure Dashboard
services.traefik.staticConfigOptions.api = {};
services.traefik.staticConfigOptions = {
http.routers.dashboard.entrypoints = "websecure";
http.routers.dashboard.tls.certResolver = "letsencrypt";
http.routers.dashboard.rule = "Host(`game01.kb-one.de`) && (PathPrefix(`/api`) || PathPrefix(`/dashboard`))";
http.routers.dashboard.service = "api@internal";
# TODO: Set Basicauth via SOPS
# http.routers.dashboard.middlewares = "auth";
# http.middlewares.auth.basicauth.users = "master:\$\$2y\$\$05\$\$JwzsNHz7CMJh0RU1eMe3AOfY5H30Qr1Q/glS1r/qEHCNpo5LvWnRW";
};
# Configure Letsencrypt
services.traefik.staticConfigOptions = {
certificatesResolvers.letsencrypt.acme = {
email = "kb01@kb-one.de";
tlsChallenge = {};
storage = "/var/secrets/traefik/acme.json";
};
};
};
}

View file

@ -1,7 +0,0 @@
{ pkgs, modulesPath, lib, ... }:
{
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
];
}

View file

@ -8,13 +8,7 @@
# Configure Nix
nix.package = pkgs.lix;
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://cache.games01.kb-one.de" ];
trusted-public-keys = [
"cache.game01.kb-one.de:JF++7CgrasYciQeB5jlziqT5BTjaknEk9cMeh4lQf30="
];
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
nixpkgs.config.permittedInsecurePackages = [
"electron-27.3.11"

View file

@ -79,8 +79,10 @@
# Forgejo Runner
services.forgejo-runner.enable = true;
# Binary Cache
# services.binary-cache.enable = true;
services.nix-serve = {
enable = true;
secretKeyFile = "/var/cache-kb-games-01-priv-key.pem";
};
# Do NOT change this value
system.stateVersion = "24.05"; # Did you read the comment?