Initial NixOS infra flake skeleton
This commit is contained in:
commit
9383d615d7
9 changed files with 267 additions and 0 deletions
33
hosts/production/configuration.nix
Normal file
33
hosts/production/configuration.nix
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{ config, pkgs, lib, name, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/common.nix
|
||||
../../modules/sops.nix
|
||||
../../modules/nextcloud.nix
|
||||
../../modules/forgejo.nix
|
||||
];
|
||||
|
||||
networking.hostName = name;
|
||||
|
||||
# Prod: open ports for web
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
|
||||
|
||||
services.flowback = {
|
||||
nextcloudHost = "cloud.example.com";
|
||||
forgejoHost = "git.example.com";
|
||||
};
|
||||
|
||||
# Production should enforce stronger auth; you can refine later.
|
||||
users.users.elifa = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGI1L2SZzAfxkdHPsgJe0cx9s0owlMPyS6LnAURzXyad eli@wsl"
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
34
hosts/staging/configuration.nix
Normal file
34
hosts/staging/configuration.nix
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
{ config, pkgs, lib, name, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/common.nix
|
||||
../../modules/sops.nix
|
||||
../../modules/nextcloud.nix
|
||||
../../modules/forgejo.nix
|
||||
];
|
||||
|
||||
networking.hostName = name;
|
||||
|
||||
# Staging: open ports for web
|
||||
networking.firewall.allowedTCPPorts = [ 80 443 22 ];
|
||||
|
||||
# Put placeholders for domains now; you can change later
|
||||
services.flowback = {
|
||||
nextcloudHost = "cloud-staging.example.com";
|
||||
forgejoHost = "git-staging.example.com";
|
||||
};
|
||||
|
||||
# Minimal user (replace with your SSH key)
|
||||
users.users.elifa = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGI1L2SZzAfxkdHPsgJe0cx9s0owlMPyS6LnAURzXyad eli@wsl"
|
||||
];
|
||||
};
|
||||
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue