Compare commits

..

No commits in common. "496e67c033361a66cb3534e0fa8bbab7ed8bba13" and "582aff0b2b25c45c35b180181e0db73ca2b5fa90" have entirely different histories.

3 changed files with 46 additions and 21 deletions

36
flake.lock generated
View file

@ -88,11 +88,11 @@
}, },
"locked": { "locked": {
"dir": "pkgs/firefox-addons", "dir": "pkgs/firefox-addons",
"lastModified": 1764561884, "lastModified": 1764475519,
"narHash": "sha256-vQ3iFPPhxsLqV3c5kgmYP53mVD6id6gsP0tN+oTmqok=", "narHash": "sha256-12TAT2CD+L+wdIHszQnPyu8zGSBxcazoVZmP6UQjk6s=",
"owner": "rycee", "owner": "rycee",
"repo": "nur-expressions", "repo": "nur-expressions",
"rev": "aba4621459aec251d90d6452e3495b58a8a5e185", "rev": "1172c39fb0e847a7f036e480d94f629edcf2cf46",
"type": "gitlab" "type": "gitlab"
}, },
"original": { "original": {
@ -160,11 +160,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764613336, "lastModified": 1764398914,
"narHash": "sha256-L979az28t/+SXvYw9qhOno5HLlDwkZOpz6LzCLnjmRM=", "narHash": "sha256-YPrpwlVQidzQlMh0OnquaJR+58rKe9YNnuRis293Ilo=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "f3902b5d8767985680875ad86d028371100faeb3", "rev": "d0c5fdc48db6f19471b8adc954eca09194e68036",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -207,11 +207,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1764522689, "lastModified": 1764406085,
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", "narHash": "sha256-CYbMp8hwuOf4umokSNp+t1s4Hjd4vxXq4S5CD+xvgNs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", "rev": "9561691c9f450fad7c3526916e1c4f44be0d1192",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -238,11 +238,11 @@
}, },
"nixpkgs-old": { "nixpkgs-old": {
"locked": { "locked": {
"lastModified": 1764560356, "lastModified": 1764316264,
"narHash": "sha256-M5aFEFPppI4UhdOxwdmceJ9bDJC4T6C6CzCK1E2FZyo=", "narHash": "sha256-82L+EJU+40+FIdeG4gmUlOF1jeSwlf2AwMarrpdHF6o=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "6c8f0cca84510cc79e09ea99a299c9bc17d03cb6", "rev": "9a7b80b6f82a71ea04270d7ba11b48855681c4b0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -254,11 +254,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1764517877, "lastModified": 1764242076,
"narHash": "sha256-pp3uT4hHijIC8JUK5MEqeAWmParJrgBVzHLNfJDZxg4=", "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "2d293cbfa5a793b4c50d17c05ef9e385b90edf6c", "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -399,11 +399,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764555746, "lastModified": 1764468530,
"narHash": "sha256-6TzxH1Y2uFU1hAW7rr4PT5kDWfPH72hq/zDBjaVAqLs=", "narHash": "sha256-ZdR7SQQujR2RBO7/RDX3YxSzACp2GtNLkGIan00uGJM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-vscode-extensions", "repo": "nix-vscode-extensions",
"rev": "5ff4631fd35568ed2ea9c4e15ebc213a69c06dba", "rev": "be03779934f17ae394f526dd2d7acda2b7bee7d1",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -17,7 +17,7 @@
init.defaultBranch = "main"; init.defaultBranch = "main";
user = { user = {
name = "SebastianStork"; name = "SebastianStork";
email = "git@sstork.dev"; email = "sebastian.stork@pm.me";
}; };
}; };

View file

@ -79,8 +79,33 @@ in
}; };
}; };
# Create user: `forgejo-user create --admin --username NAME --email EMAIL --password PASSWORD` systemd.services.forgejo.preStart =
environment.shellAliases.forgejo-user = "sudo --user=${config.services.forgejo.user} ${lib.getExe config.services.forgejo.package} admin user --config /var/lib/forgejo/custom/conf/app.ini"; let
userCmd = "${lib.getExe config.services.forgejo.package} admin user";
in
''
username="SebastianStork"
password="$(cat ${config.sops.secrets."forgejo/admin-password".path})"
create_user() {
${userCmd} create \
--username "$username" \
--password "$password" \
--email "sebastian.stork@pm.me" \
--admin
}
reset_password() {
${userCmd} change-password \
--username "$username" \
--password "$password" \
--must-change-password=false
}
if ! create_user; then
reset_password
fi
'';
custom = { custom = {
services = { services = {