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

View file

@ -20,8 +20,8 @@ in
programs.fish = { programs.fish = {
enable = true; enable = true;
shellAliases = { 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-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 --use-remote-sudo"; nix-blarm = "nixos-rebuild switch --flake ${flakeRoot}/.#blarm --target-host blarm --sudo --ask-sudo-password";
cd = "z"; cd = "z";
ls = "exa --icons"; ls = "exa --icons";
l = "exa"; l = "exa";

View file

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

View file

@ -5,7 +5,6 @@
namespace, namespace,
... ...
}: }:
let let
cfg = config.${namespace}.services.linkwarden; cfg = config.${namespace}.services.linkwarden;
isPostgresUnixSocket = lib.hasPrefix "/" cfg.database.host; 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."; 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 { environment = mkOption {
type = types.attrsOf types.str; type = types.attrsOf types.str;
default = { }; default = { };
@ -80,7 +77,7 @@ in
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = "127.0.0.1"; default = "0.0.0.0";
description = "The host that Linkwarden will listen on."; description = "The host that Linkwarden will listen on.";
}; };
@ -161,6 +158,7 @@ in
}; };
networking.firewall.allowedTCPPorts = [ networking.firewall.allowedTCPPorts = [
cfg.port
80 80
443 443
]; ];
@ -172,7 +170,9 @@ in
LINKWARDEN_PORT = toString cfg.port; LINKWARDEN_PORT = toString cfg.port;
LINKWARDEN_CACHE_DIR = cfg.cacheLocation; LINKWARDEN_CACHE_DIR = cfg.cacheLocation;
STORAGE_FOLDER = cfg.storageLocation; 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_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_PORT = toString cfg.database.port;
DATABASE_HOST = mkIf (!isPostgresUnixSocket) cfg.database.host; DATABASE_HOST = mkIf (!isPostgresUnixSocket) cfg.database.host;

View file

@ -1,26 +1,24 @@
{ {
config,
lib, lib,
pkgs, pkgs,
config,
namespace, namespace,
... ...
}: }:
with lib;
with lib.${namespace};
let let
cfg = config.${namespace}.services.technitium-dns-server; cfg = config.${namespace}.services.technitium-dns-server;
inherit (lib)
mkEnableOption
mkPackageOption
mkOption
mkIf
types
;
in in
{ {
options.${namespace}.services.technitium-dns-server = { options.${namespace}.services.technitium-dns-server = {
enable = mkEnableOption "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 { openFirewall = mkOption {
type = types.bool; 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}";
};
});
};
}