Update configuration to work with updated blog static flake

This commit is contained in:
Danila Fedorin 2023-04-11 02:57:45 +00:00
parent 7178d72575
commit 3eb00b88cd
3 changed files with 70 additions and 67 deletions

View File

@ -1,4 +1,16 @@
{ pkgs, system, builders, ... }: { { pkgs, system, blog, ... }:
let
productionSite = blog.english {
ssl = true;
host = "danilafe.com";
};
draftSite = blog.english {
drafts = true;
host = "drafts.danilafe.com";
};
allVirtualHosts = map blog.virtualHostFor [productionSite draftSite];
in
{
imports = [ imports = [
./hardware-configuration.nix ./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect ./networking.nix # generated at runtime by nixos-infect
@ -28,22 +40,17 @@
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjTgUFIwo/mtoB1kyj1zJ4QxAwLAgdvvePGXmLqjeY1 vanilla@Daniels-MBP.home" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjTgUFIwo/mtoB1kyj1zJ4QxAwLAgdvvePGXmLqjeY1 vanilla@Daniels-MBP.home"
]; ];
users.groups.www = {}; security.acme = {
services.nginx.group = "www"; defaults.email = "danila.fedorin@gmail.com";
acceptTerms = true;
};
services.danilafe-blog = { users.groups.www = {};
services.nginx = {
enable = true; enable = true;
challengePath = "/var/www/challenges"; recommendedGzipSettings = true;
sites = [ recommendedProxySettings = true;
(builders.english { virtualHosts = pkgs.lib.mkMerge allVirtualHosts;
ssl = true;
host = "danilafe.com";
})
(builders.english {
drafts = true;
host = "drafts.danilafe.com";
})
];
}; };
users.defaultUserShell = pkgs.zsh; users.defaultUserShell = pkgs.zsh;
@ -52,4 +59,4 @@
enable = true; enable = true;
plugins = [ "git" ]; plugins = [ "git" ];
}; };
} }

View File

@ -10,26 +10,23 @@
}, },
"locked": { "locked": {
"lastModified": 1676876227, "lastModified": 1676876227,
"narHash": "sha256-0pIG95qAG8/bFxCpOEunkspDssJeX3ZuB47sAFPSzyw=", "narHash": "sha256-V3d9KJb4vmaqS2sqAfPXSVQXEESsXNZHTUgToZUpxn0=",
"ref": "master",
"rev": "d44e5fc12f6abb505d900d6088cd8c446797c2d7",
"revCount": 114,
"type": "git", "type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake" "url": "file:///etc/nixos-custom/blog-static-flake"
}, },
"original": { "original": {
"type": "git", "type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake" "url": "file:///etc/nixos-custom/blog-static-flake"
} }
}, },
"blog-source": { "blog-source": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1676875795, "lastModified": 1681105957,
"narHash": "sha256-MnzRvG3Ct7D+zU1vwpLGMAe5Zoz/Y0WQRnZh7Ts40/s=", "narHash": "sha256-9cjA5X5ZP4FkT48L2kHoujyB9l4WRnagdo5Sa+mKxHY=",
"ref": "master", "ref": "master",
"rev": "cc2b5ef918ad8da4c1fe84be34e42a53627f9c7b", "rev": "a71c0c4e74d881af8631b17947ebe4bcb5c4ce0e",
"revCount": 628, "revCount": 634,
"submodules": true, "submodules": true,
"type": "git", "type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git" "url": "https://dev.danilafe.com/Web-Projects/blog-static.git"

View File

@ -1,18 +1,17 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
blog.url = "git+https://dev.danilafe.com/DanilaFe/blog-static-flake"; blog.url = "git+https://dev.danilafe.com/Nix-Configs/blog-static-flake.git";
}; };
outputs = { self, nixpkgs, blog }: outputs = { self, nixpkgs, blog }:
let let
system = "x86_64-linux"; system = "x86_64-linux";
builders = blog.buildersFor system;
in in
{ {
nixosConfigurations.nixos-droplet-v2 = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos-droplet-v2 = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
specialArgs = { inherit system builders; }; specialArgs = { inherit system; blog = blog.lib."${system}"; };
modules = [ ./configuration.nix blog.nixosModule ]; modules = [ ./configuration.nix ];
}; };
}; };
} }