2022-11-06 20:23:10 +00:00
|
|
|
{
|
|
|
|
inputs = {
|
|
|
|
nixpkgs.url = "nixpkgs/nixos-unstable";
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
|
2022-11-24 03:48:28 +00:00
|
|
|
outputs = { self, nixpkgs, ... }:
|
|
|
|
let lib = nixpkgs.lib; in
|
|
|
|
{
|
|
|
|
# Windows with NixOS WSL
|
|
|
|
nixosConfigurations.Felia = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./wsl-configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
# includeHardware = false;
|
|
|
|
hostname = "Felia";
|
2022-11-26 05:39:32 +00:00
|
|
|
_services.openssh = {
|
2022-11-24 04:25:13 +00:00
|
|
|
permitRootLogin = "no";
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-11-14 22:10:46 +00:00
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
};
|
|
|
|
# Generic machine
|
|
|
|
nixosConfigurations.lizzi = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
hostname = "lizzi";
|
2022-11-26 05:39:32 +00:00
|
|
|
_networking = {
|
2022-11-24 03:48:28 +00:00
|
|
|
interfaces.eth1.ipv4.addresses = [{
|
|
|
|
address = "71.0.0.1";
|
|
|
|
prefixLength = 24;
|
|
|
|
}];
|
2022-11-26 03:09:01 +00:00
|
|
|
firewall = {
|
2022-11-26 03:37:25 +00:00
|
|
|
enable = false;
|
2022-11-26 06:02:59 +00:00
|
|
|
allowedTCPPorts = [ 80 443 ];
|
2022-11-26 03:09:01 +00:00
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
2022-11-26 05:39:32 +00:00
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
_services.openssh = {
|
2022-11-24 03:48:28 +00:00
|
|
|
permitRootLogin = "no";
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-11-26 05:39:32 +00:00
|
|
|
_services.gitea = {
|
2022-11-24 03:48:28 +00:00
|
|
|
enable = true;
|
|
|
|
stateDir = "/gitea";
|
|
|
|
rootUrl = "https://git.pegasust.com";
|
|
|
|
settings = {
|
|
|
|
repository = {
|
|
|
|
"ENABLE_PUSH_CREATE_USER" = true;
|
|
|
|
"ENABLE_PUSH_CREATE_ORG" = true;
|
|
|
|
};
|
2022-11-14 22:26:42 +00:00
|
|
|
};
|
|
|
|
};
|
2022-11-26 05:39:32 +00:00
|
|
|
_services.nginx = {
|
2022-11-24 03:48:28 +00:00
|
|
|
enable = true;
|
2022-11-26 03:09:01 +00:00
|
|
|
clientMaxBodySize = "100m"; # Allow big file transfers over git :^)
|
2022-11-24 03:48:28 +00:00
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
virtualHosts."git.pegasust.com" = {
|
|
|
|
# Gitea hostname
|
|
|
|
sslCertificate = "/var/lib/acme/git.pegasust.com/fullchain.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/git.pegasust.com/key.pem";
|
|
|
|
forceSSL = true; # Runs on port 80 and 443
|
|
|
|
locations."/".proxyPass = "http://localhost:3000/"; # Proxy to Gitea
|
|
|
|
};
|
2022-11-14 22:26:42 +00:00
|
|
|
};
|
2022-11-14 22:10:46 +00:00
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
};
|
2022-11-26 01:14:13 +00:00
|
|
|
nixosConfigurations.lester = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
hostname = "lester";
|
2022-11-26 05:39:32 +00:00
|
|
|
_networking = {
|
2022-11-26 01:14:13 +00:00
|
|
|
firewall.enable = true;
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
2022-11-26 05:39:32 +00:00
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
_services.openssh = {
|
2022-11-26 01:14:13 +00:00
|
|
|
permitRootLogin = "no";
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-11-28 01:30:29 +00:00
|
|
|
nixosConfigurations.homeless = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
hostname = "homeless";
|
|
|
|
_networking = {
|
|
|
|
firewall = {
|
|
|
|
enable = false;
|
|
|
|
allowedTCPPorts = [ 80 443 ];
|
|
|
|
};
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
_services.openssh = {
|
|
|
|
permitRootLogin = "no";
|
|
|
|
enable = true;
|
|
|
|
};
|
|
|
|
_services.gitea = {
|
|
|
|
enable = true;
|
|
|
|
stateDir = "/gitea";
|
|
|
|
rootUrl = "https://git.pegasust.com";
|
|
|
|
settings = {
|
|
|
|
repository = {
|
|
|
|
"ENABLE_PUSH_CREATE_USER" = true;
|
|
|
|
"ENABLE_PUSH_CREATE_ORG" = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
_services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
clientMaxBodySize = "100m"; # Allow big file transfers over git :^)
|
|
|
|
recommendedGzipSettings = true;
|
|
|
|
recommendedOptimisation = true;
|
|
|
|
recommendedProxySettings = true;
|
|
|
|
recommendedTlsSettings = true;
|
|
|
|
virtualHosts."git.pegasust.com" = {
|
|
|
|
# Gitea hostname
|
|
|
|
sslCertificate = "/var/lib/acme/git.pegasust.com/fullchain.pem";
|
|
|
|
sslCertificateKey = "/var/lib/acme/git.pegasust.com/key.pem";
|
|
|
|
forceSSL = true; # Runs on port 80 and 443
|
|
|
|
locations."/".proxyPass = "http://localhost:3000/"; # Proxy to Gitea
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
nixosConfigurations.nyx = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
hostname = "nyx";
|
2022-11-26 05:39:32 +00:00
|
|
|
_networking = {
|
2022-11-24 03:48:28 +00:00
|
|
|
interfaces.eth1.ipv4.addresses = [{
|
|
|
|
address = "71.0.0.2";
|
|
|
|
prefixLength = 24;
|
|
|
|
}];
|
|
|
|
firewall.enable = true;
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
2022-11-26 05:39:32 +00:00
|
|
|
_boot.loader.grub.enable = true;
|
|
|
|
_boot.loader.grub.version = 2;
|
|
|
|
_services.openssh = {
|
2022-11-24 03:48:28 +00:00
|
|
|
permitRootLogin = "no";
|
|
|
|
enable = true;
|
|
|
|
};
|
2022-11-14 22:10:46 +00:00
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
};
|
2022-11-24 03:48:28 +00:00
|
|
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
hostname = "nixos";
|
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
};
|
2022-11-06 20:23:10 +00:00
|
|
|
};
|
|
|
|
}
|