Compare commits
3 commits
98ad20baca
...
1c7810a49e
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1c7810a49e | ||
![]() |
adc44af3a0 | ||
![]() |
263b27cbb2 |
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,2 @@
|
|||
!**/.keep
|
||||
result
|
||||
flake.lock
|
||||
|
|
61
flake.lock
Normal file
61
flake.lock
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1754292888,
|
||||
"narHash": "sha256-1ziydHSiDuSnaiPzCQh1mRFBsM2d2yRX9I+5OPGEmIE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ce01daebf8489ba97bd1609d185ea276efdeb121",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-25.05",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
inputs.flake-utils.url = "github:numtide/flake-utils";
|
||||
inputs = {
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
|
|
|
@ -4,8 +4,5 @@
|
|||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./trash
|
||||
./services
|
||||
];
|
||||
imports = [];
|
||||
}
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./forgejo
|
||||
];
|
||||
}
|
|
@ -1,66 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.options.trivium.services.forgejo;
|
||||
in {
|
||||
options.trivium.services.forgejo = {
|
||||
enable = mkEnableOption "forgejo settings";
|
||||
|
||||
virtualHost = mkOption {
|
||||
type = types.string;
|
||||
description = "Virtualhost to use for nginx's reverse proxy. Usually something like git.<your server>.com";
|
||||
};
|
||||
|
||||
appName = mkOption {
|
||||
type = types.string;
|
||||
description = "You guess what this does";
|
||||
};
|
||||
|
||||
disableRegistration = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Turn this off just to create the first admin account";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
nginx = {
|
||||
virtualHosts."${cfg.virtualHost}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/".proxyPass = "http://localhost:9170";
|
||||
};
|
||||
};
|
||||
|
||||
forgejo = {
|
||||
enable = true;
|
||||
lfs.enable = true;
|
||||
useWizard = false;
|
||||
settings = {
|
||||
general.APP_NAME = "${cfg.appName}";
|
||||
ui.DEFAULT_THEME = "forgejo-dark";
|
||||
server = {
|
||||
DOMAIN = "${cfg.virtualHost}";
|
||||
ROOT_URL = "https://${cfg.virtualHost}";
|
||||
HTTP_PORT = 9170;
|
||||
LANDING_PAGE = "explore";
|
||||
};
|
||||
|
||||
service.DISABLE_REGISTRATION = ${cfg.disableRegistration};
|
||||
|
||||
actions = {
|
||||
ENABLED = true;
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./steam
|
||||
];
|
||||
}
|
|
@ -1,55 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
with lib; let
|
||||
cfg = config.options.trivium.trash.steam;
|
||||
in {
|
||||
options.trivium.trash.steam = {
|
||||
enable = mkEnableOption "steam settings";
|
||||
|
||||
compatibilityPackages = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Enable additional compatibility packages (protontricks, protonup, etc.)";
|
||||
};
|
||||
|
||||
remotePlayOpenFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Open firewall for Steam Remote Play";
|
||||
};
|
||||
|
||||
dedicatedServerOpenFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Open firewall for Steam Dedicated Server";
|
||||
};
|
||||
|
||||
localNetworkGameTransfersOpenFirewall = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Open firewall for Steam Local Network Game Transfers";
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = cfg.remotePlayOpenFirewall;
|
||||
dedicatedServer.openFirewall = cfg.dedicatedServerOpenFirewall;
|
||||
localNetworkGameTransfers.openFirewall = cfg.localNetworkGameTransfersOpenFirewall;
|
||||
};
|
||||
|
||||
environment = mkIf cfg.compatibilityPackages {
|
||||
systemPackages = with pkgs; [
|
||||
protontricks
|
||||
protonup
|
||||
protonup-ng
|
||||
winetricks
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue