website maybe
This commit is contained in:
parent
65139a31ac
commit
3e96b08562
5 changed files with 28 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
conf = {
|
||||
ssh.enable = true;
|
||||
nginx.enable = true;
|
||||
website.enable = true;
|
||||
|
||||
stateVersion = "25.05";
|
||||
hmStateVersion = "25.05";
|
||||
|
|
|
@ -9,12 +9,14 @@ in {
|
|||
./home
|
||||
./layout
|
||||
./networking
|
||||
./nginx
|
||||
./niri
|
||||
./nix
|
||||
./secureboot
|
||||
./ssh
|
||||
./utils
|
||||
./vm
|
||||
./website
|
||||
];
|
||||
|
||||
documentation.nixos.enable = false;
|
||||
|
|
8
modules/nginx/default.nix
Normal file
8
modules/nginx/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, lib, ... }: let
|
||||
inherit (config) conf;
|
||||
inherit (lib) mkIf;
|
||||
in mkIf conf.nginx.enable {
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
16
modules/website/default.nix
Normal file
16
modules/website/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
|||
{ lib, config, pkgs, ... }: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (config) conf;
|
||||
in mkIf conf.website.enable {
|
||||
services.nginx.virtualHosts = {
|
||||
"twoneis.site" = {
|
||||
servername = "twoneis.site";
|
||||
forceSSL = false;
|
||||
locations = {
|
||||
"/" = {
|
||||
return = "200 \"Faggot\"";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -18,6 +18,7 @@ in {
|
|||
# Generally server options
|
||||
ssh.enable = mkEnableOption "Install my public key to allow accessing this machine via ssh.";
|
||||
nginx.enable = mkEnableOption "Enable nginx.";
|
||||
website.enable = mkEnableOption "Serve website through nginx. Nginx must be enabled to work correctly.";
|
||||
|
||||
# Mixed and more complex options
|
||||
username = mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue