Initial commit of blog system!

This commit is contained in:
Danila Fedorin 2021-10-23 06:41:12 +00:00
commit 126235a023
3 changed files with 178 additions and 0 deletions

45
configuration.nix Normal file
View File

@ -0,0 +1,45 @@
{ pkgs, system, blogPkgs, ... }: {
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
];
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"
];
services.danilafe-blog = {
enable = true;
challengePath = "/var/www/challenges";
ssl."danilafe.com" = true;
domains."danilafe.com" = blogPkgs.english;
domains."drafts.danilafe.com" = blogPkgs."drafts/english";
domains."drafts.ru.danilafe.com" = blogPkgs."drafts/russian";
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.ohMyZsh = {
enable = true;
plugins = [ "git" ];
};
}

116
flake.lock Normal file
View File

@ -0,0 +1,116 @@
{
"nodes": {
"blog": {
"inputs": {
"blog-source": "blog-source",
"blog-source-localized": "blog-source-localized",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1634969653,
"narHash": "sha256-6zZxGi7NbEDOQLfV3PymmFActpsMYZ0oZ5gF7Byg5Yg=",
"ref": "master",
"rev": "e1c7fa55ae83c27ccf12b384f21b4ef8a926d777",
"revCount": 84,
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake"
}
},
"blog-source": {
"flake": false,
"locked": {
"lastModified": 1633318614,
"narHash": "sha256-P3FZni6F2+jQoPD8gCi1DZMSqei55Ft7vuqs8rCm9ls=",
"ref": "master",
"rev": "72259c16a9d7f87a79660731c483968a00260ad4",
"revCount": 509,
"submodules": true,
"type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
},
"original": {
"submodules": true,
"type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
}
},
"blog-source-localized": {
"flake": false,
"locked": {
"lastModified": 1599463261,
"narHash": "sha256-n6e4uRiOsWuOL7DSzbuP9X8cZNLnKOD/2/eOT0aB+Io=",
"ref": "localization",
"rev": "0b5748cc5a19b5d1d78bfcfa58d4027cc10524dd",
"revCount": 367,
"submodules": true,
"type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
},
"original": {
"ref": "localization",
"submodules": true,
"type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
}
},
"flake-utils": {
"locked": {
"lastModified": 1634851050,
"narHash": "sha256-N83GlSGPJJdcqhUxSCS/WwW5pksYf3VP1M13cDRTSVA=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c91f3de5adaf1de973b797ef7485e441a65b8935",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1634881110,
"narHash": "sha256-glFqhVeqPuT99vfKrOH7lmJDrgwP99KJJSFpgpyvbko=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "22e732d03cc5b76dfd4c81f7dc523ad65a795d2b",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1634782485,
"narHash": "sha256-psfh4OQSokGXG0lpq3zKFbhOo3QfoeudRcaUnwMRkQo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "34ad3ffe08adfca17fcb4e4a47bb5f3b113687be",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"blog": "blog",
"nixpkgs": "nixpkgs_2"
}
}
},
"root": "root",
"version": 7
}

17
flake.nix Normal file
View File

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