Compare commits
3 commits
e8c9077a26
...
5af29d9004
Author | SHA1 | Date | |
---|---|---|---|
5af29d9004 | |||
58b9f200dd | |||
e9decd46c6 |
8 changed files with 157 additions and 21 deletions
67
flake.lock
generated
67
flake.lock
generated
|
@ -127,11 +127,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732482255,
|
"lastModified": 1733873195,
|
||||||
"narHash": "sha256-GUffLwzawz5WRVfWaWCg78n/HrBJrOG7QadFY6rtV8A=",
|
"narHash": "sha256-dTosiZ3sZ/NKoLKQ++v8nZdEHya0eTNEsaizNp+MUPM=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "a9953635d7f34e7358d5189751110f87e3ac17da",
|
"rev": "f26aa4b76fb7606127032d33ac73d7d507d82758",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -184,11 +184,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732585961,
|
"lastModified": 1733709556,
|
||||||
"narHash": "sha256-qZk3i/Kk3JL4roSeXlrD2rqjsowBVzoBkXHIzxBGyPs=",
|
"narHash": "sha256-u0ll0DDrKlO7tiLGGtmphv3wFy5ReDuf0USo/OlfROU=",
|
||||||
"owner": "Infinidoge",
|
"owner": "Infinidoge",
|
||||||
"repo": "nix-minecraft",
|
"repo": "nix-minecraft",
|
||||||
"rev": "eb1c9ac4398dcc55d644003548c64964c854fac1",
|
"rev": "8d11f147df83fe137d3d94f6f3646e3a52bec855",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -197,13 +197,49 @@
|
||||||
"type": "github"
|
"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": {
|
"nixos-hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732483221,
|
"lastModified": 1733861262,
|
||||||
"narHash": "sha256-kF6rDeCshoCgmQz+7uiuPdREVFuzhIorGOoPXMalL2U=",
|
"narHash": "sha256-+jjPup/ByS0LEVIrBbt7FnGugJgLeG9oc+ivFASYn2U=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixos-hardware",
|
"repo": "nixos-hardware",
|
||||||
"rev": "45348ad6fb8ac0e8415f6e5e96efe47dd7f39405",
|
"rev": "cf737e2eba82b603f54f71b10cb8fd09d22ce3f5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -215,11 +251,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732014248,
|
"lastModified": 1733759999,
|
||||||
"narHash": "sha256-y/MEyuJ5oBWrWAic/14LaIr/u5E0wRVzyYsouYY3W6w=",
|
"narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "23e89b7da85c3640bbc2173fe04f4bd114342367",
|
"rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -234,6 +270,7 @@
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"lix-module": "lix-module",
|
"lix-module": "lix-module",
|
||||||
"nix-minecraft": "nix-minecraft",
|
"nix-minecraft": "nix-minecraft",
|
||||||
|
"nixos-generators": "nixos-generators",
|
||||||
"nixos-hardware": "nixos-hardware",
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"snowfall-lib": "snowfall-lib",
|
"snowfall-lib": "snowfall-lib",
|
||||||
|
@ -269,11 +306,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1732575825,
|
"lastModified": 1733785344,
|
||||||
"narHash": "sha256-xtt95+c7OUMoqZf4OvA/7AemiH3aVuWHQbErYQoPwFk=",
|
"narHash": "sha256-pm4cfEcPXripE36PYCl0A2Tu5ruwHEvTee+HzNk+SQE=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "3433ea14fbd9e6671d0ff0dd45ed15ee4c156ffa",
|
"rev": "a80af8929781b5fe92ddb8ae52e9027fae780d2a",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||||
nix-minecraft.inputs.nixpkgs.follows = "nixpkgs";
|
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 {
|
outputs = inputs: inputs.snowfall-lib.mkFlake {
|
||||||
|
|
|
@ -48,7 +48,6 @@ in {
|
||||||
signal-desktop
|
signal-desktop
|
||||||
webcord
|
webcord
|
||||||
# Customization
|
# Customization
|
||||||
nerdfonts
|
|
||||||
razergenie
|
razergenie
|
||||||
firefoxpwa
|
firefoxpwa
|
||||||
# Development
|
# Development
|
||||||
|
@ -61,6 +60,7 @@ in {
|
||||||
mangohud
|
mangohud
|
||||||
prismlauncher
|
prismlauncher
|
||||||
# Terminal Tools
|
# Terminal Tools
|
||||||
|
mosh
|
||||||
btop
|
btop
|
||||||
fastfetch
|
fastfetch
|
||||||
];
|
];
|
||||||
|
|
36
modules/nixos/services/binary-cache/default.nix
Normal file
36
modules/nixos/services/binary-cache/default.nix
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
{ 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}/"; } ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
50
modules/nixos/services/traefik-proxy/default.nix
Normal file
50
modules/nixos/services/traefik-proxy/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
{ 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
7
systems/x86_64-iso/plasma6-64bit-iso/default.nix
Normal file
7
systems/x86_64-iso/plasma6-64bit-iso/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{ pkgs, modulesPath, lib, ... }:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
"${modulesPath}/installer/cd-dvd/installation-cd-graphical-calamares-plasma6.nix"
|
||||||
|
];
|
||||||
|
|
||||||
|
}
|
|
@ -8,7 +8,13 @@
|
||||||
|
|
||||||
# Configure Nix
|
# Configure Nix
|
||||||
nix.package = pkgs.lix;
|
nix.package = pkgs.lix;
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings = {
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
substituters = [ "https://cache.games01.kb-one.de" ];
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.game01.kb-one.de:JF++7CgrasYciQeB5jlziqT5BTjaknEk9cMeh4lQf30="
|
||||||
|
];
|
||||||
|
};
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.config.permittedInsecurePackages = [
|
nixpkgs.config.permittedInsecurePackages = [
|
||||||
"electron-27.3.11"
|
"electron-27.3.11"
|
||||||
|
|
|
@ -79,10 +79,8 @@
|
||||||
# Forgejo Runner
|
# Forgejo Runner
|
||||||
services.forgejo-runner.enable = true;
|
services.forgejo-runner.enable = true;
|
||||||
|
|
||||||
services.nix-serve = {
|
# Binary Cache
|
||||||
enable = true;
|
# services.binary-cache.enable = true;
|
||||||
secretKeyFile = "/var/cache-kb-games-01-priv-key.pem";
|
|
||||||
};
|
|
||||||
|
|
||||||
# Do NOT change this value
|
# Do NOT change this value
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
|
Loading…
Add table
Reference in a new issue