Compare commits

...

4 commits

Author SHA1 Message Date
Patrick c3900591be
fix: update firefly to fix 2024-06-17 21:32:25 +02:00
Patrick 6d668c80c0
feat: enable forgejo indexer 2024-06-17 21:06:07 +02:00
Patrick b79d8a38b6
fix: move gpg keygrip to root 2024-06-17 21:05:18 +02:00
Patrick 039e5d778f
feat: remove user simon 2024-06-17 21:04:41 +02:00
12 changed files with 68 additions and 123 deletions

View file

@ -10,7 +10,6 @@
🖥️ | desktopnix | Intel i5-8600K <br> NVIDIA GeForce GTX 1080 <br> 32 GiB RAM | Patrick's desktop, used for most development and gaming
🖥️ | elisabeth | AMD Ryzen 7 5800X <br> 32 GiB RAM | Server running most cloud services
🖥️ | maddy | Hetzner VPS | Static IP server running mail
💻 | gojo | ? |Simons Laptop
## User Configuration
This showcases my end user setup, which I dailydrive on all my hosts.

View file

@ -89,6 +89,9 @@ in {
SQLITE_JOURNAL_MODE = "WAL";
LOG_SQL = false; # Leaks secrets
};
indexer = {
REPO_INDEXER_ENABLED = true;
};
# federation.ENABLED = true;
mailer = {
ENABLED = true;

View file

@ -9,6 +9,7 @@
deploy = super.callPackage ./deploy.nix {};
minify = super.callPackage ./minify {};
j-link = super.callPackage ./jlink.nix {};
firefly-iii = super.callPackage ./firefly-iii.nix {};
mongodb-bin = super.callPackage ./mongodb-bin.nix {};
awakened-poe-trade = super.callPackage ./awakened-poe-trade.nix {};
neovim-clean = super.neovim-unwrapped.overrideAttrs (_neovimFinal: neovimPrev: {

59
pkgs/firefly-iii.nix Normal file
View file

@ -0,0 +1,59 @@
{
lib,
fetchFromGitHub,
buildNpmPackage,
php83,
nixosTests,
dataDir ? "/var/lib/firefly-iii",
}: let
pname = "firefly-iii";
version = "6.1.18";
phpPackage = php83;
src = fetchFromGitHub {
owner = "firefly-iii";
repo = "firefly-iii";
rev = "v${version}";
hash = "sha256-mA7gvKhHouUUz1Aix7253O/+VcufoEFwdcJeZxnazEo=";
};
assets = buildNpmPackage {
pname = "${pname}-assets";
inherit version src;
npmDepsHash = "sha256-MoxkNxfVeIFkiNVzfehQ9FpC65kBj8ZmvwaRf4MVRIg=";
dontNpmBuild = true;
installPhase = ''
runHook preInstall
npm run prod --workspace=v1
npm run build --workspace=v2
cp -r ./public $out/
runHook postInstall
'';
};
in
phpPackage.buildComposerProject (_: {
inherit pname src version;
vendorHash = "sha256-EpMypgj6lZDz6T94bGoCUH9IVwh7VB4Ds08AcCsreRw=";
passthru = {
inherit phpPackage;
tests = nixosTests.firefly-iii;
};
postInstall = ''
mv $out/share/php/${pname}/* $out/
rm -R $out/share $out/storage $out/bootstrap/cache $out/public
cp -a ${assets} $out/public
ln -s ${dataDir}/storage $out/storage
ln -s ${dataDir}/cache $out/bootstrap/cache
'';
meta = {
changelog = "https://github.com/firefly-iii/firefly-iii/releases/tag/v${version}";
description = "Firefly III: a personal finances manager";
homepage = "https://github.com/firefly-iii/firefly-iii";
license = lib.licenses.agpl3Only;
maintainers = [lib.maintainers.savyajha];
};
})

View file

@ -46,11 +46,6 @@ lib.optionalAttrs (!minimal) {
rekeyFile = ../../secrets/smb.cred.age;
};
};
age.secrets."my-gpg-yubikey-keygrip.tar" = {
rekeyFile = ./secrets/gpg-keygrip.tar.age;
group = "patrick";
mode = "640";
};
programs.dconf.enable = true;

View file

@ -19,4 +19,9 @@
home-manager.users.root.imports = lib.lists.optionals (!minimal) [
../common
];
age.secrets."my-gpg-yubikey-keygrip.tar" = {
rekeyFile = ./secrets/gpg-keygrip.tar.age;
group = "patrick";
mode = "640";
};
}

View file

@ -1,47 +0,0 @@
{
pkgs,
lib,
minimal,
config,
...
}:
lib.optionalAttrs (!minimal) {
users.users.simon = {
shell = pkgs.zsh;
isNormalUser = true;
uid = 1000;
createHome = true;
extraGroups = [
"wheel"
"audio"
"video"
"input"
];
group = "simon";
hashedPassword = config.secrets.secrets.global.users.simon.passwordHash;
autoSubUidGidRange = false;
};
users.groups.simon.gid = config.users.users.simon.uid;
programs.dconf.enable = true;
home-manager.users.simon = {
imports = [
../common
../common/impermanence.nix
../common/programs/htop.nix
../common/programs/direnv.nix
../common/programs/firefox.nix
../common/programs/nvim
../common/programs/gdb.nix
../common/programs/git.nix
../common/programs/kitty.nix
../common/graphical/wayland
../common/graphical/Xorg
./simon.nix
./impermanence.nix
./ssh.nix
];
};
}

View file

@ -1,9 +0,0 @@
{
home = {
persistence."/state" = {
directories = [
"Downloads"
];
};
};
}

View file

@ -1,5 +0,0 @@
{pkgs, ...}: {
home.packages = with pkgs; [
discord
];
}

View file

@ -1,56 +0,0 @@
{
# yubikey public key parts
home.file.".ssh/1.pub".text = ''
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFmees72GMKG/rsQQRhs2I/lQnJa0uW5KmZlNBeriCh0 cardno:15 489 006
'';
programs.ssh = {
enable = true;
controlMaster = "auto";
controlPersist = "5s";
matchBlocks = let
identityFile = ["~/.ssh/1.pub"];
in {
"elisabeth" = {
hostname = "lel.lol";
user = "root";
};
"gojo" = {
hostname = "gojo.local";
user = "root";
};
"patricknix" = {
hostname = "patricknix.local";
user = "root";
};
"testienix" = {
hostname = "testienix.local";
user = "root";
};
"desktopnix" = {
hostname = "desktopnix.local";
user = "root";
};
"valhalla" = {
hostname = "valhalla.fs.tum.de";
user = "hanssen";
};
"elisabethprivate" = {
hostname = "lel.lol";
user = "simon";
};
"binex" = {
hostname = "praksrv.sec.in.tum.de";
user = "team402";
};
"*" = {
identitiesOnly = true;
inherit identityFile;
};
};
};
}