elnudrop: define enableSSL special argument
This commit is contained in:
parent
86e8c8c9ec
commit
6176753e71
4 changed files with 27 additions and 22 deletions
|
@ -7,6 +7,9 @@ let
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
configImports = [
|
||||||
|
./configuration.nix
|
||||||
|
];
|
||||||
hmImports = [
|
hmImports = [
|
||||||
(import ./home.nix)
|
(import ./home.nix)
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
@ -20,9 +23,8 @@ in
|
||||||
desktop = lib.nixosSystem {
|
desktop = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; };
|
specialArgs = { inherit user; };
|
||||||
modules = [
|
modules = configImports ++ [
|
||||||
./desktop
|
./desktop
|
||||||
./configuration.nix
|
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
{
|
{
|
||||||
boot.loader.grub.gfxmodeEfi = "1920x1080";
|
boot.loader.grub.gfxmodeEfi = "1920x1080";
|
||||||
|
@ -46,9 +48,8 @@ in
|
||||||
x220 = lib.nixosSystem {
|
x220 = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; };
|
specialArgs = { inherit user; };
|
||||||
modules = [
|
modules = configImports ++ [
|
||||||
./thinkpads
|
./thinkpads
|
||||||
./configuration.nix
|
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
{
|
{
|
||||||
# 1024x768 is the closest supported resolution to X220's native 1366x768
|
# 1024x768 is the closest supported resolution to X220's native 1366x768
|
||||||
|
@ -74,9 +75,8 @@ in
|
||||||
t430 = lib.nixosSystem {
|
t430 = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; };
|
specialArgs = { inherit user; };
|
||||||
modules = [
|
modules = configImports ++ [
|
||||||
./thinkpads
|
./thinkpads
|
||||||
./configuration.nix
|
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
{
|
{
|
||||||
boot.loader.grub.gfxmodeEfi = "1600x900";
|
boot.loader.grub.gfxmodeEfi = "1600x900";
|
||||||
|
@ -99,9 +99,8 @@ in
|
||||||
virtualbox = lib.nixosSystem {
|
virtualbox = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; };
|
specialArgs = { inherit user; };
|
||||||
modules = [
|
modules = configImports ++ [
|
||||||
./virtualbox
|
./virtualbox
|
||||||
./configuration.nix
|
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
{
|
{
|
||||||
networking.hostName = "virtualbox";
|
networking.hostName = "virtualbox";
|
||||||
|
@ -122,10 +121,12 @@ in
|
||||||
|
|
||||||
elnudrop = lib.nixosSystem {
|
elnudrop = lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
specialArgs = { inherit user; };
|
specialArgs = {
|
||||||
modules = [
|
inherit user;
|
||||||
|
enableSSL = true;
|
||||||
|
};
|
||||||
|
modules = configImports ++ [
|
||||||
./elnudrop
|
./elnudrop
|
||||||
./configuration.nix
|
|
||||||
{
|
{
|
||||||
networking.hostName = "elnudrop";
|
networking.hostName = "elnudrop";
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,14 @@
|
||||||
|
{ enableSSL, ... }:
|
||||||
|
|
||||||
let host = "jichan.org"; in {
|
let host = "jichan.org"; in {
|
||||||
services.nginx.virtualHosts."www.${host}" = {
|
services.nginx.virtualHosts."www.${host}" = {
|
||||||
forceSSL = true;
|
forceSSL = enableSSL;
|
||||||
enableACME = true;
|
enableACME = enableSSL;
|
||||||
globalRedirect = host;
|
globalRedirect = host;
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."${host}" = {
|
services.nginx.virtualHosts."${host}" = {
|
||||||
forceSSL = true;
|
forceSSL = enableSSL;
|
||||||
enableACME = true;
|
enableACME = enableSSL;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
error_page 502 /502.html;
|
error_page 502 /502.html;
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,13 +1,15 @@
|
||||||
|
{ enableSSL, ... }:
|
||||||
|
|
||||||
with import ../../../../modules/tailscale/default.nix;
|
with import ../../../../modules/tailscale/default.nix;
|
||||||
let host = "tegakituesday.com"; in {
|
let host = "tegakituesday.com"; in {
|
||||||
services.nginx.virtualHosts."www.${host}" = {
|
services.nginx.virtualHosts."www.${host}" = {
|
||||||
forceSSL = true;
|
forceSSL = enableSSL;
|
||||||
enableACME = true;
|
enableACME = enableSSL;
|
||||||
globalRedirect = host;
|
globalRedirect = host;
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."${host}" = {
|
services.nginx.virtualHosts."${host}" = {
|
||||||
forceSSL = true;
|
forceSSL = enableSSL;
|
||||||
enableACME = true;
|
enableACME = enableSSL;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
error_page 502 /502.html;
|
error_page 502 /502.html;
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, ... }:
|
{ config, enableSSL, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
baseDomain = "elnu.com";
|
baseDomain = "elnu.com";
|
||||||
|
@ -18,8 +18,8 @@ in {
|
||||||
};
|
};
|
||||||
environment.systemPackages = [ config.services.headscale.package ];
|
environment.systemPackages = [ config.services.headscale.package ];
|
||||||
services.nginx.virtualHosts.${domain} = {
|
services.nginx.virtualHosts.${domain} = {
|
||||||
forceSSL = true;
|
forceSSL = enableSSL;
|
||||||
enableACME = true;
|
enableACME = enableSSL;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
proxyPass = "http://localhost:${ toString config.services.headscale.port }";
|
proxyPass = "http://localhost:${ toString config.services.headscale.port }";
|
||||||
proxyWebsockets = true;
|
proxyWebsockets = true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue