mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-04-02 11:12:09 +02:00
Compare commits
4 Commits
d9b4102bed
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5d9ab362a3 | ||
|
|
a6b2f66ac8 | ||
|
|
e2a60b15dc | ||
|
|
d029d6f205 |
12
flake.lock
generated
12
flake.lock
generated
@@ -125,11 +125,11 @@
|
|||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774471448,
|
"lastModified": 1774893414,
|
||||||
"narHash": "sha256-fK0DhC17S0DJVnvnwoPXQ1UGwmOzcma2zhwncBP5UYw=",
|
"narHash": "sha256-2n0foeNENf4O3ZHmsppYtecrVWwjU80A6Dohjy1BKLA=",
|
||||||
"owner": "anotherhadi",
|
"owner": "anotherhadi",
|
||||||
"repo": "blog",
|
"repo": "blog",
|
||||||
"rev": "7362feb3f58ac6f65e99315acc0101e0303862ba",
|
"rev": "cd93b16618678bbebade1ed6898f3844bf61d25d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -308,11 +308,11 @@
|
|||||||
"nixpkgs": "nixpkgs_4"
|
"nixpkgs": "nixpkgs_4"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1774468489,
|
"lastModified": 1774887895,
|
||||||
"narHash": "sha256-VQfXEaN08eR5rVjwF1Wk5arNhoebZQst2ommdIIAHF4=",
|
"narHash": "sha256-cULnvYcj/LzUtV8Q6HyYHgKevQBZjAF4FF5YaV68fkc=",
|
||||||
"owner": "anotherhadi",
|
"owner": "anotherhadi",
|
||||||
"repo": "default-creds",
|
"repo": "default-creds",
|
||||||
"rev": "1c9d554b74e5acdd43cd83243fcd20671d707708",
|
"rev": "1b7c96da8f3a3923c1cfa36b01cd87b598bed5a5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|||||||
@@ -11,6 +11,7 @@
|
|||||||
./launcher.nix
|
./launcher.nix
|
||||||
./appearance.nix
|
./appearance.nix
|
||||||
./scheme.nix
|
./scheme.nix
|
||||||
|
./swappy.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.caelestia = {
|
programs.caelestia = {
|
||||||
|
|||||||
11
home/system/caelestia-shell/swappy.nix
Normal file
11
home/system/caelestia-shell/swappy.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
xdg.configFile."swappy/config".text = ''
|
||||||
|
[Default]
|
||||||
|
save_dir=~/Pictures/Screenshots
|
||||||
|
save_filename_format=screenshot-%Y%m%d-%H%M%S.png
|
||||||
|
show_panel=false
|
||||||
|
line_size=5
|
||||||
|
text_size=20
|
||||||
|
text_font=sans-serif
|
||||||
|
'';
|
||||||
|
}
|
||||||
@@ -26,6 +26,7 @@
|
|||||||
../../server-modules/fail2ban.nix
|
../../server-modules/fail2ban.nix
|
||||||
../../server-modules/default-creds.nix
|
../../server-modules/default-creds.nix
|
||||||
../../server-modules/umami.nix
|
../../server-modules/umami.nix
|
||||||
|
../../server-modules/gitea.nix
|
||||||
|
|
||||||
# You should let those lines as is
|
# You should let those lines as is
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|||||||
@@ -4,23 +4,41 @@
|
|||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts."blog.local" = {
|
nginx.virtualHosts = {
|
||||||
root = "${inputs.blog.packages.${pkgs.system}.default}/share/blog";
|
"blog.local" = {
|
||||||
listen = [
|
root = "${inputs.blog.packages.${pkgs.system}.default}/share/blog";
|
||||||
{
|
listen = [
|
||||||
addr = "127.0.0.1";
|
{
|
||||||
port = 8758;
|
addr = "127.0.0.1";
|
||||||
}
|
port = 8758;
|
||||||
];
|
}
|
||||||
locations."/" = {
|
];
|
||||||
tryFiles = "$uri $uri/ /index.html";
|
locations."/" = {
|
||||||
|
tryFiles = "$uri $uri/ /index.html";
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
port_in_redirect off;
|
||||||
|
absolute_redirect off;
|
||||||
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' data: https://umami.hadi.icu; style-src 'self' 'unsafe-inline'; img-src 'self' data: https://git.hadi.icu; connect-src 'self' https://umami.hadi.icu;" always;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
"www.blog.local" = {
|
||||||
|
listen = [
|
||||||
|
{
|
||||||
|
addr = "127.0.0.1";
|
||||||
|
port = 8189;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
extraConfig = ''
|
||||||
|
return 301 https://hadi.icu$request_uri;
|
||||||
|
'';
|
||||||
};
|
};
|
||||||
extraConfig = ''
|
|
||||||
port_in_redirect off;
|
|
||||||
absolute_redirect off;
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
cloudflared.tunnels."a1dfa315-7fc3-4a65-8c02-8387932c35c3".ingress."hadi.icu" = "http://127.0.0.1:8758";
|
|
||||||
cloudflared.tunnels."a1dfa315-7fc3-4a65-8c02-8387932c35c3".ingress."www.hadi.icu" = "http://127.0.0.1:8758";
|
cloudflared.tunnels."a1dfa315-7fc3-4a65-8c02-8387932c35c3".ingress = {
|
||||||
|
"hadi.icu" = "http://127.0.0.1:8758";
|
||||||
|
"www.hadi.icu" = "http://127.0.0.1:8189";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
68
server-modules/gitea.nix
Normal file
68
server-modules/gitea.nix
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
catppuccin-gitea = pkgs.fetchzip {
|
||||||
|
url = "https://github.com/catppuccin/gitea/releases/download/v1.0.2/catppuccin-gitea.tar.gz";
|
||||||
|
sha256 = "sha256-rZHLORwLUfIFcB6K9yhrzr+UwdPNQVSadsw6rg8Q7gs=";
|
||||||
|
stripRoot = false;
|
||||||
|
};
|
||||||
|
in {
|
||||||
|
services = {
|
||||||
|
postgresql = {
|
||||||
|
enable = true;
|
||||||
|
ensureDatabases = [config.services.gitea.user]; # "gitea" par défaut
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = config.services.gitea.database.user;
|
||||||
|
ensureDBOwnership = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
gitea = {
|
||||||
|
enable = true;
|
||||||
|
database = {
|
||||||
|
type = "postgres";
|
||||||
|
};
|
||||||
|
settings = {
|
||||||
|
server = {
|
||||||
|
HTTP_ADDR = "127.0.0.1";
|
||||||
|
HTTP_PORT = 3002;
|
||||||
|
ROOT_URL = "https://git.hadi.icu/";
|
||||||
|
DOMAIN = "git.hadi.icu";
|
||||||
|
LANDING_PAGE = "/anotherhadi";
|
||||||
|
};
|
||||||
|
service = {
|
||||||
|
REGISTER_MANUAL_CONFIRM = true;
|
||||||
|
DISABLE_REGISTRATION = true;
|
||||||
|
DEFAULT_KEEP_EMAIL_PRIVATE = true;
|
||||||
|
SHOW_REGISTRATION_BUTTON = false;
|
||||||
|
};
|
||||||
|
ui = {
|
||||||
|
DEFAULT_THEME = "catppuccin-mocha-mauve";
|
||||||
|
THEMES = "catppuccin-latte-mauve,catppuccin-frappe-mauve,catppuccin-macchiato-mauve,catppuccin-mocha-mauve";
|
||||||
|
};
|
||||||
|
explore = {
|
||||||
|
DISABLE_USERS_PAGE = true;
|
||||||
|
DISABLE_ORGANIZATIONS_PAGE = true;
|
||||||
|
};
|
||||||
|
repository = {
|
||||||
|
DISABLE_STARS = true;
|
||||||
|
};
|
||||||
|
mailer = {ENABLED = false;};
|
||||||
|
api = {ENABLE_SWAGGER = false;};
|
||||||
|
other = {SHOW_FOOTER_VERSION = false;};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
cloudflared.tunnels."a1dfa315-7fc3-4a65-8c02-8387932c35c3".ingress."git.hadi.icu" = "http://localhost:3002";
|
||||||
|
};
|
||||||
|
|
||||||
|
systemd.services.gitea.preStart = lib.mkAfter ''
|
||||||
|
mkdir -p ${config.services.gitea.stateDir}/custom/public/assets
|
||||||
|
ln -sfn ${catppuccin-gitea} ${config.services.gitea.stateDir}/custom/public/assets/css
|
||||||
|
'';
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user