Compare commits

..

33 Commits

Author SHA1 Message Date
9d98a24d8e Enable brotli
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-04 02:54:45 +00:00
b65d84e11a Update with CLS-reducing settings
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-04 02:09:58 +00:00
a3d41a2f05 Update blog with dead-KaTeX-elimination
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-04 00:48:38 +00:00
5fe381b450 Give daniel neovim
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-03 23:37:11 +00:00
13ed9c038c Update blog source with new subsetting switch
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-03 23:36:46 +00:00
b728f3232f Add Daniel user group
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-03 23:04:36 +00:00
d2accabba8 Create a non-root user
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-03 23:00:15 +00:00
4b787e4798 Update blog with new article
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2026-01-01 05:32:04 +00:00
90946946af Disable registration on Gitea
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-30 08:14:28 +00:00
249472e6d0 Deploy Scylla
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-27 19:31:21 +00:00
d4576c6287 Migrate gitea instance to NixOS
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-27 03:39:41 +00:00
7e97c1a8d8 Update blog with new resume
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-27 00:22:16 +00:00
3479806db3 Upgrade to new NixOS, pin all packages' nixpkgs, update flake.lock
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-26 23:12:09 +00:00
2a42226f15 Update with latest lock file
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-12-26 21:02:53 +00:00
f611576c46 Update blog etc. again 2025-03-03 03:01:48 +00:00
96f7b952c6 Update nixpkgs and blog
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2025-03-02 21:46:40 +00:00
9ca21e7150 Update lock file
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-06-10 05:31:45 +00:00
6fa3ede34e Update blog flake 2024-05-20 07:41:09 +00:00
fc0ff8a586 Update flake.lock with new nixpkgs etc.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-14 02:47:47 +00:00
355dc7cf9d Update to proper version of nix.package
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2024-05-14 02:45:47 +00:00
9e95e6c8d3 Set state version and update deprecated configuration
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-12-30 23:06:19 +00:00
2286867025 Pin the blog nixpkgs to the OS nixpkgs.
Easier to update Hugo this way.

Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-12-16 19:34:11 +00:00
ea0a65fd34 Update flake.lock to even later working version of packages
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-11-30 07:41:40 +00:00
7f510b654a Update flake.lock
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-11-30 07:18:20 +00:00
a527e746d9 Fix the CORS header for static.danilafe.com
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-11-30 07:17:20 +00:00
3888606d8c Host the static files required by the blog on a subdomain.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-11-30 05:51:20 +00:00
28aad07d18 Add a swapfile. We run out of memory way too often.
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
2023-11-30 05:46:47 +00:00
b996c05034 Update configuration to work with updated blog static flake 2023-04-11 02:59:47 +00:00
7178d72575 Add new MacBook SSH key 2023-04-10 07:34:50 +00:00
513edc34ce Update lockfile to push website forward 2023-02-20 06:58:16 +00:00
4b716ae5ed Remove dead goaccess configuration code 2022-12-31 00:25:50 +00:00
3561027ca5 Update flake lock 2022-12-31 00:21:12 +00:00
3982f0a6b7 Remove Russian website 2022-12-31 00:19:33 +00:00
5 changed files with 503 additions and 234 deletions

View File

