1
0
Fork 0

Compare commits

...

5 commits

6 changed files with 56 additions and 35 deletions

36
flake.lock generated
View file

@ -8,11 +8,11 @@
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1750392203,
"narHash": "sha256-rJU+WeeLxDinRWEGXw5OT4tToIAO8zy/ULFVWHhLp/Q=",
"lastModified": 1751429002,
"narHash": "sha256-ihzv16jv0mx4yW64wXuJBnTKigRVsR+aY9i/5WvS+tA=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "09e3cfed476fc06384610a7e6027df221fc93bd3",
"rev": "08812a6d58b96f717f9d4a8c3e5aa9db0554eb6f",
"type": "gitlab"
},
"original": {
@ -118,11 +118,11 @@
]
},
"locked": {
"lastModified": 1750304462,
"narHash": "sha256-Mj5t4yX05/rXnRqJkpoLZTWqgStB88Mr/fegTRqyiWc=",
"lastModified": 1751429452,
"narHash": "sha256-4s5vRtaqdNhVBnbOWOzBNKrRa0ShQTLoEPjJp3joeNI=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "863842639722dd12ae9e37ca83bcb61a63b36f6c",
"rev": "df12269039dcf752600b1bcc176bacf2786ec384",
"type": "github"
},
"original": {
@ -169,11 +169,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1750083401,
"narHash": "sha256-ynqbgIYrg7P1fAKYqe8I/PMiLABBcNDYG9YaAP/d/C4=",
"lastModified": 1751432711,
"narHash": "sha256-136MeWtckSHTN9Z2WRNRdZ8oRP3vyx3L8UxeBYE+J9w=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "61837d2a33ccc1582c5fabb7bf9130d39fee59ad",
"rev": "497ae1357f1ac97f1aea31a4cb74ad0d534ef41f",
"type": "github"
},
"original": {
@ -184,11 +184,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1750365781,
"narHash": "sha256-XE/lFNhz5lsriMm/yjXkvSZz5DfvKJLUjsS6pP8EC50=",
"lastModified": 1751271578,
"narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "08f22084e6085d19bcfb4be30d1ca76ecb96fe54",
"rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df",
"type": "github"
},
"original": {
@ -255,11 +255,11 @@
"systems": "systems_2"
},
"locked": {
"lastModified": 1750279337,
"narHash": "sha256-K8+lSoyfVIwPpKjPvCQsCWL59VI3XSbgbYdPUkTTaA8=",
"lastModified": 1751186226,
"narHash": "sha256-Bt7jtmCW72JUPxOIrV73qBTAUOy4qvJXsls2ERDUcGo=",
"owner": "notashelf",
"repo": "nvf",
"rev": "787678dd731e0246d42ca70b758ae0ac35bd48e2",
"rev": "5bad5dd94ce5ea3b40b08d9e6802e69d02198d21",
"type": "github"
},
"original": {
@ -346,11 +346,11 @@
},
"stable": {
"locked": {
"lastModified": 1750330365,
"narHash": "sha256-hJ7XMNVsTnnbV2NPmStCC07gvv5l2x7+Skb7hyUzazg=",
"lastModified": 1751274312,
"narHash": "sha256-/bVBlRpECLVzjV19t5KMdMFWSwKLtb5RyXdjz3LJT+g=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "d883b6213afa179b58ba8bace834f1419707d0ad",
"rev": "50ab793786d9de88ee30ec4e4c24fb4236fc2674",
"type": "github"
},
"original": {

View file

@ -20,8 +20,8 @@ in
programs.fish = {
enable = true;
shellAliases = {
nix-dns = "nixos-rebuild switch --flake ${flakeRoot}/.#dns --target-host dns-1 --use-remote-sudo && nixos-rebuild switch --flake ${flakeRoot}/.#dns --target-host dns-2 --use-remote-sudo";
nix-blarm = "nixos-rebuild switch --flake ${flakeRoot}/.#blarm --target-host blarm --use-remote-sudo";
nix-dns = "nixos-rebuild switch --flake ${flakeRoot}/.#dns --target-host dns-1 --sudo --ask-sudo-password && nixos-rebuild switch --flake ${flakeRoot}/.#dns --target-host dns-2 --sudo --ask-sudo-password";
nix-blarm = "nixos-rebuild switch --flake ${flakeRoot}/.#blarm --target-host blarm --sudo --ask-sudo-password";
cd = "z";
ls = "exa --icons";
l = "exa";

View file

@ -16,6 +16,7 @@ in
config = mkIf cfg.enable {
environment.variables.EDITOR = "nvim";
programs.nvf = {
defaultEditor = true;
enable = true;
settings = {
vim = {

View file

@ -5,7 +5,6 @@
namespace,
...
}:
let
cfg = config.${namespace}.services.linkwarden;
isPostgresUnixSocket = lib.hasPrefix "/" cfg.database.host;
@ -44,8 +43,6 @@ in
description = "Directory used as cache. If it is not the default, the directory has to be created manually such that the linkwarden user is able to read and write to it.";
};
enableRegistration = mkEnableOption "registration for new users";
environment = mkOption {
type = types.attrsOf types.str;
default = { };
@ -80,7 +77,7 @@ in
host = mkOption {
type = types.str;
default = "127.0.0.1";
default = "0.0.0.0";
description = "The host that Linkwarden will listen on.";
};
@ -161,6 +158,7 @@ in
};
networking.firewall.allowedTCPPorts = [
cfg.port
80
443
];
@ -172,7 +170,9 @@ in
LINKWARDEN_PORT = toString cfg.port;
LINKWARDEN_CACHE_DIR = cfg.cacheLocation;
STORAGE_FOLDER = cfg.storageLocation;
NEXT_PUBLIC_DISABLE_REGISTRATION = mkIf (!cfg.enableRegistration) "true";
NEXT_PUBLIC_DISABLE_REGISTRATION = "true";
NEXTAUTH_URL = "https://link.boehm.sh";
NEXTAUTH_INTERNAL_URL = "https://link.boehm.sh";
DATABASE_URL = mkIf isPostgresUnixSocket "postgresql://${lib.strings.escapeURL cfg.database.user}@localhost/${lib.strings.escapeURL cfg.database.name}?host=${cfg.database.host}";
DATABASE_PORT = toString cfg.database.port;
DATABASE_HOST = mkIf (!isPostgresUnixSocket) cfg.database.host;

View file

@ -1,26 +1,24 @@
{
config,
lib,
pkgs,
config,
namespace,
...
}:
with lib;
with lib.${namespace};
let
cfg = config.${namespace}.services.technitium-dns-server;
inherit (lib)
mkEnableOption
mkPackageOption
mkOption
mkIf
types
;
in
{
options.${namespace}.services.technitium-dns-server = {
enable = mkEnableOption "Technitium DNS Server";
package = mkPackageOption pkgs "technitium-dns-server" { };
package = mkOption {
description = "The package of Technitium to use.";
type = types.package;
default = pkgs.awesome-flake.technitium-dns-server;
};
openFirewall = mkOption {
type = types.bool;

View file

@ -0,0 +1,22 @@
{
channels,
inputs,
...
}:
final: prev: {
awesome-flake = (prev.awesome-flake or { }) // {
technitium-dns-server = prev.technitium-dns-server.overrideAttrs (_old: rec {
pname = "technitium-dns-server";
version = "13.6.0";
src = final.fetchFromGitHub {
owner = "TechnitiumSoftware";
repo = "DnsServer";
tag = "v${version}";
hash = "sha256-2OSuLGWdaiiPxyW0Uvq736wHKa7S3CHv79cmZZ86GRE=";
name = "${pname}-${version}";
};
});
};
}