-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
347 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,6 +55,7 @@ | |
bmon | ||
curl | ||
nvd | ||
ncdu | ||
dig | ||
ethtool | ||
fd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
{ | ||
lib, | ||
inputs, | ||
config, | ||
pkgs, | ||
... | ||
}: | ||
let | ||
inherit (config.users.users.linkding) uid name; | ||
inherit (config.repo.secrets.global) domain; | ||
homeDir = "/home/linkding"; | ||
in | ||
{ | ||
system.stateVersion = "24.11"; | ||
repo.secretFiles.home-ops = ../../secrets/home-ops.nix; | ||
modules.microvm-guest = { | ||
host = "dewey"; | ||
hostFQDN = "bookmarks.${domain}"; | ||
homeManager = { | ||
enable = true; | ||
username = "linkding"; | ||
uid = config.repo.secrets.home-ops.users.linkding.uid; | ||
gid = config.repo.secrets.home-ops.groups.linkding.gid; | ||
}; | ||
quadlet.enable = true; | ||
}; | ||
|
||
systemd.tmpfiles.rules = [ | ||
"d /var/lib/linkding 0750 ${name} ${name}" | ||
]; | ||
|
||
microvm.hypervisor = "qemu"; | ||
microvm.credentialFiles = { | ||
"SOPS_AGE_KEY" = "/run/secrets/linkding_sops_age_key"; | ||
}; | ||
systemd.services.sshd = { | ||
serviceConfig = { | ||
ImportCredential = "SOPS_AGE_KEY"; | ||
}; | ||
preStart = '' | ||
# Make sure we don't write to stdout, since in case of | ||
# socket activation, it goes to the remote side (#19589). | ||
exec >&2 | ||
mkdir -p /etc/ssh | ||
cat $CREDENTIALS_DIRECTORY/SOPS_AGE_KEY > /etc/ssh/ssh_host_ed25519_key | ||
chmod 0600 /etc/ssh/ssh_host_ed25519_key | ||
''; | ||
}; | ||
##microvm.qemu.machine = "q35"; | ||
#microvm.qemu.extraArgs = [ | ||
# # only works with microvm.qemu.machine = "q35"; | ||
# #"-smbios" "type=11,value=io.systemd.credential:mycred=supersecret" | ||
|
||
# #WORKS | ||
# "-fw_cfg" | ||
# "name=opt/io.systemd.credentials/mycred,string=supersecret" | ||
#]; | ||
#microvm.cloud-hypervisor.platformOEMStrings = [ | ||
# "io.systemd.credential:APIKEY=supersecret" | ||
#]; | ||
microvm.shares = | ||
let | ||
dir = "/var/lib/linkding"; | ||
tag = builtins.replaceStrings [ "/" ] [ "_" ] dir; | ||
in | ||
[ | ||
{ | ||
inherit tag; | ||
source = "/var/lib/linkding"; | ||
mountPoint = dir; | ||
proto = "virtiofs"; | ||
} | ||
]; | ||
|
||
home-manager.users.linkding = | ||
{ pkgs, config, ... }: | ||
{ | ||
#virtualisation.quadlet.containers.linkding = { | ||
# autoStart = false; | ||
# serviceConfig = { | ||
# RestartSec = "10"; | ||
# Restart = "always"; | ||
# }; | ||
# containerConfig = { | ||
# # renovate: docker-image | ||
# image = "docker.io/sissbruecker/linkding:1.38.0"; | ||
# autoUpdate = "registry"; | ||
# userns = "keep-id"; | ||
# publishPorts = [ "8080:9090" ]; | ||
# environments = { | ||
# LD_AUTH_PROXY_USERNAME_HEADER = "HTTP_X_AUTHENTIK_USERNAME"; | ||
# LD_ENABLE_AUTH_PROXY = "True"; | ||
# LD_SUPERUSER_NAME = "casey"; | ||
# LD_DB_ENGINE = "postgres"; | ||
# LD_DB_HOST = "/run/postgresql"; | ||
# LD_DB_PORT = ""; | ||
# LD_DB_DATABASE = "linkding"; | ||
# LD_DB_USER = "linkding"; | ||
# LD_DB_PASSWORD = ""; | ||
# }; | ||
# podmanArgs = [ ]; | ||
# volumes = [ | ||
# "/var/lib/linkding:/etc/linkding/data:rw" | ||
# "/run/postgresql:/run/postgresql:ro" | ||
# ]; | ||
# }; | ||
#}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
ssh_host_ed25519_key: ENC[AES256_GCM,data:oImvdjWrBC6LaDT8YRvH3th83Fjf/PN6+6fIVdaj1PlnR9bYdP2IxHk7QNj/L4fG7BHvs/5Yh9YqAWl6285JLkNq2gSkl6I5i0kfxUooul5aJ0XDkJqvvuvOlXq7aWim9aA3wH3/GtEZAeF/ak7p/tx2+cHMZNSZ5onUnqhWfvWwHhM8k/AQAu6NDMYiYw7WE+WjBQmiW204LKEAWIHSEFCaklKbnIVjBJGn/qxmAsOR33Ux0HRvpPofdto8zGekACpChO0r6tZJStnBQFd5T2Fl2Iip/2n4Txh+Iy2ghdsK6ExRt0SnsPuJYTbKXO/T2bs2Dx2Cdmv4xAiVLK4HNFwczguaVYl+0BGNoXzLV03ihr9QHjyZH7L8pDstRdw9WbK099loUwGAbHqbG/qiww24GnO2+lYVCQ7XpYReejY/rChgdVp110RU0jFrNIUncEShtcXghkjwa/4Gg2euFz3QSaSKOHbaUDh6/En6zSu2jlGPIIA60DfMgN0yuSLiR+EXwWl+Jy+QJsvwPBM/,iv:nym+wL8JnfA0d9YoecpXJS6o5dNUQL5+QxE4d7Xu0CE=,tag:LciQESy7KmS1w3H0ff6JMA==,type:str] | ||
ssh_host_ed25519_key_pub: ENC[AES256_GCM,data:6v4wnXaGFSR2yuPGkNTGagZBQz4RX3nn5i0DFCJnehPSSlNRrex8/9wLO9iJbOwURxW1eHku8oaLbxa21u9LqWeyTq+dVtx25ussgtLuMcPl9pVYbErnVZw=,iv:eJ4xHXwXSbOjQ6DpjI7RsjPhSdHX/Icp2Kx4n0E5SBQ=,tag:09xh1RX97wiriGRgZ8A2eA==,type:str] | ||
age_key_pub: ENC[AES256_GCM,data:DzGc3LXqBpiPj/5Ig796AMKVa0abzgmGvgHdh28QqC5MWF4GcFPVqDHdb7N3SL5sfACUrYESBZNGZTV03+M=,iv:IYbl56HzusNPlc2/aXOsl4Jg+G7e+f9pnULaDnX3g9I=,tag:gThJFbqSwsFoIYFeAfKqpA==,type:str] | ||
machine_id: ENC[AES256_GCM,data:jbOYgynDeAi5eYeOR0qIqvUvPRjDA1F+sz7W9CZ9CRc=,iv:Cf/mjHcgkCiVYI2gT8yW7FQWD4r6ahd0J943qnss9+0=,tag:2+8/XWFDS/44n9negtdbdg==,type:str] | ||
sops: | ||
kms: [] | ||
gcp_kms: [] | ||
azure_kv: [] | ||
hc_vault: [] | ||
age: | ||
- recipient: age1uh5u7zcz28dskcskpyznxkyg2y4xj0wkaf4usmrjhkmfhzr6gg8qynk3hq | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB6eHBZS3ZHWG55cy9iWjRl | ||
bUhGNlU0bHAwS0hJQnVPN3hwTE9YbVI5YjA0ClVKTlFHWm1FQnhiUHd4d0RsNFZV | ||
dnBkK2J6ZVZEbGxEQnJ2OCtsbTZKZ2cKLS0tIHZraWNUMGV1d1plcDlzRGUvVmFk | ||
QjRjRHRyckNIdngyMFJJd3Vyb2laN0UKOBvIYdHn0DOqWNbokzhTuPlD00y6WoGD | ||
Pj+NlAmCvKdKSMIGRPBrsocfgDPRGqAwIE5N/sS9jW0tW/vi1Hu9Ig== | ||
-----END AGE ENCRYPTED FILE----- | ||
- recipient: age15j42dspmmwprjau6l48xp05d97s8ml5s3tjxrfwvm37tvuynssuqtsevkj | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSBxM1VJczFvZGtRVDdtQU43 | ||
VStlc25Dc0c0M0RIWk51dXQ5Q05Ud1ZVSVdVCitFem94Nko0VDVzMU9LMkh3V0xC | ||
UDM3M0wvaFZLK0I1eHBqYnRLeVNheFkKLS0tIHdXNzgyamFNaWhFN3gwMDlTYlkx | ||
N0d0ZGlSdjNQZXhrQjJ1VlZCQ0pJeHMKziyOHm028ul7GQxq7qpQixAB2i01Brl9 | ||
b/NiU7i93Waaec5xXeluAwTzOEKoiRzeVWiuAmbI0iyg07voJmFULA== | ||
-----END AGE ENCRYPTED FILE----- | ||
- recipient: age1urrpmqc2erg2tg5ene0tyr6cfne925zggtlqn40xwp5wqlqrp5tst8f808 | ||
enc: | | ||
-----BEGIN AGE ENCRYPTED FILE----- | ||
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSArWWdGOERIalVHRUpRd1JT | ||
cDcyOFRuVnZMK2t2YVhUUWFENTNBQjJzdVJ3CjJvMStSVENhdzVSNmcyQ0FSazc4 | ||
RitYUzY2T3NwY3ZHbHZvV0ZDWkZSQUEKLS0tIHFYL1RZVVFicG9XQjNmdnA0aUJ2 | ||
MW1pWFlscmV4TXQ4Mk9Hd2ZmNmtOYUUK64eFpt4KJSBVgtwMcryjo+hL1uPZK6BR | ||
DHMS4ThjAnr1gCvijeG9svvz078glzRHPcXY/AEkN+PS3dKmyGVg7A== | ||
-----END AGE ENCRYPTED FILE----- | ||
lastmodified: "2025-02-17T15:47:20Z" | ||
mac: ENC[AES256_GCM,data:RzIe0xGkwdOiUMZq0TKm8W46jyaJS77ROm2XSQs6vMdacgLsCTRrC8Tv07VKBlYxYcWw3bIrvr1b7UBjNKiM6SJ8qgHM1u4A3T8bR87ykQ8vz2KZnbsqY4e53kC3ByN51Dlm6rmtFIpXB9uTq/MCgN0ym9nuFwjZr3D9tDW1ff0=,iv:TJqZhCnGNum1b5++zigYm9cV1ER2icFIe8psMhzjB1k=,tag:BPTBm+dPxiNo05bIIcRpUg==,type:str] | ||
pgp: [] | ||
unencrypted_suffix: _unencrypted | ||
version: 3.9.4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.