@@ -1,67 +1,148 @@
{ pkgs, system, builders, ... }: {
imports = [
./hardware-configuration.nix
./networking.nix # generated at runtime by nixos-infect
./goaccess.nix
];
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
{ pkgs, system, blog, web-files, Scylla, ... }:
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"
];
users.groups.www = {};
services.nginx.group = "www";
services.goaccess = {
enable = false;
user = "goaccess";
group = "www";
dir = "/var/www/goaccess";
host = "dash.danilafe.com";
draftSite = blog.english {
drafts = true;
host = "drafts.danilafe.com";
};
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";
})
(builders.russian {
drafts = true;
host = "drafts.ru.danilafe.com";
})
webFiles = {
"static.danilafe.com" = {
root = web-files;
forceSSL = true;
enableACME = true;
locations."/" = {
extraConfig = ''
add_header 'Access-Control-Allow-Origin' '*';
'';
};
};
};
gitea = {
"dev.danilafe.com" = {
forceSSL = true;
enableACME = true;
locations."/".proxyPass = "http://localhost:3000/";
};
};
scylla = {
"scylla.danilafe.com" = {
root = Scylla;
addSSL = true;
enableACME = true;
locations."/static/" = {
tryFiles = "$uri =404";
};
locations."/" = {
tryFiles = "$uri $uri/ /index.html";
};
};
};
allVirtualHosts = [scylla gitea webFiles] ++ 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" ];
};
}
system.stateVersion = "24.05";
nix = {
package = pkgs.nixVersions.latest;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
environment.systemPackages = with pkgs; [
git
];
boot.tmp.cleanOnBoot = true;
networking.hostName = "nixos-droplet-v2";
networking.firewall.allowPing = true;
networking.firewall.allowedTCPPorts = [ 22 80 443 ];
users.groups.daniel = {};
users.users.daniel = {
isNormalUser = true;
group = "daniel";
extraGroups = [ "wheel" ];
packages = with pkgs; [
neovim
];
};
security.sudo.wheelNeedsPassword = false;
services.openssh.enable = true;
users.users.daniel.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;
recommendedBrotliSettings = true;
recommendedProxySettings = true;
virtualHosts = pkgs.lib.mkMerge allVirtualHosts;
};
users.groups.gitea = {};
users.users.gitea = {
group = "gitea";
isSystemUser = true;
};
services.gitea = {
enable = true;
appName = "Daniel's Tiny Cup Of Tea";
stateDir = "/var/lib/gitea";
# Default database settings (sqlite3, 127.0.0.1, path) all what we want
database = {};
# Default server settings are fine, except we need to customize domain etc.
settings.server = {
DOMAIN = "dev.danilafe.com";
ROOT_URL = "https://dev.danilafe.com";
OFFLINE_MODE = false;
# STATIC_ROOT_PATH = "/var/lib/gitea/data";
};
settings.service = {
DISABLE_REGISTRATION = true;
};
# NixOS service overrides cookies to insecure, but Gitea default is secure
settings.session = {
COOKIE_SECURE = true;
PROVIDER = "file";
};
settings.security = {
INSTALL_LOCK = true;
};
settings.indexer = {
REPO_INDEXER_ENABLED = true;
};
};
users.defaultUserShell = pkgs.zsh;
programs.zsh.enable = true;
programs.zsh.ohMyZsh = {
enable = true;
plugins = [ "git" ];
};
}

452
flake.lock generated
View File

