Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
05fdf726a3 | |||
5eab965637 | |||
a42a8ba871 | |||
a9e74478c9 |
@@ -14,7 +14,7 @@ in {
|
||||
services.httpd = {
|
||||
enable = true;
|
||||
enablePHP = true;
|
||||
# phpPackage = inputs.phps.packages.x86_64-linux.php74;
|
||||
phpPackage = inputs.phps.packages.x86_64-linux.php80;
|
||||
extraConfig = ''
|
||||
ScriptAlias /fortune ${fortune}/bin/fortune
|
||||
'';
|
||||
|
@@ -6,6 +6,7 @@
|
||||
self.nixosModules.server
|
||||
self.nixosModules.zerotier
|
||||
./dns.nix
|
||||
./memos.nix
|
||||
./vault.nix
|
||||
];
|
||||
|
||||
|
45
hosts/monolith/memos.nix
Executable file
45
hosts/monolith/memos.nix
Executable file
@@ -0,0 +1,45 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users = {
|
||||
memos = {
|
||||
isSystemUser = true;
|
||||
group = "memos";
|
||||
};
|
||||
};
|
||||
|
||||
users.groups = {
|
||||
memos = { };
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.memos ];
|
||||
|
||||
systemd.tmpfiles.settings = {
|
||||
memosDirs = {
|
||||
"/var/opt/memos".d = {
|
||||
mode = "700";
|
||||
user = "memos";
|
||||
group = "memos";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# systemd.services = {
|
||||
# memos = {
|
||||
# description = "Memos Note-taking Server";
|
||||
# wantedBy = [ "multi-user.target" ];
|
||||
# after = [ "network.target" ];
|
||||
# serviceConfig = {
|
||||
# Type = "simple";
|
||||
# User = "memos";
|
||||
# WorkingDirectory = "/var/opt/memos";
|
||||
# ExecStart = "${pkgs.memos}/bin/memos --data /var/opt/memos --port 5230";
|
||||
# Restart = "on-failure";
|
||||
# TimeoutSec = 15;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [ 5230 ];
|
||||
};
|
||||
}
|
@@ -5,8 +5,8 @@
|
||||
nix.settings = {
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
substituters = [
|
||||
"https://nixcache.shelvacu.com"
|
||||
"https://fossar.cachix.org"
|
||||
# "https://nixcache.shelvacu.com"
|
||||
];
|
||||
trusted-public-keys = [
|
||||
"fossar.cachix.org-1:Zv6FuqIboeHPWQS7ysLCJ7UT7xExb4OE8c4LyGb5AsE="
|
||||
@@ -15,6 +15,12 @@
|
||||
trusted-users = [ "@wheel" ];
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
users.users.nettika = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" "networkmanager" ];
|
||||
|
Reference in New Issue
Block a user