forked from emily/nixfiles
kyouma.net should work now
This commit is contained in:
parent
da816d4d94
commit
a90266c28e
3 changed files with 83 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
|||
{ config, inputs, ... }:
|
||||
{ config, inputs, pkgs, ... }:
|
||||
let
|
||||
bmpPort = 11019;
|
||||
autoIndex = ''
|
||||
|
@ -12,7 +12,7 @@ in {
|
|||
inputs.fernglas.nixosModules.default
|
||||
];
|
||||
networking = {
|
||||
hostName = "web02";
|
||||
hostName = "web-dus";
|
||||
firewall.allowedTCPPorts = [ 80 443 bmpPort ];
|
||||
firewall.allowedUDPPorts = [ 443 ];
|
||||
};
|
||||
|
@ -21,13 +21,6 @@ in {
|
|||
"2a0f:be01:0:100::1312/128"
|
||||
];
|
||||
};
|
||||
users.users."lg" = {
|
||||
isSystemUser = true;
|
||||
createHome = true;
|
||||
home = "/var/www/lg.kyouma.net";
|
||||
group = "lg";
|
||||
};
|
||||
users.groups."lg" = {};
|
||||
services.vnstat.enable = true;
|
||||
services.fernglas = {
|
||||
enable = true;
|
||||
|
@ -46,10 +39,10 @@ in {
|
|||
};
|
||||
services.nginx = {
|
||||
createHost = {
|
||||
"miau.zip" = { root = "/var/www/kyouma.net"; };
|
||||
"miau.zip" = { root = "/persistent/www/kyouma.net"; };
|
||||
"www.miau.zip" = { redirectTo = "miau.zip"; };
|
||||
"www.kyouma.net" = { redirectTo = "kyouma.net"; };
|
||||
"emily.cat" = { root = "/var/www/emily.cat/_site"; };
|
||||
"emily.cat" = { root = "/persistent/www/emily.cat/_site"; };
|
||||
"www.emily.cat" = { redirectTo = "kyouma.net"; };
|
||||
"www.cocaine.trade" = { redirectTo = "cocaine.trade"; };
|
||||
|
||||
|
@ -62,7 +55,7 @@ in {
|
|||
'';
|
||||
};
|
||||
"cocaine.trade" = {
|
||||
root = "/var/www/cocaine.trade";
|
||||
root = "/persistent/basti/cocaine.trade";
|
||||
extraConfig = ''error_page 404 /404.html;'';
|
||||
locations."/" = {
|
||||
index = "index.html";
|
||||
|
@ -72,15 +65,17 @@ in {
|
|||
};
|
||||
"files.cocaine.trade" = {
|
||||
useACMEHost = "cocaine.trade";
|
||||
root = "/mnt/basti/files.cocaine.trade";
|
||||
root = "/persistent/basti/files.cocaine.trade";
|
||||
locations."/".extraConfig = autoIndex;
|
||||
};
|
||||
"kyouma.net" = {
|
||||
root = "/var/www/kyouma.net";
|
||||
root = inputs.kyouma-www.packages.${config.nixpkgs.hostPlatform.system}.kyouma-www;
|
||||
locations = {
|
||||
"/ihk/".extraConfig = autoIndex;
|
||||
"/ihk/" = {
|
||||
root = "/persistent/www/kyouma.net/ihk";
|
||||
extraConfig = autoIndex;
|
||||
};
|
||||
"/vyos/".extraConfig = autoIndex;
|
||||
"/3ds/".extraConfig = autoIndex;
|
||||
};
|
||||
};
|
||||
"lg.kyouma.net" = {
|
||||
|
|
71
flake.lock
71
flake.lock
|
@ -37,6 +37,43 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1701680307,
|
||||
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"kyouma-www": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1705065011,
|
||||
"narHash": "sha256-G1P3mSNxyntwg7V0hKh9J9TiNnCzuJBcjG2cq2hEXEU=",
|
||||
"ref": "refs/heads/main",
|
||||
"rev": "4d866d22e0698fe2330a9cce6a3d299dff0c8342",
|
||||
"revCount": 3,
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.bsd.gay/snaki/kyouma-net.git"
|
||||
},
|
||||
"original": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@git.bsd.gay/snaki/kyouma-net.git"
|
||||
}
|
||||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1704786394,
|
||||
|
@ -84,11 +121,28 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1704722960,
|
||||
"narHash": "sha256-mKGJ3sPsT6//s+Knglai5YflJUF2DGj7Ai6Ynopz0kI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "317484b1ead87b9c1b8ac5261a8d2dd748a0492d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"fernglas": "fernglas",
|
||||
"kyouma-www": "kyouma-www",
|
||||
"nixos-hardware": "nixos-hardware",
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
"nixpkgs": "nixpkgs_3"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -105,6 +159,21 @@
|
|||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
|
@ -4,9 +4,10 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nixos-hardware.url = "github:nixos/nixos-hardware";
|
||||
fernglas.url = "github:wobcom/fernglas";
|
||||
kyouma-www.url = "git+ssh://git@git.bsd.gay/snaki/kyouma-net.git";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nixos-hardware, fernglas, ... }@inputs: {
|
||||
outputs = { self, nixpkgs, nixos-hardware, fernglas, kyouma-www, ... }@inputs: {
|
||||
nixosConfigurations = {
|
||||
web02 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
|
|
Loading…
Reference in a new issue