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-06 20:23:10 +00:00
|
|
|
outputs = { self, nixpkgs, ... }: {
|
2022-11-14 20:56:23 +00:00
|
|
|
# Windows with NixOS WSL
|
2022-11-06 20:23:10 +00:00
|
|
|
nixosConfigurations.Felia = nixpkgs.lib.nixosSystem {
|
2022-11-14 20:56:23 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./wsl-configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
2022-11-15 22:43:30 +00:00
|
|
|
# includeHardware = false;
|
2022-11-14 20:56:23 +00:00
|
|
|
hostname = "Felia";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
# Generic machine
|
|
|
|
nixosConfigurations.lizzi = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
hostname = "lizzi";
|
2022-11-14 22:10:46 +00:00
|
|
|
networking = {
|
|
|
|
interfaces.eth1.ipv4.addresses = [{
|
|
|
|
address = "71.0.0.1";
|
|
|
|
prefixLength = 24;
|
|
|
|
}];
|
|
|
|
firewall.enable = false;
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
services.openssh = {
|
|
|
|
permitRootLogin = "no";
|
2022-11-14 22:26:42 +00:00
|
|
|
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;
|
2022-11-16 07:29:58 +00:00
|
|
|
clientMaxBodySize = "100m";
|
2022-11-14 22:26:42 +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:10:46 +00:00
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
nixosConfigurations.nyx = nixpkgs.lib.nixosSystem {
|
2022-11-06 20:23:10 +00:00
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
2022-11-14 20:56:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
hostname = "nyx";
|
2022-11-14 22:10:46 +00:00
|
|
|
networking = {
|
|
|
|
interfaces.eth1.ipv4.addresses = [{
|
|
|
|
address = "71.0.0.2";
|
|
|
|
prefixLength = 24;
|
|
|
|
}];
|
|
|
|
firewall.enable = false;
|
|
|
|
useDHCP = false;
|
|
|
|
interfaces.eth0.useDHCP = true;
|
|
|
|
};
|
|
|
|
boot.loader.grub.enable = true;
|
|
|
|
boot.loader.grub.version = 2;
|
|
|
|
services.openssh = {
|
|
|
|
permitRootLogin = "no";
|
2022-11-14 22:26:42 +00:00
|
|
|
enable = true;
|
2022-11-14 22:10:46 +00:00
|
|
|
};
|
2022-11-14 20:56:23 +00:00
|
|
|
};
|
2022-11-06 20:23:10 +00:00
|
|
|
};
|
|
|
|
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = [
|
|
|
|
./configuration.nix
|
|
|
|
];
|
2022-11-14 20:56:23 +00:00
|
|
|
specialArgs = {
|
|
|
|
hostname = "nixos";
|
|
|
|
};
|
2022-11-06 20:23:10 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|