This commit is contained in:
emily 2024-01-10 13:50:25 +01:00
parent bd0df11897
commit a294325f35
Signed by: emily
GPG key ID: F6F4C66207FCF995
4 changed files with 9 additions and 13 deletions

View file

@ -1,4 +1,3 @@
{ config, lib, ... }: with lib; { { config, lib, ... }: with lib; {
services.openssh.enable = mkDefault true; services.openssh.enable = mkDefault true;
} }

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, fernglas, ... }: { config, pkgs, lib, inputs, ... }:
let let
bmpPort = 11019; bmpPort = 11019;
autoIndex = '' autoIndex = ''
@ -8,6 +8,9 @@ let
autoindex_localtime on; autoindex_localtime on;
''; '';
in { in {
imports = [
inputs.fernglas.nixosModules.default
];
networking = { networking = {
hostName = "web02"; hostName = "web02";
firewall.allowedTCPPorts = [ 80 443 bmpPort ]; firewall.allowedTCPPorts = [ 80 443 bmpPort ];
@ -82,7 +85,7 @@ in {
}; };
"lg.kyouma.net" = { "lg.kyouma.net" = {
useACMEHost = "kyouma.net"; useACMEHost = "kyouma.net";
locations."/".root = fernglas.packages.${config.nixpkgs.hostPlatform.system}.fernglas-frontend; locations."/".root = inputs.fernglas.packages.${config.nixpkgs.hostPlatform.system}.fernglas-frontend;
locations."/api/".proxyPass = "http://${config.services.fernglas.settings.api.bind}"; locations."/api/".proxyPass = "http://${config.services.fernglas.settings.api.bind}";
}; };
}; };

View file

@ -72,13 +72,13 @@
"locked": { "locked": {
"lastModified": 1704722960, "lastModified": 1704722960,
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=", "narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
"owner": "NixOS", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d", "rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "NixOS", "owner": "nixos",
"ref": "nixos-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"

View file

@ -1,23 +1,17 @@
{ {
description = "emilys config hell"; description = "emilys config hell";
inputs = { inputs = {
nixpkgs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
};
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
fernglas.url = "github:wobcom/fernglas"; fernglas.url = "github:wobcom/fernglas";
}; };
outputs = { self, nixpkgs, nixos-hardware, fernglas, ... }@attrs: { outputs = { self, nixpkgs, nixos-hardware, ... }@attrs: {
nixosConfigurations = { nixosConfigurations = {
web02 = nixpkgs.lib.nixosSystem { web02 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; system = "x86_64-linux";
specialArgs = attrs; specialArgs = attrs;
modules = [ modules = [
fernglas.nixosModules.default
./config/common ./config/common
./config/common-lxc.nix ./config/common-lxc.nix
./config/common-nginx.nix ./config/common-nginx.nix