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 b996c05034
3 changed files with 73 additions and 67 deletions

View File

@ -1,55 +1,62 @@
{ pkgs, system, builders, ... }: {
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
];
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
{ pkgs, system, blog, ... }:
let
productionSite = blog.english {
ssl = true;
host = "danilafe.com";
};
environment.systemPackages = with pkgs; [
git
];
boot.cleanTmpDir = true;
networking.hostName = "nixos-droplet-v2";
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXYJZfEOgccfCa3uQV9z2rHvGn4AuVnXbIDXv27HgEk vanilla@arch-xps"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOzk0SnRBJhpfNpPBgkReQoDpul2Egl2yJhRw7ldYEzF NixOS"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAoyFSuik6XRU2b+O4v9C1bc7rKJyjKgzUeaBaVNQKN6 vanilla-pinebook"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjTgUFIwo/mtoB1kyj1zJ4QxAwLAgdvvePGXmLqjeY1 vanilla@Daniels-MBP.home"
];
users.groups.www = {};
services.nginx.group = "www";
services.danilafe-blog = {
enable = true;
challengePath = "/var/www/challenges";
sites = [
(builders.english {
ssl = true;
host = "danilafe.com";
})
(builders.english {
drafts = true;
host = "drafts.danilafe.com";
})
draftSite = blog.english {
drafts = true;
host = "drafts.danilafe.com";
};
allVirtualHosts = map blog.virtualHostFor [productionSite draftSite];
in
{
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
];
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.ohMyZsh = {
enable = true;
plugins = [ "git" ];
};
}
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
environment.systemPackages = with pkgs; [
git
];
boot.cleanTmpDir = true;
networking.hostName = "nixos-droplet-v2";
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
services.openssh.enable = true;
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJXYJZfEOgccfCa3uQV9z2rHvGn4AuVnXbIDXv27HgEk vanilla@arch-xps"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOzk0SnRBJhpfNpPBgkReQoDpul2Egl2yJhRw7ldYEzF NixOS"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAoyFSuik6XRU2b+O4v9C1bc7rKJyjKgzUeaBaVNQKN6 vanilla-pinebook"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPjTgUFIwo/mtoB1kyj1zJ4QxAwLAgdvvePGXmLqjeY1 vanilla@Daniels-MBP.home"
];
security.acme = {
defaults.email = "danila.fedorin@gmail.com";
acceptTerms = true;
};
users.groups.www = {};
services.nginx = {
enable = true;
recommendedGzipSettings = true;
recommendedProxySettings = true;
virtualHosts = pkgs.lib.mkMerge allVirtualHosts;
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.ohMyZsh = {
enable = true;
plugins = [ "git" ];
};
}

View File

@ -9,27 +9,27 @@
"resume": "resume"
},
"locked": {
"lastModified": 1676876227,
"narHash": "sha256-0pIG95qAG8/bFxCpOEunkspDssJeX3ZuB47sAFPSzyw=",
"lastModified": 1681181670,
"narHash": "sha256-MsoGEzIKZHUjPAGzyADR/yROxarBWqUbZJdlX3vKm6Q=",
"ref": "master",
"rev": "d44e5fc12f6abb505d900d6088cd8c446797c2d7",
"revCount": 114,
"rev": "ab4b92d031a4d46ad59f49e33f39e9d2ef7041f9",
"revCount": 116,
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake"
"url": "https://dev.danilafe.com/Nix-Configs/blog-static-flake.git"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake"
"url": "https://dev.danilafe.com/Nix-Configs/blog-static-flake.git"
}
},
"blog-source": {
"flake": false,
"locked": {
"lastModified": 1676875795,
"narHash": "sha256-MnzRvG3Ct7D+zU1vwpLGMAe5Zoz/Y0WQRnZh7Ts40/s=",
"lastModified": 1681105957,
"narHash": "sha256-9cjA5X5ZP4FkT48L2kHoujyB9l4WRnagdo5Sa+mKxHY=",
"ref": "master",
"rev": "cc2b5ef918ad8da4c1fe84be34e42a53627f9c7b",
"revCount": 628,
"rev": "a71c0c4e74d881af8631b17947ebe4bcb5c4ce0e",
"revCount": 634,
"submodules": true,
"type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"

View File

@ -1,18 +1,17 @@
{
inputs = {
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 }:
let
system = "x86_64-linux";
builders = blog.buildersFor system;
in
{
nixosConfigurations.nixos-droplet-v2 = nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit system builders; };
modules = [ ./configuration.nix blog.nixosModule ];
inherit system;
specialArgs = { inherit system; blog = blog.lib."${system}"; };
modules = [ ./configuration.nix ];
};
};
}