mirror of
https://github.com/JulienMalka/snowfield.git
synced 2025-04-01 09:40:55 +02:00
Added homepage
This commit is contained in:
parent
18b7795c15
commit
44d81ecca3
6 changed files with 104 additions and 162 deletions
|
@ -37,6 +37,7 @@
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
luj.mediaserver.enable = true;
|
luj.mediaserver.enable = true;
|
||||||
|
luj.homepage.enable = true;
|
||||||
networking.hostName = "lisa"; # Define your hostname.
|
networking.hostName = "lisa"; # Define your hostname.
|
||||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||||
|
|
||||||
|
|
|
@ -1,121 +0,0 @@
|
||||||
{ config, pkgs, ... }:
|
|
||||||
{
|
|
||||||
|
|
||||||
services.jellyfin = {
|
|
||||||
enable = true;
|
|
||||||
group = "tv";
|
|
||||||
package = pkgs.jellyfin;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.sonarr = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
group = "tv";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.radarr = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
group = "tv";
|
|
||||||
};
|
|
||||||
|
|
||||||
services.transmission = {
|
|
||||||
enable = true;
|
|
||||||
group = "tv";
|
|
||||||
downloadDirPermissions = "774";
|
|
||||||
settings = {
|
|
||||||
rpc-port = 9091;
|
|
||||||
download-dir = "/home/transmission/Downloads/";
|
|
||||||
incomplete-dir = "/home/transmission/Incomplete/";
|
|
||||||
incomplete-dir-enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services.jackett = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
services.nginx = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
virtualHosts."julienmalka.me" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
root = "/var/www/julienmalka.me";
|
|
||||||
default = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."www.julienmalka.me" = {
|
|
||||||
enableACME = true;
|
|
||||||
forceSSL = true;
|
|
||||||
root = "/var/www/julienmalka.me";
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."tv.julienmalka.me" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:8096";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."series.julienmalka.me" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:8989";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."downloads.julienmalka.me" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:9091";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."jackett.julienmalka.me" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:9117";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualHosts."films.julienmalka.me" = {
|
|
||||||
addSSL = true;
|
|
||||||
enableACME = true;
|
|
||||||
locations."/" = {
|
|
||||||
proxyPass = "http://localhost:7878";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
security.acme.certs = {
|
|
||||||
"www.julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
"julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
"tv.julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
"series.julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
"downloads.julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
"jackett.julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
"films.julienmalka.me".email = "julien.malka@me.com";
|
|
||||||
};
|
|
||||||
|
|
||||||
security.acme.acceptTerms = true;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
23
flake.lock
generated
23
flake.lock
generated
|
@ -51,6 +51,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"homepage": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1638627658,
|
||||||
|
"narHash": "sha256-1mGBNxJqzvbQG4HcHfRLVn5sx+nTx5g/DzeihloGbr8=",
|
||||||
|
"owner": "JulienMalka",
|
||||||
|
"repo": "homepage",
|
||||||
|
"rev": "20d331990ad8c889ef6817ad4f84638947880ac4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "JulienMalka",
|
||||||
|
"repo": "homepage",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"neovim-flake": {
|
"neovim-flake": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
|
@ -142,11 +158,11 @@
|
||||||
},
|
},
|
||||||
"nur": {
|
"nur": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1638622311,
|
"lastModified": 1638628541,
|
||||||
"narHash": "sha256-Jcn+xvme8X57vmB1THosjYHMhUqMmKiQeLbAI9rtuEA=",
|
"narHash": "sha256-3xNNiD+UKdI0zMqo6FAP0/53nm6Q/GPwRITPJkYYUvg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "NUR",
|
"repo": "NUR",
|
||||||
"rev": "3d283655b37acadb5485768bfb89d68e5263458e",
|
"rev": "8f0ed744fa090ccc90feea252ea0290d80c9a0d9",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -157,6 +173,7 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"homepage": "homepage",
|
||||||
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
"neovim-nightly-overlay": "neovim-nightly-overlay",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_3",
|
||||||
"nur": "nur"
|
"nur": "nur"
|
||||||
|
|
26
flake.nix
26
flake.nix
|
@ -11,20 +11,33 @@
|
||||||
url = "github:nix-community/neovim-nightly-overlay";
|
url = "github:nix-community/neovim-nightly-overlay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
homepage = {
|
||||||
|
url = "github:JulienMalka/homepage";
|
||||||
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, home-manager, nixpkgs, neovim-nightly-overlay, nur, ... }@inputs :
|
};
|
||||||
|
|
||||||
|
outputs = inputs@{ self, home-manager, nixpkgs, neovim-nightly-overlay, nur, ... }:
|
||||||
{
|
{
|
||||||
nixosModules = builtins.listToAttrs (map (x: {
|
nixosModules = builtins.listToAttrs (map
|
||||||
|
(x: {
|
||||||
name = x;
|
name = x;
|
||||||
value = import (./modules + "/${x}");
|
value = import (./modules + "/${x}");
|
||||||
}) (builtins.attrNames (builtins.readDir ./modules)));
|
})
|
||||||
|
(builtins.attrNames (builtins.readDir ./modules)));
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
lisa = nixpkgs.lib.nixosSystem {
|
lisa = nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs;
|
||||||
|
};
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = builtins.attrValues self.nixosModules ++ [./configuration.nix ./config/hosts/lisa.nix
|
modules = builtins.attrValues self.nixosModules ++ [
|
||||||
home-manager.nixosModules.home-manager {
|
./configuration.nix
|
||||||
|
./config/hosts/lisa.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
home-manager.users.julien = import ./config/home/home-lisa.nix;
|
home-manager.users.julien = import ./config/home/home-lisa.nix;
|
||||||
|
@ -32,7 +45,8 @@ outputs = { self, home-manager, nixpkgs, neovim-nightly-overlay, nur, ... }@inpu
|
||||||
inputs.neovim-nightly-overlay.overlay
|
inputs.neovim-nightly-overlay.overlay
|
||||||
];
|
];
|
||||||
|
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -71,7 +71,7 @@ in
|
||||||
|
|
||||||
|
|
||||||
luj.nginx.enable = true;
|
luj.nginx.enable = true;
|
||||||
virtualHosts."cloud.julienmalka.me" = {
|
services.nginx.virtualHosts."cloud.julienmalka.me" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
locations."/" = {
|
locations."/" = {
|
||||||
|
@ -88,4 +88,6 @@ in
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
29
modules/homepage/default.nix
Normal file
29
modules/homepage/default.nix
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
{ lib, pkgs, inputs, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.luj.homepage;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.luj.homepage = {
|
||||||
|
enable = mkEnableOption "enable homepage";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable
|
||||||
|
{
|
||||||
|
luj.nginx.enable = true;
|
||||||
|
services.nginx.virtualHosts."julienmalka.me" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = inputs.homepage;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
services.nginx.virtualHosts."www.julienmalka.me" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
root = inputs.homepage;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue