nixos-server-conf/dev_system.nix

59 lines
1.3 KiB
Nix
Raw Normal View History

2025-04-01 14:46:19 +00:00
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
# NixOS-WSL specific options are documented on the NixOS-WSL repository:
# https://github.com/nix-community/NixOS-WSL
{
config,
lib,
pkgs,
...
}:
2025-04-01 14:46:19 +00:00
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
2025-04-01 14:46:19 +00:00
in
{
imports = [
./shared/system.nix
./shared/dev_user.nix
./shared/docker.nix
./shared/ssh.nix
];
2025-06-12 16:04:45 +00:00
services.openssh.settings.AllowUsers = [ "pipeline" ];
2025-05-22 10:49:23 +00:00
users.users = {
# connection only via ssh key
pipeline = {
isNormalUser = true;
home = "/home/pipeline";
description = "User used by forgejo runners to connect to this system";
extraGroups = [ "docker" ];
2025-06-23 09:19:04 +00:00
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPB9tvEWgxrhK0pUs9RJrdreNX1EBxJ/nrz57qzP48Uk michaelh@michael-node"
];
2025-05-22 10:49:23 +00:00
};
};
2025-06-18 08:44:51 +00:00
2025-06-24 10:09:41 +00:00
networking.firewall = {
allowedTCPPortRanges = [
{ from = 8000; to = 8020; }
];
};
2025-06-18 08:44:51 +00:00
services = {
mysql = {
enable = true;
package = pkgs.mariadb;
2025-06-19 06:28:41 +00:00
settings = {
mysqld = {
port = 8000;
};
};
2025-06-18 08:44:51 +00:00
};
};
}