My Nix Configuration

tree: Format

+24 -16
flake.nix
···
, extraModules ? [ ]
, extraHMModules ? [ ]
,
-
}: lib.nixosSystem {
inherit system;
-
modules = [
-
./hosts/${hostname}/configuration.nix
-
./hosts/${hostname}/bootloader.nix
-
inputs.home-manager.nixosModules.home-manager
-
{
-
home-manager.useGlobalPkgs = true;
-
home-manager.useUserPackages = true;
-
home-manager.extraSpecialArgs = { inherit pkgs system inputs; };
-
home-manager.sharedModules = [ ] ++ extraHMModules;
-
}
-
(mkUser { inherit profile; username = "pyrox"; })
-
(mkUser { inherit profile; username = "thehedgehog"; })
-
inputs.agenix.nixosModules.default
-
] ++ extraModules;
specialArgs = { inherit self inputs pkgs; };
};
in
···
hyprland.homeManagerModules.default
];
};
-
};
}
···
, extraModules ? [ ]
, extraHMModules ? [ ]
,
+
}:
+
lib.nixosSystem {
inherit system;
+
modules =
+
[
+
./hosts/${hostname}/configuration.nix
+
./hosts/${hostname}/bootloader.nix
+
inputs.home-manager.nixosModules.home-manager
+
{
+
home-manager.useGlobalPkgs = true;
+
home-manager.useUserPackages = true;
+
home-manager.extraSpecialArgs = { inherit pkgs system inputs; };
+
home-manager.sharedModules = [ ] ++ extraHMModules;
+
}
+
(mkUser {
+
inherit profile;
+
username = "pyrox";
+
})
+
(mkUser {
+
inherit profile;
+
username = "thehedgehog";
+
})
+
inputs.agenix.nixosModules.default
+
]
+
++ extraModules;
specialArgs = { inherit self inputs pkgs; };
};
in
···
hyprland.homeManagerModules.default
];
};
};
}
+5 -1
home/gtk.nix
···
-
{pkgs, config, ...}: {
gtk = {
enable = true;
cursorTheme = {
···
+
{
+
pkgs,
+
config,
+
...
+
}: {
gtk = {
enable = true;
cursorTheme = {
+1 -1
home/profiles/base.nix
···
-
{ inputs, ... }: {
imports = [
../programs/gpg.nix
];
···
+
{inputs, ...}: {
imports = [
../programs/gpg.nix
];
+5 -1
home/profiles/desktop.nix
···
-
{ pkgs, inputs, ... }: {
imports = [
./base.nix
./cli.nix
···
+
{
+
pkgs,
+
inputs,
+
...
+
}: {
imports = [
./base.nix
./cli.nix
+5 -1
home/profiles/development.nix
···
-
{inputs, pkgs, ...}: let
ctp-pkgs = inputs.ctp-toolbox.packages.${pkgs.system};
in {
home.packages = with pkgs; [
···
+
{
+
inputs,
+
pkgs,
+
...
+
}: let
ctp-pkgs = inputs.ctp-toolbox.packages.${pkgs.system};
in {
home.packages = with pkgs; [
+4 -4
home/profiles/gui.nix
···
lib,
# games ? true,
# social ? true,
-
...}: {
imports = [
../wayland/sway.nix
···
ueberzug
viewnior
wezterm
-
# ] ++ lib.optionals games [
factorio-experimental
mindustry
minetest
···
prismlauncher
protontricks
proton-caller
-
# ] ++ lib.optionals social [
discord
premid
zulip
];
-
}
···
lib,
# games ? true,
# social ? true,
+
...
+
}: {
imports = [
../wayland/sway.nix
···
ueberzug
viewnior
wezterm
+
# ] ++ lib.optionals games [
factorio-experimental
mindustry
minetest
···
prismlauncher
protontricks
proton-caller
+
# ] ++ lib.optionals social [
discord
premid
zulip
];
}
+5 -1
home/profiles/server.nix
···
-
{ pkgs, inputs, ... }: {
imports = [
./base.nix
./cli.nix
···
+
{
+
pkgs,
+
inputs,
+
...
+
}: {
imports = [
./base.nix
./cli.nix
+1 -4
home/programs/emacs/default.nix
···
-
{
-
pkgs,
-
...
-
}: {
programs.emacs = {
enable = true;
package = (pkgs.emacsPackagesFor pkgs.emacsPgtk).emacsWithPackages (epkgs: [epkgs.vterm pkgs.mu]);
···
+
{pkgs, ...}: {
programs.emacs = {
enable = true;
package = (pkgs.emacsPackagesFor pkgs.emacsPgtk).emacsWithPackages (epkgs: [epkgs.vterm pkgs.mu]);
+5 -1
home/programs/email.nix
···
-
{ pkgs, lib, ... }: {
programs.msmtp.enable = true;
programs.mbsync.enable = true;
programs.mu.enable = true;
···
+
{
+
pkgs,
+
lib,
+
...
+
}: {
programs.msmtp.enable = true;
programs.mbsync.enable = true;
programs.mu.enable = true;
+13 -9
home/programs/espanso/default.nix
···
-
{pkgs, inputs, ...}: {
-
# xdg.configFile."espanso" = {
-
# source = ./config;
-
# recursive = true;
-
# };
-
# services.espanso = {
-
# enable = true;
-
# package = inputs.espanso-nixpkgs.legacyPackages.x86_64-linux.espanso;
-
# };
}
···
+
{
+
pkgs,
+
inputs,
+
...
+
}: {
+
# xdg.configFile."espanso" = {
+
# source = ./config;
+
# recursive = true;
+
# };
+
# services.espanso = {
+
# enable = true;
+
# package = inputs.espanso-nixpkgs.legacyPackages.x86_64-linux.espanso;
+
# };
}
+28 -28
home/programs/helix.nix
···
{
-
programs.helix = {
-
enable = true;
-
settings = {
-
theme = "catppuccin_mocha";
-
editor = {
-
line-number = "absolute";
-
mouse = false;
-
auto-save = true;
-
true-color = true;
-
bufferline = "multiple";
-
color-modes = true;
-
cursor-shape = {
-
normal = "block";
-
insert = "bar";
-
select = "underline";
-
};
-
lsp = {
-
display-messages = true;
-
auto-signature-help = true;
-
display-signature-help-docs = true;
-
};
-
whitespace.render = {
-
space = "none";
-
tab = "all";
-
newline = "all";
-
};
-
indent-guides.render = true;
-
};
};
};
}
···
{
+
programs.helix = {
+
enable = true;
+
settings = {
+
theme = "catppuccin_mocha";
+
editor = {
+
line-number = "absolute";
+
mouse = false;
+
auto-save = true;
+
true-color = true;
+
bufferline = "multiple";
+
color-modes = true;
+
cursor-shape = {
+
normal = "block";
+
insert = "bar";
+
select = "underline";
};
+
lsp = {
+
display-messages = true;
+
auto-signature-help = true;
+
display-signature-help-docs = true;
+
};
+
whitespace.render = {
+
space = "none";
+
tab = "all";
+
newline = "all";
+
};
+
indent-guides.render = true;
+
};
};
+
};
}
+1 -4
home/programs/kitty.nix
···
-
{
-
pkgs,
-
...
-
}: {
programs.kitty = {
enable = true;
font.name = "IBM Plex Mono Regular";
···
+
{pkgs, ...}: {
programs.kitty = {
enable = true;
font.name = "IBM Plex Mono Regular";
+4 -1
home/programs/obs.nix
···
-
{ config, pkgs, ... }:
{
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
···
{
+
config,
+
pkgs,
+
...
+
}: {
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
+3 -3
home/wayland/sway.nix
···
commands = [
{
command = "inhibit_idle fullscreen";
-
criteria = { class = "Chromium|zoom|Firefox"; };
}
{
command = "floating enable, sticky enable, resize set 30 ppt 50 ppt, border pixel 4";
-
criteria = { app_id = "^launcher$"; };
}
{
command = "resize set 20 ppt";
-
criteria = { title = "Mumble PTT"; };
}
];
};
···
commands = [
{
command = "inhibit_idle fullscreen";
+
criteria = {class = "Chromium|zoom|Firefox";};
}
{
command = "floating enable, sticky enable, resize set 30 ppt 50 ppt, border pixel 4";
+
criteria = {app_id = "^launcher$";};
}
{
command = "resize set 20 ppt";
+
criteria = {title = "Mumble PTT";};
}
];
};
+6 -2
home/wayland/waybar.nix
···
-
{ pkgs, lib, ... }: {
programs.waybar = {
enable = true;
systemd.enable = true;
···
Playing = " ";
Paused = " ";
};
-
max-length =70;
exec = "${lib.getExe pkgs.playerctl} -a metadata --format '{\"text\": \"{{playerName}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
on-click = "${lib.getExe pkgs.playerctl} play-pause";
};
···
+
{
+
pkgs,
+
lib,
+
...
+
}: {
programs.waybar = {
enable = true;
systemd.enable = true;
···
Playing = " ";
Paused = " ";
};
+
max-length = 70;
exec = "${lib.getExe pkgs.playerctl} -a metadata --format '{\"text\": \"{{playerName}}: {{artist}} - {{markup_escape(title)}}\", \"tooltip\": \"{{playerName}} : {{markup_escape(title)}}\", \"alt\": \"{{status}}\", \"class\": \"{{status}}\"}' -F";
on-click = "${lib.getExe pkgs.playerctl} play-pause";
};
+1 -1
hosts/common/ssh.nix
···
{
-
age.identityPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
services.openssh = {
enable = false;
allowSFTP = false;
···
{
+
age.identityPaths = ["/etc/ssh/ssh_host_ed25519_key"];
services.openssh = {
enable = false;
allowSFTP = false;
+2 -2
hosts/marvin/bootloader.nix
···
};
kernel.sysctl = {
-
"net.ipv4.ip_forward" = 1;
-
"net.ipv6.conf.all.forwarding" = 1;
};
# ZFS Config
···
};
kernel.sysctl = {
+
"net.ipv4.ip_forward" = 1;
+
"net.ipv6.conf.all.forwarding" = 1;
};
# ZFS Config
+46 -47
hosts/marvin/services/calckey.nix
···
-
{ config, ... }: {
-
virtualisation.oci-containers.containers = {
-
calckey-server = {
-
image = "docker.io/thatonecalculator/calckey";
-
dependsOn = [
-
"calckey-db"
-
"calckey-redis"
-
];
-
ports = [
-
"6919:3000"
-
];
-
volumes = [
-
"/var/lib/calckey/config:/calckey/.config:ro"
-
"/var/lib/calckey/files:/calckey/files"
-
];
-
extraOptions = [
-
"--network=calckey"
-
];
-
environment = {
-
NODE_ENV = "production";
-
};
-
};
-
calckey-redis = {
-
image = "docker.io/redis:7.0-alpine";
-
environmentFiles = [
-
"/var/lib/calckey/config/docker.env"
-
];
-
volumes = [
-
"/var/lib/calckey/redis:/data"
-
];
-
extraOptions = [
-
"--network=calckey"
-
];
-
};
-
calckey-db = {
-
image = "docker.io/postgres:12.2-alpine";
-
environmentFiles = [
-
"/var/lib/calckey/config/docker.env"
-
];
-
extraOptions = [
-
"--network=calckey"
-
];
-
volumes = [
-
"/var/lib/calckey/db:/var/lib/postgresql/data"
-
];
-
};
};
}
-
···
+
{config, ...}: {
+
virtualisation.oci-containers.containers = {
+
calckey-server = {
+
image = "docker.io/thatonecalculator/calckey";
+
dependsOn = [
+
"calckey-db"
+
"calckey-redis"
+
];
+
ports = [
+
"6919:3000"
+
];
+
volumes = [
+
"/var/lib/calckey/config:/calckey/.config:ro"
+
"/var/lib/calckey/files:/calckey/files"
+
];
+
extraOptions = [
+
"--network=calckey"
+
];
+
environment = {
+
NODE_ENV = "production";
+
};
+
};
+
calckey-redis = {
+
image = "docker.io/redis:7.0-alpine";
+
environmentFiles = [
+
"/var/lib/calckey/config/docker.env"
+
];
+
volumes = [
+
"/var/lib/calckey/redis:/data"
+
];
+
extraOptions = [
+
"--network=calckey"
+
];
+
};
+
calckey-db = {
+
image = "docker.io/postgres:12.2-alpine";
+
environmentFiles = [
+
"/var/lib/calckey/config/docker.env"
+
];
+
extraOptions = [
+
"--network=calckey"
+
];
+
volumes = [
+
"/var/lib/calckey/db:/var/lib/postgresql/data"
+
];
};
+
};
}
+6 -1
hosts/marvin/services/calibre-web.nix
···
-
{ config, lib, pkgs, ... }: {
services.calibre-web = {
enable = true;
openFirewall = false;
···
+
{
+
config,
+
lib,
+
pkgs,
+
...
+
}: {
services.calibre-web = {
enable = true;
openFirewall = false;
+21 -16
hosts/marvin/services/factorio.nix
···
-
{ config, lib, pkgs, ... }: {
-
services.factorio = {
-
enable = true;
-
public = false;
-
requireUserVerification = true;
-
openFirewall = true;
-
saveName = "planetfloof";
-
nonBlockingSaving = true;
-
lan = true;
-
game-password = "EatTheRAM";
-
game-name = "Pyrox Industries";
-
description = "Fluffy and Furry Factorio game, run by Pyrox!";
-
admins = [
-
"Pyr0x"
-
];
-
};
}
···
+
{
+
config,
+
lib,
+
pkgs,
+
...
+
}: {
+
services.factorio = {
+
enable = true;
+
public = false;
+
requireUserVerification = true;
+
openFirewall = true;
+
saveName = "planetfloof";
+
nonBlockingSaving = true;
+
lan = true;
+
game-password = "EatTheRAM";
+
game-name = "Pyrox Industries";
+
description = "Fluffy and Furry Factorio game, run by Pyrox!";
+
admins = [
+
"Pyr0x"
+
];
+
};
}
+22 -17
hosts/marvin/services/fossil.nix
···
-
{ config, pkgs, lib, ... }: {
-
systemd.services.fossil = {
-
wantedBy = [ "multi-user.target" ];
-
after = [ "network.target" ];
-
description = "Fossil SCM WebUI";
-
serviceConfig = {
-
User = "fossil";
-
ExecStart = "${pkgs.fossil}/bin/fossil server --port 6918 --acme --baseurl https://src.pyrox.dev --https --jsmode bundled --repolist /var/lib/fossil/";
-
Restart = "always";
-
RestartSec = 3;
-
};
};
-
users.users.fossil = {
-
isSystemUser = true;
-
description = "Fossil User";
-
group = "fossil";
-
};
-
users.groups.fossil = { };
}
···
+
{
+
config,
+
pkgs,
+
lib,
+
...
+
}: {
+
systemd.services.fossil = {
+
wantedBy = ["multi-user.target"];
+
after = ["network.target"];
+
description = "Fossil SCM WebUI";
+
serviceConfig = {
+
User = "fossil";
+
ExecStart = "${pkgs.fossil}/bin/fossil server --port 6918 --acme --baseurl https://src.pyrox.dev --https --jsmode bundled --repolist /var/lib/fossil/";
+
Restart = "always";
+
RestartSec = 3;
};
+
};
+
users.users.fossil = {
+
isSystemUser = true;
+
description = "Fossil User";
+
group = "fossil";
+
};
+
users.groups.fossil = {};
}
+1 -1
hosts/marvin/services/gitea.nix
···
-
{ pkgs, ... }: {
services.gitea = {
enable = true;
package = pkgs.forgejo;
···
+
{pkgs, ...}: {
services.gitea = {
enable = true;
package = pkgs.forgejo;
+6 -1
hosts/marvin/services/golink.nix
···
-
{ config, lib, pkgs, ... }: {
services.golink = {
enable = true;
tailscaleAuthKeyFile = /run/agenix/golink-authkey;
···
+
{
+
config,
+
lib,
+
pkgs,
+
...
+
}: {
services.golink = {
enable = true;
tailscaleAuthKeyFile = /run/agenix/golink-authkey;
+33 -34
hosts/marvin/services/grafana.nix
···
services.grafana = {
enable = true;
settings = {
-
analytics.reporting_enable = false;
-
"auth.generic_oauth" = {
-
name = "central";
-
icon = "signin";
-
enabled = "true";
-
client_id = "89f4607cf446a777a6b25ebde8731cdcb80b04c1";
-
client_secret = "89eccaa8a31104c218df5cfe37c87f0ea0bbddcd1571bddb7f7fbf5a09045efd59c61f1caaa79483ad59aac2c19488b254acdaced47e66a6505865a14a63ac4a";
-
auth_url = "https://auth.pyrox.dev/application/o/authorize/";
-
token_url = "https://auth.pyrox.dev/application/o/token/";
-
api_url = "https://auth.pyrox.dev/application/o/userinfo/";
-
scopes = "openid profile email";
-
};
-
"auth" = {
-
signout_redirect_url = "https://auth.pyrox.dev/if/session-end/stathog/";
-
disableLoginForm = true;
-
};
-
security = {
-
admin_user = "thehedgeh0g";
-
admin_password = "$__file{${config.age.secrets.grafana-admin.path}}";
-
};
-
server = {
-
root_url = "https://stats.pyrox.dev";
-
domain = "stats.pyrox.dev";
-
http_port = 6914;
-
http_addr = "0.0.0.0";
-
};
-
smtp = {
-
enabled = true;
-
user = "grafana@thehedgehog.me";
-
from_address = "grafana@thehedgehog.me";
-
host = "smtp.migadu.com:465";
-
password = "$__file{${config.age.secrets.grafana-smtp-password.path}}";
-
};
};
-
};
}
···
services.grafana = {
enable = true;
settings = {
+
analytics.reporting_enable = false;
+
"auth.generic_oauth" = {
+
name = "central";
+
icon = "signin";
+
enabled = "true";
+
client_id = "89f4607cf446a777a6b25ebde8731cdcb80b04c1";
+
client_secret = "89eccaa8a31104c218df5cfe37c87f0ea0bbddcd1571bddb7f7fbf5a09045efd59c61f1caaa79483ad59aac2c19488b254acdaced47e66a6505865a14a63ac4a";
+
auth_url = "https://auth.pyrox.dev/application/o/authorize/";
+
token_url = "https://auth.pyrox.dev/application/o/token/";
+
api_url = "https://auth.pyrox.dev/application/o/userinfo/";
+
scopes = "openid profile email";
+
};
+
"auth" = {
+
signout_redirect_url = "https://auth.pyrox.dev/if/session-end/stathog/";
+
disableLoginForm = true;
+
};
+
security = {
+
admin_user = "thehedgeh0g";
+
admin_password = "$__file{${config.age.secrets.grafana-admin.path}}";
+
};
+
server = {
+
root_url = "https://stats.pyrox.dev";
+
domain = "stats.pyrox.dev";
+
http_port = 6914;
+
http_addr = "0.0.0.0";
+
};
+
smtp = {
+
enabled = true;
+
user = "grafana@thehedgehog.me";
+
from_address = "grafana@thehedgehog.me";
+
host = "smtp.migadu.com:465";
+
password = "$__file{${config.age.secrets.grafana-smtp-password.path}}";
+
};
};
};
}
+15 -9
hosts/marvin/services/hedgedoc.nix
···
bindMounts.data.isReadOnly = false;
# Actual config for the container.
-
config = { config, pkgs, ... }: {
system.stateVersion = "23.05";
services.postgresql = {
enable = true;
package = pkgs.postgesql_15;
-
ensureUsers = [{
-
name = "hedgedoc";
-
ensurePermissions = {
-
"DATABASE hedgedoc" = "ALL PRIVILEGES";
-
};
-
}];
ensureDatabases = ["hedgedoc"];
};
networking.firewall = {
enable = true;
-
allowedTCPPorts = [ 5432 ];
-
allowedUDPPorts = [ 5432 ];
};
};
};
···
bindMounts.data.isReadOnly = false;
# Actual config for the container.
+
config = {
+
config,
+
pkgs,
+
...
+
}: {
system.stateVersion = "23.05";
services.postgresql = {
enable = true;
package = pkgs.postgesql_15;
+
ensureUsers = [
+
{
+
name = "hedgedoc";
+
ensurePermissions = {
+
"DATABASE hedgedoc" = "ALL PRIVILEGES";
+
};
+
}
+
];
ensureDatabases = ["hedgedoc"];
};
networking.firewall = {
enable = true;
+
allowedTCPPorts = [5432];
+
allowedUDPPorts = [5432];
};
};
};
+32 -27
hosts/marvin/services/io-bot.nix
···
-
{ config, pkgs, lib, ... }: {
-
systemd.user.services.io-bot = {
-
wantedBy = [ "multi-user.target" ];
-
after = [ "network.target" "io-bot-lavalink.service" ];
-
description = "I/O, my personal bot";
-
serviceConfig = {
-
ExecStart = "${pkgs.poetry}/bin/poetry run python -OOm main";
-
Restart = "always";
-
RestartSec = 3;
-
WorkingDirectory = "/home/thehedgehog/io-py";
-
};
-
unitConfig = {
-
ConditionUser = "thehedgehog";
-
};
};
-
systemd.user.services.io-bot-lavalink = {
-
wantedBy = [ "multi-user.target" ];
-
after = [ "network.target" ];
-
description = "Lavalink server for I/O";
-
serviceConfig = {
-
ExecStart = "${pkgs.openjdk17_headless}/bin/java -jar ../Lavalink.jar";
-
Restart = "always";
-
RestartSec = 3;
-
WorkingDirectory = "/home/thehedgehog/io-py/config";
-
};
-
unitConfig = {
-
ConditionUser = "thehedgehog";
-
};
};
}
···
+
{
+
config,
+
pkgs,
+
lib,
+
...
+
}: {
+
systemd.user.services.io-bot = {
+
wantedBy = ["multi-user.target"];
+
after = ["network.target" "io-bot-lavalink.service"];
+
description = "I/O, my personal bot";
+
serviceConfig = {
+
ExecStart = "${pkgs.poetry}/bin/poetry run python -OOm main";
+
Restart = "always";
+
RestartSec = 3;
+
WorkingDirectory = "/home/thehedgehog/io-py";
+
};
+
unitConfig = {
+
ConditionUser = "thehedgehog";
+
};
+
};
+
systemd.user.services.io-bot-lavalink = {
+
wantedBy = ["multi-user.target"];
+
after = ["network.target"];
+
description = "Lavalink server for I/O";
+
serviceConfig = {
+
ExecStart = "${pkgs.openjdk17_headless}/bin/java -jar ../Lavalink.jar";
+
Restart = "always";
+
RestartSec = 3;
+
WorkingDirectory = "/home/thehedgehog/io-py/config";
};
+
unitConfig = {
+
ConditionUser = "thehedgehog";
};
+
};
}
+11 -11
hosts/marvin/services/littlelink.nix
···
{config, ...}: {
-
virtualisation.oci-containers.containers.littlelink = {
-
image = "julianprieber/littlelink-custom";
-
volumes = [ "/var/lib/littlelink:/htdocs" ];
-
ports = [ "6916:80" "6917:443" ];
-
environment = {
-
SERVER_ADMIN = "me@thehedgehog.me";
-
HTTP_SERVER_NAME = "link.pyrox.dev";
-
HTTPS_SERVER_NAME = "link.pyrox.dev";
-
TZ = "America/New_York";
-
APP_NAME = "Pyrox's Links";
-
};
};
}
···
{config, ...}: {
+
virtualisation.oci-containers.containers.littlelink = {
+
image = "julianprieber/littlelink-custom";
+
volumes = ["/var/lib/littlelink:/htdocs"];
+
ports = ["6916:80" "6917:443"];
+
environment = {
+
SERVER_ADMIN = "me@thehedgehog.me";
+
HTTP_SERVER_NAME = "link.pyrox.dev";
+
HTTPS_SERVER_NAME = "link.pyrox.dev";
+
TZ = "America/New_York";
+
APP_NAME = "Pyrox's Links";
};
+
};
}
+8 -4
hosts/marvin/services/tandoor.nix
···
-
{config, pkgs, ...}: {
virtualisation.oci-containers.containers = {
tandoor-db = {
image = "postgres:11-alpine";
environmentFiles = [
"/run/agenix/tandoor-env"
-
(pkgs.concatText "tandoor-env" [ ./tandoor-env ])
];
volumes = [
"/var/lib/tandoor/db:/var/lib/postgresql/data"
···
image = "vabene1111/recipes";
environmentFiles = [
"/run/agenix/tandoor-env"
-
(pkgs.concatText "tandoor-env" [ ./tandoor-env ])
];
volumes = [
"/var/lib/tandoor/static:/opt/recipes/staticfiles"
···
];
environmentFiles = [
"/run/agenix/tandoor-env"
-
(pkgs.concatText "tandoor-env" [ ./tandoor-env ])
];
volumes = [
"/var/lib/tandoor/nginx:/etc/nginx/conf.d:ro"
···
+
{
+
config,
+
pkgs,
+
...
+
}: {
virtualisation.oci-containers.containers = {
tandoor-db = {
image = "postgres:11-alpine";
environmentFiles = [
"/run/agenix/tandoor-env"
+
(pkgs.concatText "tandoor-env" [./tandoor-env])
];
volumes = [
"/var/lib/tandoor/db:/var/lib/postgresql/data"
···
image = "vabene1111/recipes";
environmentFiles = [
"/run/agenix/tandoor-env"
+
(pkgs.concatText "tandoor-env" [./tandoor-env])
];
volumes = [
"/var/lib/tandoor/static:/opt/recipes/staticfiles"
···
];
environmentFiles = [
"/run/agenix/tandoor-env"
+
(pkgs.concatText "tandoor-env" [./tandoor-env])
];
volumes = [
"/var/lib/tandoor/nginx:/etc/nginx/conf.d:ro"
+1 -4
hosts/prefect/configuration.nix
···
-
{
-
pkgs,
-
...
-
}: {
imports = [
# Common Config
../default.nix
···
+
{pkgs, ...}: {
imports = [
# Common Config
../default.nix
+1 -4
hosts/prefect/services/caddy.nix
···
-
{
-
pkgs,
-
...
-
}: {
services.caddy = {
enable = true;
package = pkgs.callPackage ../../../pkgs/caddyBin.nix {};
···
+
{pkgs, ...}: {
services.caddy = {
enable = true;
package = pkgs.callPackage ../../../pkgs/caddyBin.nix {};
+1 -1
hosts/prefect/services/dn42-peerfinder.nix
···
-
{config, ...}: { services."dn42-pingfinder".uuidFile = config.age.secrets.dn42-peerfinder-uuid.path; }
···
+
{config, ...}: {services."dn42-pingfinder".uuidFile = config.age.secrets.dn42-peerfinder-uuid.path;}
+5 -6
hosts/prefect/services/mailserver/default.nix
···
-
{ lib, ...}: {
imports = [
./logins.nix
./monitoring.nix
···
# Set all no-reply addresses
rejectRecipients = [
-
"no-reply@pyrox.dev"
-
"no-reply@mrhedge.me"
-
"no-reply@thehedgehog.me"
-
"no-reply@mrhedgehog.xyz"
];
# DKIM Settings
···
dkimKeyBits = 4096;
dkimSelector = "mail";
dkimSigning = true;
-
# DMARC Settings
dmarcReporting = {
···
+
{lib, ...}: {
imports = [
./logins.nix
./monitoring.nix
···
# Set all no-reply addresses
rejectRecipients = [
+
"no-reply@pyrox.dev"
+
"no-reply@mrhedge.me"
+
"no-reply@thehedgehog.me"
+
"no-reply@mrhedgehog.xyz"
];
# DKIM Settings
···
dkimKeyBits = 4096;
dkimSelector = "mail";
dkimSigning = true;
# DMARC Settings
dmarcReporting = {
+34 -32
hosts/prefect/services/mailserver/logins.nix
···
-
{ mailserver.loginAccounts = {
-
"pyrox@pyrox.dev" = {
-
hashedPassword = "$2b$05$8k04quBe6adg8d1yznEp3uNYM54MOVJTwDGIWvzocQFoWbmcCvebC";
-
aliases = [
-
"pyrox"
-
"postmaster@pyrox.dev"
-
"abuse@pyrox.dev"
-
"aaron@pyrox.dev"
-
# TODO: Move all emails to send to pyrox.dev
-
# Emails below this line should be removed eventually
-
"hedgehog@mrhedgehog.xyz"
-
"me@thehedgehog.me"
-
"aaron@mrhedgehog.xyz"
-
"aaron@thehedgehog.me"
-
"postmaster@thehedgehog.me"
-
"abuse@thehedgehog.me"
-
"@mrhedge.me"
-
"hedgehog@mrhedgehog.xyz"
-
];
-
};
-
"social@pyrox.dev" = {
-
hashedPassword = "$2b$05$kFDeXvSKU9oXuQXlitA7v.kkbzgCDTrm4O3Nb1kifPe7yAR7.KimO";
-
};
-
"auth@pyrox.dev" = {
-
hashedPassword = "$2b$05$O049hbSwRJ5VYeAA8lLR4e6.fqVWf4PotgIUAO356j5K.OoGH5PF.";
-
};
-
"vault@pyrox.dev" = {
-
hashedPassword = "$2b$05$MHo03BG3AVpBh4NE97zQ8.gTPx2sCoa6Jsw.DRxHBOBaKZ8DbfPrS";
-
};
-
"library@pyrox.dev" = {
-
hashedPassword = "$2b$05$IHsSbEla8KL4gwExvFECFuuoP0ESk66K29R.vawTpbxEpuw1ahii.";
};
-
};}
···
+
{
+
mailserver.loginAccounts = {
+
"pyrox@pyrox.dev" = {
+
hashedPassword = "$2b$05$8k04quBe6adg8d1yznEp3uNYM54MOVJTwDGIWvzocQFoWbmcCvebC";
+
aliases = [
+
"pyrox"
+
"postmaster@pyrox.dev"
+
"abuse@pyrox.dev"
+
"aaron@pyrox.dev"
+
# TODO: Move all emails to send to pyrox.dev
+
# Emails below this line should be removed eventually
+
"hedgehog@mrhedgehog.xyz"
+
"me@thehedgehog.me"
+
"aaron@mrhedgehog.xyz"
+
"aaron@thehedgehog.me"
+
"postmaster@thehedgehog.me"
+
"abuse@thehedgehog.me"
+
"@mrhedge.me"
+
"hedgehog@mrhedgehog.xyz"
+
];
+
};
+
"social@pyrox.dev" = {
+
hashedPassword = "$2b$05$kFDeXvSKU9oXuQXlitA7v.kkbzgCDTrm4O3Nb1kifPe7yAR7.KimO";
+
};
+
"auth@pyrox.dev" = {
+
hashedPassword = "$2b$05$O049hbSwRJ5VYeAA8lLR4e6.fqVWf4PotgIUAO356j5K.OoGH5PF.";
+
};
+
"vault@pyrox.dev" = {
+
hashedPassword = "$2b$05$MHo03BG3AVpBh4NE97zQ8.gTPx2sCoa6Jsw.DRxHBOBaKZ8DbfPrS";
+
};
+
"library@pyrox.dev" = {
+
hashedPassword = "$2b$05$IHsSbEla8KL4gwExvFECFuuoP0ESk66K29R.vawTpbxEpuw1ahii.";
+
};
};
+
}
+7 -3
hosts/prefect/services/mailserver/monitoring.nix
···
-
{config, pkgs, ... }: let
cfg = config.mailserver;
in {
mailserver.monitoring = {
···
check process rspamd with matching "rspamd: main process"
start program = "${pkgs.systemd}/bin/systemctl start rspamd"
stop program = "${pkgs.systemd}/bin/systemctl stop rspamd"
-
'';
-
};
}
···
+
{
+
config,
+
pkgs,
+
...
+
}: let
cfg = config.mailserver;
in {
mailserver.monitoring = {
···
check process rspamd with matching "rspamd: main process"
start program = "${pkgs.systemd}/bin/systemctl start rspamd"
stop program = "${pkgs.systemd}/bin/systemctl stop rspamd"
+
'';
+
};
}
+158
hosts/prefect/services/named.conf
···
···
+
include "/etc/bind/rndc.key";
+
controls {
+
inet 127.0.0.1 allow {localhost;} keys {"rndc-key";};
+
};
+
+
acl cachenetworks { 127.0.0.0/24; };
+
acl dn42-dns { 172.20.129.2; 172.20.1.255; 172.22.76.110; 172.20.14.33; };
+
+
options {
+
directory "/run/named";
+
pid-file "/run/named/named.pid";
+
+
# Server Identity
+
version "420.69";
+
server-id "zaphod";
+
hostname "zaphod";
+
+
# Enable DNSSEC
+
dnssec-validation no;
+
+
# Only listen to local addresses
+
listen-on { 127.0.0.1; };
+
listen-on-v6 { ::1; };
+
allow-query { any; };
+
# disable the integrated handling of RFC1918 and non-assigned IPv6 space reverse dns
+
empty-zones-enable no;
+
validate-except {
+
# DN42 Zones
+
"dn42";
+
"20.172.in-addr.arpa";
+
"21.172.in-addr.arpa";
+
"22.172.in-addr.arpa";
+
"23.172.in-addr.arpa";
+
"10.in-addr.arpa";
+
"d.f.ip6.arpa";
+
# ChaosVPN Zones
+
"hack";
+
"31.172.in-addr.arpa";
+
"100.10.in-addr.arpa";
+
"101.10.in-addr.arpa";
+
"102.10.in-addr.arpa";
+
"103.10.in-addr.arpa";
+
+
# NeoNetwork Zones
+
"neo";
+
"127.10.in-addr.arpa";
+
"7.2.1.0.0.1.d.f.ip6.arpa";
+
};
+
+
# Recursion settings
+
recursion yes;
+
allow-recursion { any; };
+
allow-recursion-on { any; };
+
allow-query-cache { any; };
+
allow-query-cache-on { any; };
+
prefetch 10;
+
};
+
+
# DN42 Zones
+
zone "dn42" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
zone "20.172.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
zone "21.172.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
zone "22.172.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
zone "23.172.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
zone "10.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
zone "d.f.ip6.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.20.0.53; 172.23.0.53; };
+
};
+
+
# ChaosVPN Zones
+
zone "hack" {
+
type forward;
+
forward only;
+
forwarders { 172.31.0.5; 172.31.255.53; };
+
};
+
zone "31.172.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.31.0.5; 172.31.255.53; };
+
};
+
zone "100.10.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.31.0.5; 172.31.255.53; };
+
};
+
zone "101.10.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.31.0.5; 172.31.255.53; };
+
};
+
zone "102.10.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.31.0.5; 172.31.255.53; };
+
};
+
zone "103.10.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 172.31.0.5; 172.31.255.53; };
+
};
+
+
# NeoNetwork
+
zone "neo" {
+
type forward;
+
forward only;
+
forwarders { 10.127.255.53; };
+
};
+
zone "127.10.in-addr.arpa" {
+
type forward;
+
forward only;
+
forwarders { 10.127.255.53; };
+
};
+
zone "7.2.1.0.0.1.d.f.ip6.arpa" {
+
type forward;
+
forward only;
+
forwarders { 10.127.255.53; };
+
};
+
+
zone "crxn" {
+
type forward;
+
forward only;
+
forwarders { fd92:58b6:2b2::5353; };
+
};
+
# Fallback root zone
+
zone "." {
+
type forward;
+
forward only;
+
forwarders { 100.123.15.72; 9.9.9.9; };
+
};
+
+
+
+21 -16
hosts/prefect/services/nginx.nix
···
-
{ config, lib, pkgs, ... }: {
-
services.nginx = {
-
enable = true;
-
recommendedOptimisation = true;
-
recommendedTlsSettings = true;
-
recommendedGzipSettings = true;
-
recommendedProxySettings = true;
-
virtualHosts = lib.mkForce {};
-
streamConfig = ''
-
server {
-
listen 34197 udp;
-
proxy_pass 100.123.15.72:34197;
-
proxy_responses 0;
-
}
-
'';
-
};
}
···
+
{
+
config,
+
lib,
+
pkgs,
+
...
+
}: {
+
services.nginx = {
+
enable = true;
+
recommendedOptimisation = true;
+
recommendedTlsSettings = true;
+
recommendedGzipSettings = true;
+
recommendedProxySettings = true;
+
virtualHosts = lib.mkForce {};
+
streamConfig = ''
+
server {
+
listen 34197 udp;
+
proxy_pass 100.123.15.72:34197;
+
proxy_responses 0;
+
}
+
'';
+
};
}
+34 -27
hosts/prefect/services/nsd/pyrox.dev.nix
···
];
TXT = [
-
(with spf; strict ["a:mail.pyrox.dev."])
# PGP Key fingerprint for Keyoxide
"https://keyoxide.org/4CA972FBADC814160F103138FE1D8A7D620C611F"
];
-
DKIM = [{
-
selector = "mail";
-
k = "rsa";
-
p = "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7fZ6ICm5id3H67eeKcwqYMCnhG2hVVWWbERVZMM5lDKwZiPPksZcYEyXKTshSejfkqwzGN/BGzauqDMU/mglMjRjO5vJUMRS5rZOwRs6On+4BX5x1ko19zjtOsm/Jiu1ffBNKBptnjLJ2K2K9/0VZnXZ3Cww+ghek2rBJeoOrQofq/qSFZDO/nsijezos02kh3J+DtSzoAbn6+eZ/H1rQ7gTuoQll+8AZDX1kUmz5+blqIs/cTuL3lkpLwi7pnrO9XDc4z4DxC2PUHyZe7OBxXNocS5X3F06bYPxyRiW7h9++RtGM1Al+VWEelwpdWsJGUwNRxqcsBnqXLTpnOju1y8tQvU2FR9CBkHduR2OqygUCd10GuUJ+OL9Y3vmzEMuewKJWCZFcpSfbF9jA1IDOR34FMgZ/bTh5XkpmWMa7+LVABnZ3QfjAiyR11RoCvjakEyJdn0wq341vgFI6c0S+uIzYBvjzs+KdehEuThKTi5bOR6Phn2cavro7bIHunRiag3cbH5G24Evv3K2Ll1uj3/wLXIxDRFK2MuEUvcfVYysZAL0opfx32zD9Y/T7DNLJI2bwYbLQnIYl/MuGDWySPAP2ttIGEArPhRQhUAKiBOXyCsCmwZ0qTshGqKuQPx64Qqr9TyF7ZcjxdQxHZ5m6riXo4S8U1D11rr+wLV9AF8CAwEAAQ==";
-
}];
## Set DMARC Policy
-
DMARC = [{
-
p = "reject";
-
sp = "reject";
-
pct = 25;
-
fo = ["1"];
-
adkim = "strict";
-
aspf = "strict";
-
rua = ["mailto:postmaster@pyrox.dev"];
-
ruf = ["mailto:postmaster@pyrox.dev"];
-
rf = ["afrf"];
-
ri = 86400;
-
}];
-
MX = [{
-
exchange = "mail.pyrox.dev.";
-
preference = 10;
-
}];
-
CAA = letsEncrypt "me@thehedgehog.me";
···
openpgpkey = prefect;
# Records for Factorio server
-
factorio.SRV = [{
service = "factorio";
proto = "udp";
priority = 10;
port = 34197;
target = "pyrox.dev.";
-
}];
# Externally hosted stuff
-
mc.NS = [ "galileo.aternos.org." "columbus.aternos.org." ];
## Statuspage, hosted at PikaPods
status.CNAME = ["thankful-junglefowl.pikapod.net."];
-
blog.A = [ "5.78.24.5" ];
};
}
···
];
TXT = [
+
(with spf; strict ["a:mail.pyrox.dev."])
# PGP Key fingerprint for Keyoxide
"https://keyoxide.org/4CA972FBADC814160F103138FE1D8A7D620C611F"
];
+
DKIM = [
+
{
+
selector = "mail";
+
k = "rsa";
+
p = "MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA7fZ6ICm5id3H67eeKcwqYMCnhG2hVVWWbERVZMM5lDKwZiPPksZcYEyXKTshSejfkqwzGN/BGzauqDMU/mglMjRjO5vJUMRS5rZOwRs6On+4BX5x1ko19zjtOsm/Jiu1ffBNKBptnjLJ2K2K9/0VZnXZ3Cww+ghek2rBJeoOrQofq/qSFZDO/nsijezos02kh3J+DtSzoAbn6+eZ/H1rQ7gTuoQll+8AZDX1kUmz5+blqIs/cTuL3lkpLwi7pnrO9XDc4z4DxC2PUHyZe7OBxXNocS5X3F06bYPxyRiW7h9++RtGM1Al+VWEelwpdWsJGUwNRxqcsBnqXLTpnOju1y8tQvU2FR9CBkHduR2OqygUCd10GuUJ+OL9Y3vmzEMuewKJWCZFcpSfbF9jA1IDOR34FMgZ/bTh5XkpmWMa7+LVABnZ3QfjAiyR11RoCvjakEyJdn0wq341vgFI6c0S+uIzYBvjzs+KdehEuThKTi5bOR6Phn2cavro7bIHunRiag3cbH5G24Evv3K2Ll1uj3/wLXIxDRFK2MuEUvcfVYysZAL0opfx32zD9Y/T7DNLJI2bwYbLQnIYl/MuGDWySPAP2ttIGEArPhRQhUAKiBOXyCsCmwZ0qTshGqKuQPx64Qqr9TyF7ZcjxdQxHZ5m6riXo4S8U1D11rr+wLV9AF8CAwEAAQ==";
+
}
+
];
## Set DMARC Policy
+
DMARC = [
+
{
+
p = "reject";
+
sp = "reject";
+
pct = 25;
+
fo = ["1"];
+
adkim = "strict";
+
aspf = "strict";
+
rua = ["mailto:postmaster@pyrox.dev"];
+
ruf = ["mailto:postmaster@pyrox.dev"];
+
rf = ["afrf"];
+
ri = 86400;
+
}
+
];
+
MX = [
+
{
+
exchange = "mail.pyrox.dev.";
+
preference = 10;
+
}
+
];
CAA = letsEncrypt "me@thehedgehog.me";
···
openpgpkey = prefect;
# Records for Factorio server
+
factorio.SRV = [
+
{
service = "factorio";
proto = "udp";
priority = 10;
port = 34197;
target = "pyrox.dev.";
+
}
+
];
# Externally hosted stuff
+
mc.NS = ["galileo.aternos.org." "columbus.aternos.org."];
## Statuspage, hosted at PikaPods
status.CNAME = ["thankful-junglefowl.pikapod.net."];
+
blog.A = ["5.78.24.5"];
};
}
+1 -1
hosts/prefect/services/nsd/thehedgehog.me.nix
···
## Netdata Cloud statuspage
netdata.CNAME = ["app.netdata.cloud"];
-
mc.NS = [ "galileo.aternos.org." "columbus.aternos.org." ];
## Statuspage, hosted at PikaPods
status.CNAME = ["thankful-junglefowl.pikapod.net."];
···
## Netdata Cloud statuspage
netdata.CNAME = ["app.netdata.cloud"];
+
mc.NS = ["galileo.aternos.org." "columbus.aternos.org."];
## Statuspage, hosted at PikaPods
status.CNAME = ["thankful-junglefowl.pikapod.net."];
+1 -1
hosts/zaphod/misc.nix
···
virtualisation.virtualbox.host.enableExtensionPack = false;
virtualisation.virtualbox.guest.enable = false;
virtualisation.virtualbox.guest.x11 = false;
-
users.extraGroups.vboxusers.members = [ "thehedgehog" ];
environment.etc."NetworkManager/NetworkManager.conf" = lib.mkForce {
text = ''
···
virtualisation.virtualbox.host.enableExtensionPack = false;
virtualisation.virtualbox.guest.enable = false;
virtualisation.virtualbox.guest.x11 = false;
+
users.extraGroups.vboxusers.members = ["thehedgehog"];
environment.etc."NetworkManager/NetworkManager.conf" = lib.mkForce {
text = ''
+9 -9
hosts/zaphod/programs/proxychains.nix
···
{
-
programs.proxychains = {
enable = true;
-
proxies = {
-
ssh = {
-
enable = true;
-
type = "socks5";
-
host = "127.0.0.1";
-
port = 9999;
-
};
-
};
};
}
···
{
+
programs.proxychains = {
+
enable = true;
+
proxies = {
+
ssh = {
enable = true;
+
type = "socks5";
+
host = "127.0.0.1";
+
port = 9999;
+
};
};
+
};
}
+4 -4
hosts/zaphod/services/misc.nix
···
config,
lib,
...
-
}:
-
{
services = {
blueman.enable = true;
fstrim.enable = lib.mkDefault true;
-
tlp.enable = lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
-
|| !config.services.power-profiles-daemon.enable);
xserver.libinput.enable = lib.mkDefault true;
espanso.enable = true;
};
···
config,
lib,
...
+
}: {
services = {
blueman.enable = true;
fstrim.enable = lib.mkDefault true;
+
tlp.enable =
+
lib.mkDefault ((lib.versionOlder (lib.versions.majorMinor lib.version) "21.05")
+
|| !config.services.power-profiles-daemon.enable);
xserver.libinput.enable = lib.mkDefault true;
espanso.enable = true;
};
+8 -8
hosts/zaphod/services/redis.nix
···
{
-
services.redis = {
-
vmOverCommit = true;
-
servers.io-py = {
-
enable = true;
-
bind = "127.0.0.1";
-
appendOnly = true;
-
requirePass = "I/O.pyRedisPassword";
-
};
};
}
···
{
+
services.redis = {
+
vmOverCommit = true;
+
servers.io-py = {
+
enable = true;
+
bind = "127.0.0.1";
+
appendOnly = true;
+
requirePass = "I/O.pyRedisPassword";
};
+
};
}
+5 -3
lib/default.nix
···
-
{ inputs, overlays, pkgs }:
-
let
inherit (builtins) mapAttrs;
in {
-
# mkColmena = {
# hostname,
#
···
+
{
+
inputs,
+
overlays,
+
pkgs,
+
}: let
inherit (builtins) mapAttrs;
in {
# mkColmena = {
# hostname,
#
+8 -3
modules/dn42-pingfinder.nix
···
-
{ config, options, pkgs, lib, ... }:
{
options.services."dn42-pingfinder" = {
uuidFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
···
};
systemd.timers.dn42-pingfinder = {
-
wantedBy = [ "timers.target" ];
-
partOf = [ "dn42-pingfinder.service" ];
timerConfig = {
OnCalendar = "*:0/5";
Persistent = true;
···
{
+
config,
+
options,
+
pkgs,
+
lib,
+
...
+
}: {
options.services."dn42-pingfinder" = {
uuidFile = lib.mkOption {
type = lib.types.nullOr lib.types.path;
···
};
systemd.timers.dn42-pingfinder = {
+
wantedBy = ["timers.target"];
+
partOf = ["dn42-pingfinder.service"];
timerConfig = {
OnCalendar = "*:0/5";
Persistent = true;
-122
pkgs/nyxt-lisp.nix
···
-
{
-
lib,
-
stdenv,
-
clwrapper,
-
pkgs,
-
sbcl,
-
coreutils,
-
nix,
-
asdf,
-
}: {
-
nyxt = pkgs.lispPackages.buildLispPackage rec {
-
:winherit lib pkgs clwrapper stdenv;
-
nixLib = pkgs.lib;
-
callPackage = nixLib.callPackageWith lispPackages;
-
baseName = "nyxt";
-
version = "3-pre-release-2";
-
-
description = "Nyxt Browser";
-
-
overrides = x: {
-
postInstall = ''
-
echo "Building nyxt binary"
-
(
-
source "$out/lib/common-lisp-settings"/*-shell-config.sh
-
cd "$out/lib/common-lisp"/*/
-
makeFlags="''${makeFlags:-}"
-
make LISP=common-lisp.sh NYXT_INTERNAL_QUICKLISP=false PREFIX="$out" $makeFlags all
-
make LISP=common-lisp.sh NYXT_INTERNAL_QUICKLISP=false PREFIX="$out" $makeFlags install
-
cp nyxt "$out/bin/nyxt"
-
)
-
NIX_LISP_PRELAUNCH_HOOK='
-
nix_lisp_build_system nyxt/gtk-application \
-
"(asdf/system:component-entry-point (asdf:find-system :nyxt/gtk-application))" \
-
"" "(format *error-output* \"Alien objects:~%~s~%\" sb-alien::*shared-objects*)"
-
' "$out/bin/nyxt-lisp-launcher.sh"
-
cp "$out/lib/common-lisp/nyxt/nyxt" "$out/bin/"
-
'';
-
-
# Prevent nyxt from trying to obtain dependencies as submodules
-
makeFlags = ["NYXT_SUBMODULES=false"] ++ x.buildFlags or [];
-
-
patches =
-
x.patches
-
or []
-
++ [
-
# Work around crash when opening _any_ URL
-
# https://github.com/atlas-engineer/nyxt/issues/1781
-
# https://github.com/NixOS/nixpkgs/issues/158005
-
(pkgs.fetchpatch {
-
name = "nyxt-webkit-disable-sandbox.patch";
-
url = "https://github.com/atlas-engineer/nyxt/commit/48ac0d8727f1ca1428188a1ab2c05b7be5f6cc51.patch";
-
sha256 = "0570mcfn5wmjha6jmfdgglp0w5b7rpfnv3flzn77clgbknwbxi0m";
-
})
-
];
-
};
-
-
deps = with pkgs.lispPackages; [
-
alexandria
-
bordeaux-threads
-
calispel
-
cl-css
-
cl-json
-
cl-markup
-
cl-ppcre
-
cl-ppcre-unicode
-
cl-prevalence
-
closer-mop
-
cl-containers
-
cl-qrencode
-
clss
-
cluffer
-
moptilities
-
dexador
-
enchant
-
file-attributes
-
iolib
-
local-time
-
log4cl
-
lparallel
-
mk-string-metrics
-
osicat
-
parenscript
-
quri
-
serapeum
-
spinneret
-
str
-
plump
-
swank
-
trivia
-
trivial-clipboard
-
trivial-features
-
trivial-garbage
-
trivial-package-local-nicknames
-
trivial-types
-
unix-opts
-
cl-html-diff
-
hu_dot_dwim_dot_defclass-star
-
cl-custom-hash-table
-
fset
-
cl-cffi-gtk
-
cl-webkit2
-
cl-gobject-introspection
-
];
-
src = pkgs.fetchFromGitHub {
-
owner = "atlas-engineer";
-
repo = "nyxt";
-
rev = "${version}";
-
sha256 = "12l7ir3q29v06jx0zng5cvlbmap7p709ka3ik6x29lw334qshm9b";
-
};
-
-
packageName = "nyxt";
-
-
propagatedBuildInputs = [
-
pkgs.libressl.out
-
pkgs.webkitgtk
-
pkgs.sbcl
-
];
-
meta = {
-
description = "Nyxt Browser";
-
};
-
};
-
}
···
-56
pkgs/nyxt.nix
···
-
{ stdenv, lib, lispPackages
-
, makeWrapper, wrapGAppsHook, gst_all_1
-
, glib, gdk-pixbuf, cairo
-
, mailcap, pango, gtk3
-
, glib-networking, gsettings-desktop-schemas
-
, xclip, notify-osd, enchant, pkgs
-
}:
-
-
stdenv.mkDerivation rec {
-
pname = "nyxt";
-
inherit (pkgs.my-pkgs.nyxt-lisp.meta) version;
-
-
src = lispPackages.nyxt;
-
-
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
-
gstBuildInputs = with gst_all_1; [
-
gstreamer gst-libav
-
gst-plugins-base
-
gst-plugins-good
-
gst-plugins-bad
-
gst-plugins-ugly
-
];
-
buildInputs = [
-
glib gdk-pixbuf cairo
-
mailcap pango gtk3
-
glib-networking gsettings-desktop-schemas
-
xclip notify-osd enchant
-
] ++ gstBuildInputs;
-
-
GST_PLUGIN_SYSTEM_PATH_1_0 = lib.makeSearchPathOutput "lib" "lib/gstreamer-1.0" gstBuildInputs;
-
-
dontWrapGApps = true;
-
installPhase = ''
-
mkdir -p $out/share/applications/
-
sed "s/VERSION/$version/" $src/lib/common-lisp/nyxt/assets/nyxt.desktop > $out/share/applications/nyxt.desktop
-
for i in 16 32 128 256 512; do
-
mkdir -p "$out/share/icons/hicolor/''${i}x''${i}/apps/"
-
cp -f $src/lib/common-lisp/nyxt/assets/nyxt_''${i}x''${i}.png "$out/share/icons/hicolor/''${i}x''${i}/apps/nyxt.png"
-
done
-
mkdir -p $out/bin && makeWrapper $src/bin/nyxt $out/bin/nyxt \
-
--prefix GST_PLUGIN_SYSTEM_PATH_1_0 : "${GST_PLUGIN_SYSTEM_PATH_1_0}" \
-
--argv0 nyxt "''${gappsWrapperArgs[@]}"
-
'';
-
-
checkPhase = ''
-
$out/bin/nyxt -h
-
'';
-
-
meta = with lib; {
-
description = "Infinitely extensible web-browser (with Lisp development files using WebKitGTK platform port)";
-
homepage = "https://nyxt.atlas.engineer";
-
license = licenses.bsd3;
-
maintainers = with maintainers; [ lewo payas ];
-
platforms = platforms.all;
-
};
-
}
···