This commit is contained in:
Julien Malka 2021-12-05 23:39:59 +01:00
commit e84ad90ba8
5 changed files with 63 additions and 6 deletions

23
flake.lock generated
View file

@ -51,6 +51,22 @@
"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": {
"inputs": {
"flake-utils": "flake-utils",
@ -142,11 +158,11 @@
},
"nur": {
"locked": {
"lastModified": 1638622311,
"narHash": "sha256-Jcn+xvme8X57vmB1THosjYHMhUqMmKiQeLbAI9rtuEA=",
"lastModified": 1638628541,
"narHash": "sha256-3xNNiD+UKdI0zMqo6FAP0/53nm6Q/GPwRITPJkYYUvg=",
"owner": "nix-community",
"repo": "NUR",
"rev": "3d283655b37acadb5485768bfb89d68e5263458e",
"rev": "8f0ed744fa090ccc90feea252ea0290d80c9a0d9",
"type": "github"
},
"original": {
@ -157,6 +173,7 @@
"root": {
"inputs": {
"home-manager": "home-manager",
"homepage": "homepage",
"neovim-nightly-overlay": "neovim-nightly-overlay",
"nixpkgs": "nixpkgs_3",
"nur": "nur"

View file

@ -10,6 +10,11 @@
neovim-nightly-overlay = {
url = "github:nix-community/neovim-nightly-overlay";
};
homepage = {
url = "github:JulienMalka/homepage";
flake = false;
};
};
@ -55,7 +60,10 @@
})
(builtins.attrNames (builtins.readDir ./modules)));
nixosConfigurations = mapAttrs (name: value: (mkMachine name value nixosModules)) (importDir ./machines);
nixosConfigurations = mapAttrs (name: value: (mkMachine name value nixosModules)) (importDir ./machines);
};

View file

@ -37,6 +37,7 @@
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
luj.mediaserver.enable = true;
luj.homepage.enable = true;
networking.hostName = "lisa"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.

View file

@ -71,7 +71,7 @@ in
luj.nginx.enable = true;
virtualHosts."cloud.julienmalka.me" = {
services.nginx.virtualHosts."cloud.julienmalka.me" = {
forceSSL = true;
enableACME = true;
locations."/" = {
@ -88,4 +88,6 @@ in
}
};
}

View 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;
};
};
}