@@ -1,35 +1,105 @@
{
"nodes": {
"blog": {
"Scylla": {
"inputs": {
"blog-source": "blog-source",
"blog-source-localized": "blog-source-localized",
"flake-utils": "flake-utils",
"katex-html": "katex-html",
"nixpkgs": "nixpkgs_3"
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1648508788,
"narHash": "sha256-zjrJmIagGjSoYTTwH2MaqiEusblZ9C+dDC7Hwb9gYq8=",
"ref": "master",
"rev": "f2bb36b862b7c730c42abb0b759ddd3c1c4f3d4b",
"revCount": 102,
"lastModified": 1766862133,
"narHash": "sha256-//tElNDA44kTCRNS8MzBdXA4uCwEfLHI/NVw9PtmLDs=",
"ref": "refs/heads/master",
"rev": "38968c3247945ba99718d7564163f8bf685756c5",
"revCount": 168,
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake"
"url": "https://dev.danilafe.com/Matrix-Programs/Scylla.git"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/blog-static-flake"
"url": "https://dev.danilafe.com/Matrix-Programs/Scylla.git"
}
},
"bergamot-elm": {
"inputs": {
"flake-utils": "flake-utils_4",
"nixpkgs": [
"blog",
"web-files",
"nixpkgs"
]
},
"locked": {
"lastModified": 1766788208,
"narHash": "sha256-/P3uz+VNeNOFzI2qSIijy53MpnejO1sWgB+gMqcI2z0=",
"ref": "main",
"rev": "ceca48840efe668fb033b47bc6e415ea4cf9ae85",
"revCount": 97,
"type": "git",
"url": "https://dev.danilafe.com/Everything-I-Know-About-Types/bergamot-elm.git"
},
"original": {
"ref": "main",
"type": "git",
"url": "https://dev.danilafe.com/Everything-I-Know-About-Types/bergamot-elm.git"
}
},
"bergamot-elm_2": {
"inputs": {
"flake-utils": "flake-utils_6",
"nixpkgs": [
"web-files",
"nixpkgs"
]
},
"locked": {
"lastModified": 1766788208,
"narHash": "sha256-/P3uz+VNeNOFzI2qSIijy53MpnejO1sWgB+gMqcI2z0=",
"ref": "main",
"rev": "ceca48840efe668fb033b47bc6e415ea4cf9ae85",
"revCount": 97,
"type": "git",
"url": "https://dev.danilafe.com/Everything-I-Know-About-Types/bergamot-elm.git"
},
"original": {
"ref": "main",
"type": "git",
"url": "https://dev.danilafe.com/Everything-I-Know-About-Types/bergamot-elm.git"
}
},
"blog": {
"inputs": {
"blog-source": "blog-source",
"flake-utils": "flake-utils_2",
"nixpkgs": [
"nixpkgs"
],
"resume": "resume",
"web-files": "web-files"
},
"locked": {
"lastModified": 1767492562,
"narHash": "sha256-kmiIK8DybOUh9IQUFWIimGBogoouNDIUsgSF4m88Giw=",
"ref": "refs/heads/master",
"rev": "b469d78d1abb031d6ee710481c8591e037d2b44b",
"revCount": 225,
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/blog-static-flake.git"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/blog-static-flake.git"
}
},
"blog-source": {
"flake": false,
"locked": {
"lastModified": 1648508215,
"narHash": "sha256-H8rF4vpzeNw6Pg/hMtF45UFSm/cHN9HIalDrz+mfpC8=",
"ref": "master",
"rev": "f044082fa53b72a5b8386e42a200ddb8072c7a90",
"revCount": 560,
"lastModified": 1767492531,
"narHash": "sha256-129XwekGf9FULizZzS/HfxF12QQHrGeCWYGeCx3uZOg=",
"ref": "refs/heads/master",
"rev": "a6f3cd3f9ad58c73585dce0fda50e60d8e2194dc",
"revCount": 925,
"submodules": true,
"type": "git",
"url": "https://dev.danilafe.com/Web-Projects/blog-static.git"
@@ -40,32 +110,16 @@
"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": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -75,12 +129,15 @@
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -90,12 +147,15 @@
}
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
@@ -104,110 +164,272 @@
"type": "github"
}
},
"katex-html": {
"flake-utils_4": {
"inputs": {
"flake-utils": "flake-utils_2",
"katex-server": "katex-server",
"nixpkgs": "nixpkgs_2"
"systems": "systems_4"
},
"locked": {
"lastModified": 1648445866,
"narHash": "sha256-kLqnZXRxmlk3cSx8fA6dvrAVrqOGLzxboPnP5zQ7SQU=",
"ref": "master",
"rev": "dfc582d367ebda79649d339d1edc5476eb0cf954",
"revCount": 13,
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/katex-html"
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/katex-html"
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"katex-server": {
"flake-utils_5": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs"
"systems": "systems_5"
},
"locked": {
"lastModified": 1648445837,
"narHash": "sha256-llpVUGpy4RQo33B48U3RIz0HBFf2Wqb4SoK1lbeqOjs=",
"ref": "master",
"rev": "2925bd0b2bc5d980eb7b8f79feac28b377a0de13",
"revCount": 6,
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/katex-server"
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/katex-server"
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"inputs": {
"systems": "systems_6"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_7": {
"inputs": {
"systems": "systems_7"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1648444094,
"narHash": "sha256-2liapKh7WXPHELuzLvYK+464g4w9tr9DbNxGuz8XZ98=",
"lastModified": 1766736597,
"narHash": "sha256-BASnpCLodmgiVn0M1MU2Pqyoz0aHwar/0qLkp7CjvSQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "87c74b8120980461a9d4ce8f341551ce0fb50728",
"rev": "f560ccec6b1116b22e6ed15f4c510997d99d5852",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"resume": {
"inputs": {
"flake-utils": "flake-utils_3",
"nixpkgs": [
"blog",
"nixpkgs"
]
},
"locked": {
"lastModified": 1648444094,
"narHash": "sha256-2liapKh7WXPHELuzLvYK+464g4w9tr9DbNxGuz8XZ98=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "87c74b8120980461a9d4ce8f341551ce0fb50728",
"type": "github"
"lastModified": 1766794825,
"narHash": "sha256-+Fabo0uQF9srEXdi9TB1wjB+PHaU9htXj/fjnvUFNAs=",
"ref": "refs/heads/master",
"rev": "f22cb5b79580020079ba7223346e612b41eb7d42",
"revCount": 74,
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/resume"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1648444094,
"narHash": "sha256-2liapKh7WXPHELuzLvYK+464g4w9tr9DbNxGuz8XZ98=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "87c74b8120980461a9d4ce8f341551ce0fb50728",
"type": "github"
},
"original": {
"owner": "nixos",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1648069223,
"narHash": "sha256-BXzQV8p/RR440EB9qY0ULYfTH0zSW1stjUCYeP4SF+E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "1d08ea2bd83abef174fb43cbfb8a856b8ef2ce26",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
"type": "git",
"url": "https://dev.danilafe.com/DanilaFe/resume"
}
},
"root": {
"inputs": {
"Scylla": "Scylla",
"blog": "blog",
"nixpkgs": "nixpkgs_4"
"nixpkgs": "nixpkgs",
"web-files": "web-files_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_5": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_7": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"web-files": {
"inputs": {
"bergamot-elm": "bergamot-elm",
"flake-utils": "flake-utils_5",
"nixpkgs": [
"blog",
"nixpkgs"
]
},
"locked": {
"lastModified": 1766788330,
"narHash": "sha256-7Dx1g0fM/glKCBzo2ZgIwXyp5ASyG/Y7S5OPcltb3Os=",
"ref": "refs/heads/master",
"rev": "407b087a1d0042e04bbcc9333097decd9e776270",
"revCount": 14,
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/web-files.git"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/web-files.git"
}
},
"web-files_2": {
"inputs": {
"bergamot-elm": "bergamot-elm_2",
"flake-utils": "flake-utils_7",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1766788330,
"narHash": "sha256-7Dx1g0fM/glKCBzo2ZgIwXyp5ASyG/Y7S5OPcltb3Os=",
"ref": "refs/heads/master",
"rev": "407b087a1d0042e04bbcc9333097decd9e776270",
"revCount": 14,
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/web-files.git"
},
"original": {
"type": "git",
"url": "https://dev.danilafe.com/Nix-Configs/web-files.git"
}
}
},

View File

@@ -1,18 +1,27 @@
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
blog.url = "git+https://dev.danilafe.com/DanilaFe/blog-static-flake";
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
blog.url = "git+https://dev.danilafe.com/Nix-Configs/blog-static-flake.git";
blog.inputs.nixpkgs.follows = "nixpkgs";
web-files.url = "git+https://dev.danilafe.com/Nix-Configs/web-files.git";
web-files.inputs.nixpkgs.follows = "nixpkgs";
Scylla.url = "git+https://dev.danilafe.com/Matrix-Programs/Scylla.git";
Scylla.inputs.nixpkgs.follows = "nixpkgs";
};
outputs = { self, nixpkgs, blog }:
outputs = { self, nixpkgs, blog, web-files, Scylla }:
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}";
web-files = web-files.defaultPackage."${system}";
Scylla = Scylla.defaultPackage."${system}";
};
modules = [ ./configuration.nix ];
};
};
}

View File

@@ -1,49 +0,0 @@
{ pkgs, config, lib, ... }:
with lib;
let
cfg = config.services.goaccess;
in {
options.services.goaccess = {
enable = mkEnableOption "GoAccess dashboard";
group = mkOption {
type = types.str;
};
user = mkOption {
type = types.str;
};
dir = mkOption {
type = types.str;
};
host = mkOption {
type = types.str;
};
};
config = mkIf cfg.enable {
systemd.services.goaccess = {
wantedBy = [ "multi-user.target" ];
after = [ "network.target" ];
description = "GoAccess live dashboard";
serviceConfig = {
Type = "forking";
User = cfg.user;
ExecStart = "${pkgs.goaccess}/bin/goaccess --ignore-crawlers -f /var/log/nginx/access.log --enable-panel=REFERRERS --enable-panel=KEYPHRASES --log-format COMBINED -o ${cfg.dir}/report.html --real-time-html";
Restart = "on-failure";
};
};
users.users."${cfg.user}" = {
isSystemUser = true;
description = "GoAccess runner";
group = cfg.group;
};
systemd.tmpfiles.rules = [
"d ${cfg.dir} 0755 ${cfg.user} ${cfg.group}"
];
services.nginx.virtualHosts."${cfg.host}" = {
addSSL = true;
enableACME = true;
root = cfg.dir;
};
};
}

View File

@@ -3,4 +3,10 @@
imports = [ "${modulesPath}/profiles/qemu-guest.nix" ];
boot.loader.grub.device = "/dev/vda";
fileSystems."/" = { device = "/dev/vda1"; fsType = "ext4"; };
swapDevices = [
{
device = "/var/lib/swapfile";
size = 2*1024;
}
];
}