run nix fmt

This commit is contained in:
Johannes Jöns 2024-07-10 23:02:54 +02:00
parent eab8e4b1d8
commit d5cbe31c02
61 changed files with 1299 additions and 830 deletions

View file

@ -43,7 +43,6 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
# Packages # Packages
tela-icon-theme = { tela-icon-theme = {
url = "github:vinceliuice/Tela-icon-theme"; url = "github:vinceliuice/Tela-icon-theme";
@ -67,18 +66,21 @@
}; };
}; };
outputs = inputs@{ self, nixpkgs, ... }: { outputs =
inputs@{ self, nixpkgs, ... }:
{
nixosModules.default = import ./modules; nixosModules.default = import ./modules;
homeManagerModules.default = import ./home-modules; homeManagerModules.default = import ./home-modules;
nixosConfigurations = import ./systems { nixosConfigurations = import ./systems { inherit self inputs nixpkgs; };
inherit self inputs nixpkgs; packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (
}; system:
packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./packages { import ./packages {
inherit system inputs; inherit system inputs;
pkgs = nixpkgs.legacyPackages.${system}; pkgs = nixpkgs.legacyPackages.${system};
}); }
formatter = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: );
nixpkgs.legacyPackages.${system}.nixfmt-rfc-style formatter = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (
system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style
); );
}; };
} }

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.common; let
in { cfg = config.jopejoe1.common;
in
{
options.jopejoe1.common = { options.jopejoe1.common = {
enable = lib.mkEnableOption "Enable Common Homanger settings"; enable = lib.mkEnableOption "Enable Common Homanger settings";
gui = lib.mkEnableOption "Graphical programms"; gui = lib.mkEnableOption "Graphical programms";
@ -63,4 +65,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.direnv; let
in { cfg = config.jopejoe1.direnv;
in
{
options.jopejoe1.direnv = { options.jopejoe1.direnv = {
enable = lib.mkEnableOption "Enable direnv"; enable = lib.mkEnableOption "Enable direnv";
}; };
@ -13,5 +15,3 @@ in {
}; };
}; };
} }

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, inputs, ... }: {
config,
lib,
pkgs,
inputs,
...
}:
let let
cfg = config.jopejoe1.firefox; cfg = config.jopejoe1.firefox;
@ -6,7 +12,8 @@ let
Value = value; Value = value;
Status = "locked"; Status = "locked";
}; };
in { in
{
options.jopejoe1.firefox = { options.jopejoe1.firefox = {
enable = lib.mkEnableOption "Enable Firefox"; enable = lib.mkEnableOption "Enable Firefox";
}; };
@ -100,7 +107,9 @@ in {
"config.trim_on_minimize" = lock true; "config.trim_on_minimize" = lock true;
"pdfjs.annotationEditorMode" = lock 0; "pdfjs.annotationEditorMode" = lock 0;
"pdfjs.annotationMode" = lock 2; "pdfjs.annotationMode" = lock 2;
"font.name-list.emoji" = lock (lib.strings.concatStringsSep ", " config.jopejoe1.common.fonts.emoji); "font.name-list.emoji" = lock (
lib.strings.concatStringsSep ", " config.jopejoe1.common.fonts.emoji
);
# Theming # Theming
"widget.gtk.overlay-scrollbars.enabled" = lock false; "widget.gtk.overlay-scrollbars.enabled" = lock false;
@ -239,7 +248,8 @@ in {
force = true; force = true;
engines = { engines = {
"Nix Packages" = { "Nix Packages" = {
urls = [{ urls = [
{
template = "https://search.nixos.org/packages"; template = "https://search.nixos.org/packages";
params = [ params = [
{ {
@ -255,12 +265,14 @@ in {
value = "{searchTerms}"; value = "{searchTerms}";
} }
]; ];
}]; }
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ]; definedAliases = [ "@np" ];
}; };
"NixOS Modules" = { "NixOS Modules" = {
urls = [{ urls = [
{
template = "https://search.nixos.org/options"; template = "https://search.nixos.org/options";
params = [ params = [
{ {
@ -276,12 +288,14 @@ in {
value = "{searchTerms}"; value = "{searchTerms}";
} }
]; ];
}]; }
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@nm" ]; definedAliases = [ "@nm" ];
}; };
"Home Manager Modules" = { "Home Manager Modules" = {
urls = [{ urls = [
{
template = "https://home-manager-options.extranix.com/"; template = "https://home-manager-options.extranix.com/";
params = [ params = [
{ {
@ -293,12 +307,14 @@ in {
value = "master"; value = "master";
} }
]; ];
}]; }
];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@hm" ]; definedAliases = [ "@hm" ];
}; };
"Repology" = { "Repology" = {
urls = [{ urls = [
{
template = "https://repology.org/projects"; template = "https://repology.org/projects";
params = [ params = [
{ {
@ -306,71 +322,88 @@ in {
value = "{searchTerms}"; value = "{searchTerms}";
} }
]; ];
}]; }
];
iconUpdateURL = "https://raw.githubusercontent.com/repology/repology-webapp/master/repologyapp/static/repology40x40.v1.png"; iconUpdateURL = "https://raw.githubusercontent.com/repology/repology-webapp/master/repologyapp/static/repology40x40.v1.png";
updateInterval = 24 * 60 * 60 * 1000; updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@repo" ]; definedAliases = [ "@repo" ];
}; };
"NixOS Wiki" = { "NixOS Wiki" = {
urls = [{ urls = [
{
template = "https://wiki.nixos.org/w/index.php"; template = "https://wiki.nixos.org/w/index.php";
params = [{ params = [
{
name = "search"; name = "search";
value = "{searchTerms}"; value = "{searchTerms}";
}]; }
}]; ];
}
];
icon = "${config.programs.firefox.profiles.default.search.engines."Nix Packages".icon}"; icon = "${config.programs.firefox.profiles.default.search.engines."Nix Packages".icon}";
definedAliases = [ "@nw" ]; definedAliases = [ "@nw" ];
}; };
"Arch Wiki" = { "Arch Wiki" = {
urls = [{ urls = [
{
template = "https://wiki.archlinux.org/index.php"; template = "https://wiki.archlinux.org/index.php";
params = [{ params = [
{
name = "search"; name = "search";
value = "{searchTerms}"; value = "{searchTerms}";
}]; }
}]; ];
}
];
iconUpdateURL = "https://upload.wikimedia.org/wikipedia/commons/1/13/Arch_Linux_%22Crystal%22_icon.svg"; iconUpdateURL = "https://upload.wikimedia.org/wikipedia/commons/1/13/Arch_Linux_%22Crystal%22_icon.svg";
updateInterval = 24 * 60 * 60 * 1000; updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@arch" ]; definedAliases = [ "@arch" ];
}; };
"Minecraft Wiki" = { "Minecraft Wiki" = {
urls = [{ urls = [
{
template = "https://minecraft.wiki/"; template = "https://minecraft.wiki/";
params = [{ params = [
{
name = "search"; name = "search";
value = "{searchTerms}"; value = "{searchTerms}";
}]; }
}]; ];
}
];
iconUpdateURL = "https://minecraft.wiki/images/Wiki.png"; iconUpdateURL = "https://minecraft.wiki/images/Wiki.png";
updateInterval = 24 * 60 * 60 * 1000; updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@mc" ]; definedAliases = [ "@mc" ];
}; };
"Warframe Wiki" = { "Warframe Wiki" = {
urls = [{ urls = [
template = {
"https://warframe.fandom.com/wiki/Special:Search"; template = "https://warframe.fandom.com/wiki/Special:Search";
params = [{ params = [
{
name = "query"; name = "query";
value = "{searchTerms}"; value = "{searchTerms}";
}]; }
}]; ];
iconUpdateURL = }
"https://static.wikia.nocookie.net/warframe/images/e/e6/Site-logo.png"; ];
iconUpdateURL = "https://static.wikia.nocookie.net/warframe/images/e/e6/Site-logo.png";
updateInterval = 24 * 60 * 60 * 1000; updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "@wf" ]; definedAliases = [ "@wf" ];
}; };
"DuckDuckGo" = { "DuckDuckGo" = {
urls = [{ urls = [
template = {
"https://duckduckgo.com"; template = "https://duckduckgo.com";
params = [{ params = [
{
name = "q"; name = "q";
value = "{searchTerms}"; value = "{searchTerms}";
}]; }
}]; ];
iconUpdateURL = }
"https://duckduckgo.com/assets/logo_header.v109.svg"; ];
iconUpdateURL = "https://duckduckgo.com/assets/logo_header.v109.svg";
updateInterval = 24 * 60 * 60 * 1000; updateInterval = 24 * 60 * 60 * 1000;
definedAliases = [ "ddg" ]; definedAliases = [ "ddg" ];
}; };
@ -395,4 +428,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.git; let
in { cfg = config.jopejoe1.git;
in
{
options.jopejoe1.git = { options.jopejoe1.git = {
enable = lib.mkEnableOption "Enable Git"; enable = lib.mkEnableOption "Enable Git";
}; };
@ -15,11 +22,13 @@ in {
userName = "jopejoe1"; userName = "jopejoe1";
extraConfig = { extraConfig = {
core = { core = {
whitespace = [ "blank-at-eol" "blank-at-eof" "space-before-tab" ]; whitespace = [
"blank-at-eol"
"blank-at-eof"
"space-before-tab"
];
}; };
}; };
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.gpg; let
in { cfg = config.jopejoe1.gpg;
in
{
options.jopejoe1.gpg = { options.jopejoe1.gpg = {
enable = lib.mkEnableOption "Enable Nushell"; enable = lib.mkEnableOption "Enable Nushell";
}; };
@ -15,5 +22,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.nushell; let
in { cfg = config.jopejoe1.nushell;
in
{
options.jopejoe1.nushell = { options.jopejoe1.nushell = {
enable = lib.mkEnableOption "Enable Nushell"; enable = lib.mkEnableOption "Enable Nushell";
}; };
@ -28,5 +35,3 @@ in {
}; };
}; };
} }

View file

@ -1,8 +1,12 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.asf; let
in { cfg = config.jopejoe1.asf;
options.jopejoe1.asf = { enable = lib.mkEnableOption "Enable ASF"; }; in
{
options.jopejoe1.asf = {
enable = lib.mkEnableOption "Enable ASF";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.archisteamfarm = { services.archisteamfarm = {
@ -27,4 +31,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.audio; let
in { cfg = config.jopejoe1.audio;
in
{
options.jopejoe1.audio = { options.jopejoe1.audio = {
enable = lib.mkEnableOption "Enable Audio"; enable = lib.mkEnableOption "Enable Audio";
sennheiser-hd-660s = lib.mkEnableOption "Equalizer for Sennheiser HD 660S"; sennheiser-hd-660s = lib.mkEnableOption "Equalizer for Sennheiser HD 660S";
@ -23,24 +30,26 @@ in {
wireplumber.enable = true; wireplumber.enable = true;
extraConfig.pipewire."30-noise-filter" = { extraConfig.pipewire."30-noise-filter" = {
"context.modules" = [{ "context.modules" = [
{
name = "libpipewire-module-filter-chain"; name = "libpipewire-module-filter-chain";
args = { args = {
"node.description" = "Noise Canceling source"; "node.description" = "Noise Canceling source";
"media.name" = "Noise Canceling source"; "media.name" = "Noise Canceling source";
"filter.graph" = { "filter.graph" = {
nodes = [{ nodes = [
{
type = "ladspa"; type = "ladspa";
name = "rnnoise"; name = "rnnoise";
plugin = plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
"${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so";
label = "noise_suppressor_mono"; label = "noise_suppressor_mono";
control = { control = {
"VAD Threshold (%)" = 50.0; "VAD Threshold (%)" = 50.0;
#"VAD Grace Period (ms)" = 0; #"VAD Grace Period (ms)" = 0;
"Retroactive VAD Grace (ms)" = 50; "Retroactive VAD Grace (ms)" = 50;
}; };
}]; }
];
}; };
"capture.props" = { "capture.props" = {
"node.name" = "capture.rnnoise_source"; "node.name" = "capture.rnnoise_source";
@ -53,7 +62,8 @@ in {
"audio.rate" = 48000; "audio.rate" = 48000;
}; };
}; };
}]; }
];
}; };
}; };
}; };

View file

@ -1,11 +1,14 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.audio; let
in { cfg = config.jopejoe1.audio;
in
{
config = lib.mkIf cfg.sennheiser-hd-660s { config = lib.mkIf cfg.sennheiser-hd-660s {
services.pipewire = { services.pipewire = {
extraConfig.pipewire."20-Senheiser-HD660S" = { extraConfig.pipewire."20-Senheiser-HD660S" = {
"context.modules" = [{ "context.modules" = [
{
name = "libpipewire-module-filter-chain"; name = "libpipewire-module-filter-chain";
args = { args = {
"node.description" = "Senheiser HD 660 S Equaliser"; "node.description" = "Senheiser HD 660 S Equaliser";
@ -167,7 +170,10 @@ in {
]; ];
}; };
"audio.channels" = 2; "audio.channels" = 2;
"audio.position" = [ "FL" "FR" ]; "audio.position" = [
"FL"
"FR"
];
"capture.props" = { "capture.props" = {
"node.name" = "effect_input.eq11"; "node.name" = "effect_input.eq11";
"media.class" = "Audio/Sink"; "media.class" = "Audio/Sink";
@ -177,9 +183,9 @@ in {
"node.passive" = true; "node.passive" = true;
}; };
}; };
}]; }
];
}; };
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.auto-update; let
in { cfg = config.jopejoe1.auto-update;
in
{
options.jopejoe1.auto-update = { options.jopejoe1.auto-update = {
enable = lib.mkEnableOption "Enable Auto-Updates"; enable = lib.mkEnableOption "Enable Auto-Updates";
}; };
@ -12,11 +19,7 @@ in {
randomizedDelaySec = "30min"; randomizedDelaySec = "30min";
flake = flake =
if config.services.archisteamfarm.enable then if config.services.archisteamfarm.enable then
"$(${pkgs.coreutils}/bin/rm -rf /var/lib/update-repo && ${ "$(${pkgs.coreutils}/bin/rm -rf /var/lib/update-repo && ${lib.getExe pkgs.git} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/update-repo -q --depth=1 && ${lib.getExe pkgs.git} -C /var/lib/update-repo am /home/jopejoe1/.config/patches/0001-add-liscense.patch -q)/var/lib/update-repo"
lib.getExe pkgs.git
} clone git@codeberg.org:jopejoe1/nix-conf.git /var/lib/update-repo -q --depth=1 && ${
lib.getExe pkgs.git
} -C /var/lib/update-repo am /home/jopejoe1/.config/patches/0001-add-liscense.patch -q)/var/lib/update-repo"
else else
"github:jopejoe1/nix-conf"; "github:jopejoe1/nix-conf";
dates = "hourly"; dates = "hourly";

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.bluetooth; let
in { cfg = config.jopejoe1.bluetooth;
in
{
options.jopejoe1.bluetooth = { options.jopejoe1.bluetooth = {
enable = lib.mkEnableOption "Enable Bluetooth"; enable = lib.mkEnableOption "Enable Bluetooth";
}; };

View file

@ -1,7 +1,5 @@
{ ... }: { ... }:
{ {
imports = [ imports = [ ./systemd ];
./systemd
];
} }

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.boot.systemd; let
in { cfg = config.jopejoe1.boot.systemd;
in
{
options.jopejoe1.boot.systemd = { options.jopejoe1.boot.systemd = {
enable = lib.mkEnableOption "Enable Systemd boot"; enable = lib.mkEnableOption "Enable Systemd boot";
}; };

View file

@ -1,8 +1,18 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let cfg = config.jopejoe1.doc; let
in { cfg = config.jopejoe1.doc;
options.jopejoe1.doc = { enable = lib.mkEnableOption "Enable Documentation"; }; in
{
options.jopejoe1.doc = {
enable = lib.mkEnableOption "Enable Documentation";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
documentation = { documentation = {

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.events."37c3"; let
in { cfg = config.events."37c3";
in
{
options.events."37c3" = { options.events."37c3" = {
enable = lib.mkEnableOption "Enable settings for the 37c3 event"; enable = lib.mkEnableOption "Enable settings for the 37c3 event";
}; };
@ -29,7 +31,9 @@ in {
password = "37C3"; password = "37C3";
phase2-auth = "mschapv2"; phase2-auth = "mschapv2";
}; };
ipv4 = { method = "auto"; }; ipv4 = {
method = "auto";
};
ipv6 = { ipv6 = {
addr-gen-mode = "default"; addr-gen-mode = "default";
method = "auto"; method = "auto";
@ -43,8 +47,7 @@ in {
ca_cert="${ ca_cert="${
builtins.fetchurl { builtins.fetchurl {
url = "https://letsencrypt.org/certs/isrgrootx1.pem"; url = "https://letsencrypt.org/certs/isrgrootx1.pem";
sha256 = sha256 = "sha256:1la36n2f31j9s03v847ig6ny9lr875q3g7smnq33dcsmf2i5gd92";
"sha256:1la36n2f31j9s03v847ig6ny9lr875q3g7smnq33dcsmf2i5gd92";
} }
}" }"
altsubject_match="DNS:radius.c3noc.net" altsubject_match="DNS:radius.c3noc.net"

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.keyboard; let
in { cfg = config.jopejoe1.keyboard;
in
{
options.jopejoe1.keyboard = { options.jopejoe1.keyboard = {
enable = lib.mkEnableOption "Enable Keyboard"; enable = lib.mkEnableOption "Enable Keyboard";
layout = lib.mkOption { layout = lib.mkOption {
@ -23,4 +30,3 @@ in {
}; };
}; };
} }

View file

@ -1,8 +1,18 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let cfg = config.jopejoe1.kodi; let
in { cfg = config.jopejoe1.kodi;
options.jopejoe1.kodi = { enable = lib.mkEnableOption "Enable Kodi"; }; in
{
options.jopejoe1.kodi = {
enable = lib.mkEnableOption "Enable Kodi";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.kodi-wayland ]; environment.systemPackages = [ pkgs.kodi-wayland ];

View file

@ -1,8 +1,17 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.local; let
in { cfg = config.jopejoe1.local;
options.jopejoe1.local = { enable = lib.mkEnableOption "Enable Locals"; }; in
{
options.jopejoe1.local = {
enable = lib.mkEnableOption "Enable Locals";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
xdg = { xdg = {
@ -35,9 +44,10 @@ in {
}; };
}; };
environment.variables = { LOG_ICONS = "true"; }; environment.variables = {
LOG_ICONS = "true";
};
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
}; };
} }

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.minecraft-server; let
in { cfg = config.jopejoe1.minecraft-server;
in
{
options.jopejoe1.minecraft-server = { options.jopejoe1.minecraft-server = {
enable = lib.mkEnableOption "Enable Bluetooth"; enable = lib.mkEnableOption "Enable Bluetooth";
}; };
@ -16,8 +18,7 @@ in {
difficulty = 3; difficulty = 3;
enable-rcon = true; enable-rcon = true;
"rcon.password" = "test"; "rcon.password" = "test";
motd = motd = "\\u00A7cWake up to reality! Nothing ever goes as planned in this accursed world.";
"\\u00A7cWake up to reality! Nothing ever goes as planned in this accursed world.";
spawn-protection = 0; spawn-protection = 0;
level-type = "minecraft:amplified"; level-type = "minecraft:amplified";
level-name = "amplified_world"; level-name = "amplified_world";

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.moodle-dl; let
in { cfg = config.jopejoe1.moodle-dl;
in
{
options.jopejoe1.moodle-dl = { options.jopejoe1.moodle-dl = {
enable = lib.mkEnableOption "Enable moodle-dl"; enable = lib.mkEnableOption "Enable moodle-dl";
}; };
@ -22,7 +29,12 @@ in {
git -C /var/lib/moodle-dl add . git -C /var/lib/moodle-dl add .
git -C /var/lib/moodle-dl commit -m "moodle-dl updated on `$(date)`" git -C /var/lib/moodle-dl commit -m "moodle-dl updated on `$(date)`"
''; '';
path = with pkgs; [ openssh moodle-dl git coreutils ]; path = with pkgs; [
openssh
moodle-dl
git
coreutils
];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "root"; User = "root";
@ -30,4 +42,3 @@ in {
}; };
}; };
} }

View file

@ -1,9 +1,21 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let cfg = config.jopejoe1.nix; let
in { cfg = config.jopejoe1.nix;
options.jopejoe1.nix = { enable = lib.mkEnableOption "Enable Nix"; }; in
options.jopejoe1.gui = { enable = lib.mkEnableOption "Enable GUI"; }; {
options.jopejoe1.nix = {
enable = lib.mkEnableOption "Enable Nix";
};
options.jopejoe1.gui = {
enable = lib.mkEnableOption "Enable GUI";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
nix = { nix = {
@ -55,9 +67,14 @@ in {
# ]; # ];
distributedBuilds = true; distributedBuilds = true;
package = pkgs.lix; package = pkgs.lix;
registry = lib.mkForce ((lib.mapAttrs (_: flake: { inherit flake; })) ((lib.filterAttrs (_: lib.isType "flake")) self.inputs) // { registry = lib.mkForce (
(lib.mapAttrs (_: flake: { inherit flake; })) (
(lib.filterAttrs (_: lib.isType "flake")) self.inputs
)
// {
self.flake = self; self.flake = self;
}); }
);
nixPath = lib.mkForce [ "/etc/nix/path" ]; nixPath = lib.mkForce [ "/etc/nix/path" ];
}; };
@ -75,7 +92,10 @@ in {
]; ];
}; };
environment.etc = lib.mapAttrs' (name: value: { name = "nix/path/${name}"; value.source = value.flake; }) config.nix.registry; environment.etc = lib.mapAttrs' (name: value: {
name = "nix/path/${name}";
value.source = value.flake;
}) config.nix.registry;
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
deploy-rs deploy-rs
@ -92,9 +112,7 @@ in {
useGlobalPkgs = true; useGlobalPkgs = true;
useUserPackages = true; useUserPackages = true;
backupFileExtension = "backup"; backupFileExtension = "backup";
sharedModules = [ sharedModules = [ self.outputs.homeManagerModules.default ];
self.outputs.homeManagerModules.default
];
}; };
systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000; systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000;
@ -106,4 +124,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.plasma; let
in { cfg = config.jopejoe1.plasma;
in
{
options.jopejoe1.plasma = { options.jopejoe1.plasma = {
enable = lib.mkEnableOption "Enable KDE Plasma"; enable = lib.mkEnableOption "Enable KDE Plasma";
}; };
@ -24,9 +26,10 @@ in {
}; };
}; };
programs.kdeconnect = { enable = true; }; programs.kdeconnect = {
enable = true;
};
networking.networkmanager.enable = true; networking.networkmanager.enable = true;
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.printing; let
in { cfg = config.jopejoe1.printing;
in
{
options.jopejoe1.printing = { options.jopejoe1.printing = {
enable = lib.mkEnableOption "Enable Printing"; enable = lib.mkEnableOption "Enable Printing";
}; };
@ -27,4 +34,3 @@ in {
}; };
}; };
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.repo-sync; let
in { cfg = config.jopejoe1.repo-sync;
in
{
options.jopejoe1.repo-sync = { options.jopejoe1.repo-sync = {
enable = lib.mkEnableOption "Enable Repo Sync"; enable = lib.mkEnableOption "Enable Repo Sync";
}; };
@ -30,7 +37,12 @@ in {
git -C /var/lib/repo-sync push gitlab git -C /var/lib/repo-sync push gitlab
rm -r /var/lib/repo-sync rm -r /var/lib/repo-sync
''; '';
path = [ pkgs.openssh pkgs.git pkgs.coreutils pkgs.nix ]; path = [
pkgs.openssh
pkgs.git
pkgs.coreutils
pkgs.nix
];
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
User = "root"; User = "root";
@ -38,4 +50,3 @@ in {
}; };
}; };
} }

View file

@ -1,8 +1,18 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
self,
...
}:
let cfg = config.jopejoe1.ssh; let
in { cfg = config.jopejoe1.ssh;
options.jopejoe1.ssh = { enable = lib.mkEnableOption "Enable ssh"; }; in
{
options.jopejoe1.ssh = {
enable = lib.mkEnableOption "Enable ssh";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.openssh = { services.openssh = {
@ -15,4 +25,3 @@ in {
}; };
}; };
} }

View file

@ -1,8 +1,17 @@
{ pkgs, config, lib, ... }: {
pkgs,
config,
lib,
...
}:
let cfg = config.jopejoe1.steam; let
in { cfg = config.jopejoe1.steam;
options.jopejoe1.steam = { enable = lib.mkEnableOption "Enable Steam"; }; in
{
options.jopejoe1.steam = {
enable = lib.mkEnableOption "Enable Steam";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
hardware.steam-hardware.enable = true; hardware.steam-hardware.enable = true;
@ -14,10 +23,7 @@ in {
localNetworkGameTransfers.openFirewall = true; localNetworkGameTransfers.openFirewall = true;
gamescopeSession.enable = true; gamescopeSession.enable = true;
extest.enable = true; extest.enable = true;
extraCompatPackages = with pkgs; [ extraCompatPackages = with pkgs; [ proton-ge-bin ];
proton-ge-bin
];
}; };
}; };
} }

View file

@ -1,7 +1,9 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.sway; let
in { cfg = config.jopejoe1.sway;
in
{
options.jopejoe1.sway = { options.jopejoe1.sway = {
enable = lib.mkEnableOption "Enable Sway"; enable = lib.mkEnableOption "Enable Sway";
}; };
@ -12,4 +14,3 @@ in {
}; };
}; };
} }

View file

@ -1,5 +1,8 @@
{ ... }: { ... }:
{ {
imports = [ ./root ./jopejoe1 ]; imports = [
./root
./jopejoe1
];
} }

View file

@ -1,7 +1,14 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.user.jopejoe1; let
in { cfg = config.jopejoe1.user.jopejoe1;
in
{
options.jopejoe1.user.jopejoe1 = { options.jopejoe1.user.jopejoe1 = {
enable = lib.mkEnableOption "Enable jopejoe1 user"; enable = lib.mkEnableOption "Enable jopejoe1 user";
}; };
@ -12,7 +19,13 @@ in {
shell = pkgs.nushell; shell = pkgs.nushell;
description = "Johannes Jöns"; description = "Johannes Jöns";
hashedPassword = "$2b$05$Uk84TY/RHlH8DIigUlFYjeorjTlCMEY9wN2pAcw5BLaPoc7dKiSsC"; hashedPassword = "$2b$05$Uk84TY/RHlH8DIigUlFYjeorjTlCMEY9wN2pAcw5BLaPoc7dKiSsC";
extraGroups = [ "wheel" "networkmanager" "pipewire" "audio" "adbusers" ]; extraGroups = [
"wheel"
"networkmanager"
"pipewire"
"audio"
"adbusers"
];
uid = 1000; uid = 1000;
openssh.authorizedKeys.keys = [ openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email"
@ -21,7 +34,8 @@ in {
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm2igbJ+Ke+dJO3r7wp5ZTreHqC39Sjctca119Bl2yc jopejoe1@zap" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm2igbJ+Ke+dJO3r7wp5ZTreHqC39Sjctca119Bl2yc jopejoe1@zap"
]; ];
packages = with pkgs; packages =
with pkgs;
[ ] [ ]
++ lib.optionals config.jopejoe1.gui.enable [ ++ lib.optionals config.jopejoe1.gui.enable [
libsForQt5.kate libsForQt5.kate
@ -35,10 +49,13 @@ in {
catppuccin-kde catppuccin-kde
#catppuccin-gtk #catppuccin-gtk
tela-icon-theme tela-icon-theme
((discord.overrideAttrs (old: { (
desktopItem = old.desktopItem.override (discord.overrideAttrs (old: {
(old: { exec = old.exec + " --disable-gpu-sandbox"; }); desktopItem = old.desktopItem.override (old: {
})).override { exec = old.exec + " --disable-gpu-sandbox";
});
})).override
{
withOpenASAR = true; withOpenASAR = true;
withVencord = true; withVencord = true;
withTTS = true; withTTS = true;

View file

@ -1,8 +1,12 @@
{ config, lib, ... }: { config, lib, ... }:
let cfg = config.jopejoe1.user.root; let
in { cfg = config.jopejoe1.user.root;
options.jopejoe1.user.root = { enable = lib.mkEnableOption "Enable root user"; }; in
{
options.jopejoe1.user.root = {
enable = lib.mkEnableOption "Enable root user";
};
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
users.users.root = { users.users.root = {
@ -34,4 +38,3 @@ in {
}; };
}; };
} }

View file

@ -1,16 +1,24 @@
{ config, lib, pkgs, ... }: {
config,
lib,
pkgs,
...
}:
let cfg = config.jopejoe1.zerotierone; let
in { cfg = config.jopejoe1.zerotierone;
in
{
options.jopejoe1.zerotierone = { options.jopejoe1.zerotierone = {
enable = lib.mkEnableOption "Enable zerotierone"; enable = lib.mkEnableOption "Enable zerotierone";
}; };
config = lib.mkIf cfg.enable { config = lib.mkIf cfg.enable {
services.zerotierone.enable = true; services.zerotierone.enable = true;
services.zerotierone.joinNetworks = [ "9e1948db638e9f93" ] ++ lib.optional (config.networking.hostName == "kuraokami") "7c31a21e86f9a75c"; services.zerotierone.joinNetworks = [
"9e1948db638e9f93"
] ++ lib.optional (config.networking.hostName == "kuraokami") "7c31a21e86f9a75c";
services.zerotierone.port = 9993; services.zerotierone.port = 9993;
environment.systemPackages = with pkgs; lib.optional config.jopejoe1.gui.enable moonlight-qt; environment.systemPackages = with pkgs; lib.optional config.jopejoe1.gui.enable moonlight-qt;
}; };
} }

View file

@ -1,19 +1,21 @@
{ inputs, pkgs, system }: {
inputs,
pkgs,
system,
}:
{ {
tela-icon-theme-git = pkgs.tela-icon-theme.overrideAttrs { tela-icon-theme-git = pkgs.tela-icon-theme.overrideAttrs { src = inputs.tela-icon-theme; };
src = inputs.tela-icon-theme;
};
libadwaita-follow-theme = pkgs.libadwaita.overrideAttrs (old: { libadwaita-follow-theme = pkgs.libadwaita.overrideAttrs (old: {
patches = (old.patches or [ ]) ++ [ ./adwaita-theming-support.patch ]; patches = (old.patches or [ ]) ++ [ ./adwaita-theming-support.patch ];
doCheck = false; doCheck = false;
}); });
prismlauncher-withExtraStuff = inputs.prismlauncher.packages.${system}.prismlauncher.overrideAttrs (old: { prismlauncher-withExtraStuff =
patches = (old.patches or [ ]) ++ [ inputs.prismlauncher.packages.${system}.prismlauncher.overrideAttrs
./prism-ftb.patch (old: {
]; patches = (old.patches or [ ]) ++ [ ./prism-ftb.patch ];
}); });
nixos-anywhere = inputs.nixos-anywhere.packages.${system}.nixos-anywhere; nixos-anywhere = inputs.nixos-anywhere.packages.${system}.nixos-anywhere;
@ -26,9 +28,7 @@
url = "https://mangabooth.com/"; url = "https://mangabooth.com/";
hash = "sha256-JxfjZLoN6I9twAQMT60Q27CgJg22G7zEU5GDra9rROs="; hash = "sha256-JxfjZLoN6I9twAQMT60Q27CgJg22G7zEU5GDra9rROs=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
madara-child = pkgs.stdenv.mkDerivation rec { madara-child = pkgs.stdenv.mkDerivation rec {
@ -39,9 +39,7 @@
url = "https://mangabooth.com/"; url = "https://mangabooth.com/";
hash = "sha256-h9w2TmX1nXaoP27b9DQ1jf6z1hTS5+BWtlz+Fprk5dQ="; hash = "sha256-h9w2TmX1nXaoP27b9DQ1jf6z1hTS5+BWtlz+Fprk5dQ=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
unpackPhase = '' unpackPhase = ''
mkdir -p $out mkdir -p $out
unzip $src "madara-child/*" -d $out unzip $src "madara-child/*" -d $out
@ -56,9 +54,7 @@
url = "https://mangabooth.com/"; url = "https://mangabooth.com/";
hash = "sha256-r22hGCDlVeYTOFlhfKoc3r4TtpZExJ2E2QP9ssRoJco="; hash = "sha256-r22hGCDlVeYTOFlhfKoc3r4TtpZExJ2E2QP9ssRoJco=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
madara-shortcodes = pkgs.stdenv.mkDerivation rec { madara-shortcodes = pkgs.stdenv.mkDerivation rec {
@ -69,9 +65,7 @@
url = "https://mangabooth.com/"; url = "https://mangabooth.com/";
hash = "sha256-IW7C5DTzvt3ROFpfB21LY2wmdR45lNj9c8/THHCi6eY="; hash = "sha256-IW7C5DTzvt3ROFpfB21LY2wmdR45lNj9c8/THHCi6eY=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
unpackPhase = '' unpackPhase = ''
mkdir -p $out mkdir -p $out
unzip $src "madara-shortcodes/*" -d $out unzip $src "madara-shortcodes/*" -d $out
@ -86,9 +80,7 @@
url = "https://mangabooth.com/"; url = "https://mangabooth.com/";
hash = "sha256-9u+MGdOarNdLtARWiJpw/hsMR9X8r0h5qugGir+amUI="; hash = "sha256-9u+MGdOarNdLtARWiJpw/hsMR9X8r0h5qugGir+amUI=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
option-tree = pkgs.stdenv.mkDerivation rec { option-tree = pkgs.stdenv.mkDerivation rec {
@ -98,9 +90,7 @@
url = "https://downloads.wordpress.org/plugin/option-tree.zip"; url = "https://downloads.wordpress.org/plugin/option-tree.zip";
hash = "sha256-+dPt8qJ4rkmSKrIXX5IiWO4zkFkR+Uapjlbx1g7KzKs="; hash = "sha256-+dPt8qJ4rkmSKrIXX5IiWO4zkFkR+Uapjlbx1g7KzKs=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
widget-logic = pkgs.stdenv.mkDerivation rec { widget-logic = pkgs.stdenv.mkDerivation rec {
@ -110,9 +100,7 @@
url = "https://downloads.wordpress.org/plugin/widget-logic.zip"; url = "https://downloads.wordpress.org/plugin/widget-logic.zip";
hash = "sha256-J2NOth3q+IaPVhFT97arsNfjUPyTZF4Vvin1Cb+xnKw="; hash = "sha256-J2NOth3q+IaPVhFT97arsNfjUPyTZF4Vvin1Cb+xnKw=";
}; };
nativeBuildInputs = [ nativeBuildInputs = [ pkgs.unzip ];
pkgs.unzip
];
installPhase = "mkdir -p $out; cp -R * $out/"; installPhase = "mkdir -p $out; cp -R * $out/";
}; };
kde-hdr-fix = pkgs.callPackage ./kde-hdr.nix { }; kde-hdr-fix = pkgs.callPackage ./kde-hdr.nix { };

View file

@ -25,7 +25,10 @@ stdenv.mkDerivation {
# ninja # ninja
]; ];
buildInputs = [ vulkan-headers libX11 ]; buildInputs = [
vulkan-headers
libX11
];
strictDeps = true; strictDeps = true;

View file

@ -23,9 +23,7 @@ stdenv.mkDerivation {
kdePackages.wrapQtAppsHook kdePackages.wrapQtAppsHook
]; ];
buildInputs = [ buildInputs = [ kdePackages.qtbase ];
kdePackages.qtbase
];
cmakeFlags = [ cmakeFlags = [
"-DECM_DIR=${kdePackages.extra-cmake-modules}/share/ECM/cmake" "-DECM_DIR=${kdePackages.extra-cmake-modules}/share/ECM/cmake"

View file

@ -1,4 +1,9 @@
{ pkgs, config, nixos-hardware, ... }: {
pkgs,
config,
nixos-hardware,
...
}:
{ {
imports = [ imports = [
@ -10,7 +15,9 @@
]; ];
jopejoe1 = { jopejoe1 = {
audio = { enable = true; }; audio = {
enable = true;
};
bluetooth.enable = true; bluetooth.enable = true;
local.enable = true; local.enable = true;
nix.enable = true; nix.enable = true;
@ -60,9 +67,7 @@
settings = { settings = {
server = { server = {
systemTrayEnabled = true; systemTrayEnabled = true;
extensionRepos = [ extensionRepos = [ "https://raw.githubusercontent.com/keiyoushi/extensions/repo/index.min.json" ];
"https://raw.githubusercontent.com/keiyoushi/extensions/repo/index.min.json"
];
webUIEnabled = true; webUIEnabled = true;
initialOpenInBrowserEnabled = true; initialOpenInBrowserEnabled = true;
webUIInterface = "browser"; webUIInterface = "browser";
@ -103,6 +108,10 @@
networking.hosts = { networking.hosts = {
"192.168.88.251" = [ "wiki.it3" ]; "192.168.88.251" = [ "wiki.it3" ];
"192.168.88.252" = [ "pi400" ]; "192.168.88.252" = [ "pi400" ];
"127.0.0.1" = [ "local" "rss.local" "manga.local" ]; "127.0.0.1" = [
"local"
"rss.local"
"manga.local"
];
}; };
} }

View file

@ -1,4 +1,9 @@
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -22,11 +27,9 @@
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; } ];
[{ device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; }];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -1,8 +1,24 @@
{ self, nixpkgs, inputs }: {
self,
nixpkgs,
inputs,
}:
let let
mkSystem = systemConfig: name: nixpkgs.lib.nixosSystem rec { mkSystem =
system = builtins.replaceStrings [ "-unknown-" "-gnu" ] [ "-" "" ] systemConfig; systemConfig: name:
nixpkgs.lib.nixosSystem rec {
system =
builtins.replaceStrings
[
"-unknown-"
"-gnu"
]
[
"-"
""
]
systemConfig;
specialArgs = inputs; specialArgs = inputs;
modules = [ modules = [
./${name} ./${name}

View file

@ -3,7 +3,9 @@
{ {
jopejoe1 = { jopejoe1 = {
audio = { enable = true; }; audio = {
enable = true;
};
bluetooth.enable = true; bluetooth.enable = true;
local.enable = true; local.enable = true;
nix.enable = true; nix.enable = true;
@ -14,7 +16,6 @@
boot.systemd.enable = true; boot.systemd.enable = true;
}; };
environment.systemPackages = with pkgs; [ moonlight-qt ]; environment.systemPackages = with pkgs; [ moonlight-qt ];
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";

View file

@ -1,4 +1,9 @@
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -22,11 +27,9 @@
fsType = "ext4"; fsType = "ext4";
}; };
swapDevices = swapDevices = [ { device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; } ];
[{ device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; }];
networking.useDHCP = lib.mkDefault true; networking.useDHCP = lib.mkDefault true;
hardware.cpu.intel.updateMicrocode = hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -28,14 +28,20 @@
}; };
systemd.services.dns-rfc2136-conf = { systemd.services.dns-rfc2136-conf = {
requiredBy = [ "acme-net0loggy.net.service" "bind.service" ]; requiredBy = [
before = [ "acme-net0loggy.net.service" "bind.service" ]; "acme-net0loggy.net.service"
"bind.service"
];
before = [
"acme-net0loggy.net.service"
"bind.service"
];
unitConfig = { unitConfig = {
ConditionPathExists = "!/var/lib/secrets/dnskeys.conf"; ConditionPathExists = "!/var/lib/secrets/dnskeys.conf";
}; };
serviceConfig = { serviceConfig = {
Type = "oneshot"; Type = "oneshot";
UMask = 0077; UMask = 77;
}; };
path = [ pkgs.bind ]; path = [ pkgs.bind ];
script = '' script = ''

View file

@ -1,4 +1,10 @@
{ config, pkgs, lib, self, ... }: {
config,
pkgs,
lib,
self,
...
}:
{ {
@ -24,7 +30,10 @@
ssh.enable = true; ssh.enable = true;
}; };
boot.initrd.availableKernelModules = [ "ahci" "nvme" ]; boot.initrd.availableKernelModules = [
"ahci"
"nvme"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ]; boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];

View file

@ -1,17 +1,54 @@
{ config, pkgs, lib, ...}: {
config,
pkgs,
lib,
...
}:
{ {
mailserver = { mailserver = {
enable = true; enable = true;
fqdn = "mail.missing.ninja"; fqdn = "mail.missing.ninja";
domains = [ "missing.ninja" "joens.zone" "joens.website" "joens.site" "joens.online" "joens.link" "joens.international" "joens.family" "joens.digital" "joens.blog" "net0loggy.net" "clan-war.net" "net0loggy.de" "dtg-c.de" "joens.email" ]; domains = [
"missing.ninja"
"joens.zone"
"joens.website"
"joens.site"
"joens.online"
"joens.link"
"joens.international"
"joens.family"
"joens.digital"
"joens.blog"
"net0loggy.net"
"clan-war.net"
"net0loggy.de"
"dtg-c.de"
"joens.email"
];
# A list of all login accounts. To create the password hashes, use # A list of all login accounts. To create the password hashes, use
# nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt'
loginAccounts = { loginAccounts = {
"jopejoe1@missing.ninja" = { "jopejoe1@missing.ninja" = {
hashedPassword = "$2b$05$ZZk/X.gQqjRc08ej9XTuaO0aVnWjPGWUqo/xYGxHGsMEyDL.Hr8AS"; hashedPassword = "$2b$05$ZZk/X.gQqjRc08ej9XTuaO0aVnWjPGWUqo/xYGxHGsMEyDL.Hr8AS";
aliases = [ "@missing.ninja" "@joens.zone" "@joens.website" "@joens.site" "@joens.online" "@joens.link" "@joens.international" "@joens.family" "@joens.digital" "@joens.blog" "@net0loggy.net" "@clan-war.net" "@net0loggy.de" "@dtg-c.de" "@joens.email" ]; aliases = [
"@missing.ninja"
"@joens.zone"
"@joens.website"
"@joens.site"
"@joens.online"
"@joens.link"
"@joens.international"
"@joens.family"
"@joens.digital"
"@joens.blog"
"@net0loggy.net"
"@clan-war.net"
"@net0loggy.de"
"@dtg-c.de"
"@joens.email"
];
}; };
}; };
@ -43,5 +80,8 @@
''; '';
}; };
networking.firewall.allowedTCPPorts = [ 80 443 ]; networking.firewall.allowedTCPPorts = [
80
443
];
} }

View file

@ -54,9 +54,7 @@ in
server_name = "missing.ninja"; server_name = "missing.ninja";
registration_shared_secret = ""; registration_shared_secret = "";
public_baseurl = baseUrl; public_baseurl = baseUrl;
app_service_config_files = [ app_service_config_files = [ "/var/lib/matrix-synapse/whatsapp-registration.yaml" ];
"/var/lib/matrix-synapse/whatsapp-registration.yaml"
];
listeners = [ listeners = [
{ {
port = 8448; port = 8448;
@ -66,7 +64,10 @@ in
x_forwarded = true; x_forwarded = true;
resources = [ resources = [
{ {
names = [ "client" "federation" ]; names = [
"client"
"federation"
];
compress = true; compress = true;
} }
]; ];

View file

@ -1,4 +1,9 @@
{config, pkgs, self, ...}: {
config,
pkgs,
self,
...
}:
{ {
services.nginx = { services.nginx = {
@ -9,7 +14,21 @@
recommendedProxySettings = true; recommendedProxySettings = true;
virtualHosts = { virtualHosts = {
"missing.ninja" = { "missing.ninja" = {
serverAliases = [ "joens.zone" "joens.website" "joens.site" "joens.online" "joens.link" "joens.international" "joens.family" "joens.digital" "joens.blog" "net0loggy.net" "clan-war.net" "net0loggy.de" "dtg-c.de" ]; serverAliases = [
"joens.zone"
"joens.website"
"joens.site"
"joens.online"
"joens.link"
"joens.international"
"joens.family"
"joens.digital"
"joens.blog"
"net0loggy.net"
"clan-war.net"
"net0loggy.de"
"dtg-c.de"
];
enableACME = true; enableACME = true;
forceSSL = true; forceSSL = true;
}; };
@ -23,9 +42,7 @@
locations."/socket.io/" = { locations."/socket.io/" = {
proxyPass = "http://localhost:3333"; proxyPass = "http://localhost:3333";
proxyWebsockets = true; proxyWebsockets = true;
extraConfig = extraConfig = "proxy_ssl_server_name on;";
"proxy_ssl_server_name on;"
;
}; };
}; };
"test.missing.ninja" = { "test.missing.ninja" = {
@ -57,7 +74,8 @@
max_input_time = 300 max_input_time = 300
''; '';
services.wordpress.sites."test.missing.ninja" = with self.packages.${config.nixpkgs.hostPlatform.system}; { services.wordpress.sites."test.missing.ninja" =
with self.packages.${config.nixpkgs.hostPlatform.system}; {
themes = [ themes = [
madara madara
madara-child madara-child

View file

@ -1,16 +1,22 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
with lib; with lib;
let let
mailAccounts = config.mailserver.loginAccounts; mailAccounts = config.mailserver.loginAccounts;
htpasswd = pkgs.writeText "radicale.users" (concatStrings htpasswd = pkgs.writeText "radicale.users" (
(flip mapAttrsToList mailAccounts (mail: user: concatStrings (
mail + ":" + user.hashedPassword + "\n" flip mapAttrsToList mailAccounts (mail: user: mail + ":" + user.hashedPassword + "\n")
)) )
); );
in { in
{
services.radicale = { services.radicale = {
enable = true; enable = true;
settings = { settings = {

View file

@ -1,4 +1,9 @@
{ config, pkgs, lib, ... }: {
config,
pkgs,
lib,
...
}:
{ {
jopejoe1 = { jopejoe1 = {
@ -10,7 +15,6 @@
ssh.enable = true; ssh.enable = true;
}; };
time.timeZone = "Europe/Berlin"; time.timeZone = "Europe/Berlin";
services.openssh.settings.PermitRootLogin = lib.mkForce "yes"; services.openssh.settings.PermitRootLogin = lib.mkForce "yes";

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, nixos-hardware, self, ... }: {
config,
pkgs,
lib,
nixos-hardware,
self,
...
}:
{ {
imports = [ imports = [
@ -105,11 +112,10 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
localPkgs.prismlauncher-withExtraStuff localPkgs.prismlauncher-withExtraStuff
mixxx mixxx
(picard.overrideAttrs{ (picard.overrideAttrs { dontUseSetuptoolsCheck = true; })
dontUseSetuptoolsCheck = true;
})
goverlay goverlay
(strawberry-qt6.overrideAttrs (finalAttrs: previousAttrs: { (strawberry-qt6.overrideAttrs (
finalAttrs: previousAttrs: {
version = "1.1.0-rc3"; version = "1.1.0-rc3";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "strawberrymusicplayer"; owner = "strawberrymusicplayer";
@ -123,7 +129,8 @@
kdePackages.qtsvg kdePackages.qtsvg
kdePackages.qtimageformats kdePackages.qtimageformats
]; ];
})) }
))
libreoffice-qt libreoffice-qt
jitsi-meet-electron jitsi-meet-electron
thunderbird thunderbird
@ -139,9 +146,7 @@
gamemode.enable = true; gamemode.enable = true;
appimage = { appimage = {
enable = true; enable = true;
package = pkgs.appimage-run.override { package = pkgs.appimage-run.override { extraPkgs = pkgs: [ pkgs.brotli ]; };
extraPkgs = pkgs: [ pkgs.brotli ];
};
}; };
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
@ -150,13 +155,28 @@
}; };
}; };
nix.settings.system-features = [ "gccarch-alderlake" "benchmark" "big-parallel" "kvm" "nixos-test" ] nix.settings.system-features = [
++ map (x: "gccarch-${x}") (lib.systems.architectures.inferiors.alderlake or [ ]); "gccarch-alderlake"
"benchmark"
"big-parallel"
"kvm"
"nixos-test"
] ++ map (x: "gccarch-${x}") (lib.systems.architectures.inferiors.alderlake or [ ]);
boot.binfmt.emulatedSystems = [ "riscv64-linux" "aarch64-linux" ]; boot.binfmt.emulatedSystems = [
"riscv64-linux"
"aarch64-linux"
];
programs.nix-ld = { programs.nix-ld = {
enable = true; enable = true;
libraries = with pkgs; [ libz xz xorg.libX11 freetype zstd dbus ]; libraries = with pkgs; [
libz
xz
xorg.libX11
freetype
zstd
dbus
];
}; };
} }

View file

@ -1,7 +1,12 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
@ -20,9 +25,20 @@
}; };
}; };
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [
"vmd"
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" "nouveau" ]; boot.kernelModules = [
"kvm-intel"
"nouveau"
];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems = { fileSystems = {
@ -38,7 +54,10 @@
"/media/gaming" = { "/media/gaming" = {
device = "/dev/disk/by-uuid/4038F97238F966F6"; device = "/dev/disk/by-uuid/4038F97238F966F6";
fsType = "ntfs"; fsType = "ntfs";
options = [ "rw" "uid=1000" ]; options = [
"rw"
"uid=1000"
];
}; };
}; };

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, nixos-hardware, self, ... }: {
config,
pkgs,
lib,
nixos-hardware,
self,
...
}:
{ {
imports = [ imports = [
@ -73,9 +80,17 @@
}; };
}; };
nix.settings.system-features = [ "benchmark" "big-parallel" "kvm" "nixos-test" ]; nix.settings.system-features = [
"benchmark"
"big-parallel"
"kvm"
"nixos-test"
];
boot.binfmt.emulatedSystems = [ "riscv64-linux" "aarch64-linux" ]; boot.binfmt.emulatedSystems = [
"riscv64-linux"
"aarch64-linux"
];
boot.plymouth = { boot.plymouth = {
enable = true; enable = true;
}; };

View file

@ -1,31 +1,46 @@
# Do not modify this file! It was generated by nixos-generate-config # Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes # and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead. # to /etc/nixos/configuration.nix instead.
{ config, lib, modulesPath, ... }: {
config,
lib,
modulesPath,
...
}:
{ {
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"thunderbolt"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ "amdgpu" ]; boot.initrd.kernelModules = [ "amdgpu" ];
boot.kernelModules = [ ]; boot.kernelModules = [ ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/6842a9de-c5fd-4648-b3b8-f76e56633825"; device = "/dev/disk/by-uuid/6842a9de-c5fd-4648-b3b8-f76e56633825";
fsType = "ext4"; fsType = "ext4";
}; };
boot.initrd.luks.devices."luks-eaed8652-a306-4434-a187-71e6fcb13e71".device = "/dev/disk/by-uuid/eaed8652-a306-4434-a187-71e6fcb13e71"; boot.initrd.luks.devices."luks-eaed8652-a306-4434-a187-71e6fcb13e71".device = "/dev/disk/by-uuid/eaed8652-a306-4434-a187-71e6fcb13e71";
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/7C5A-EE45"; device = "/dev/disk/by-uuid/7C5A-EE45";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
fileSystems."/home/jopejoe1/Public/games" = fileSystems."/home/jopejoe1/Public/games" = {
{ device = "/dev/sda"; device = "/dev/sda";
fsType = "bcachefs"; fsType = "bcachefs";
options = [ "compression=zstd" ]; options = [ "compression=zstd" ];
}; };

View file

@ -1,4 +1,9 @@
{ modulesPath, lib, nixos-hardware, ... }: {
modulesPath,
lib,
nixos-hardware,
...
}:
{ {
imports = [ imports = [
@ -7,8 +12,12 @@
]; ];
boot = { boot = {
initrd = { availableKernelModules = [ "xhci_pci" ]; }; initrd = {
loader = { generic-extlinux-compatible.enable = true; }; availableKernelModules = [ "xhci_pci" ];
};
loader = {
generic-extlinux-compatible.enable = true;
};
}; };
hardware.raspberry-pi."4".fkms-3d.enable = true; hardware.raspberry-pi."4".fkms-3d.enable = true;

View file

@ -1,4 +1,10 @@
{ modulesPath, lib, nixos-hardware, pkgs, ... }: {
modulesPath,
lib,
nixos-hardware,
pkgs,
...
}:
{ {
imports = [ imports = [
@ -7,11 +13,23 @@
]; ];
boot = { boot = {
initrd = { availableKernelModules = [ "xhci_pci" ]; }; initrd = {
availableKernelModules = [ "xhci_pci" ];
};
kernelPackages = pkgs.linuxPackages_latest; kernelPackages = pkgs.linuxPackages_latest;
}; };
boot.supportedFilesystems = lib.mkForce [ "btrfs" "cifs" "f2fs" "jfs" "ntfs" "reiserfs" "vfat" "xfs" "bchachefs" ]; boot.supportedFilesystems = lib.mkForce [
"btrfs"
"cifs"
"f2fs"
"jfs"
"ntfs"
"reiserfs"
"vfat"
"xfs"
"bchachefs"
];
#hardware.raspberry-pi."4".fkms-3d.enable = true; #hardware.raspberry-pi."4".fkms-3d.enable = true;

View file

@ -1,4 +1,9 @@
{ modulesPath, lib, nixos-hardware, ... }: {
modulesPath,
lib,
nixos-hardware,
...
}:
{ {
imports = [ imports = [
@ -7,8 +12,12 @@
]; ];
boot = { boot = {
initrd = { availableKernelModules = [ "xhci_pci" ]; }; initrd = {
loader = { generic-extlinux-compatible.enable = true; }; availableKernelModules = [ "xhci_pci" ];
};
loader = {
generic-extlinux-compatible.enable = true;
};
}; };
fileSystems."/" = { fileSystems."/" = {

View file

@ -1,4 +1,9 @@
{ config, pkgs, nixos-hardware, ... }: {
config,
pkgs,
nixos-hardware,
...
}:
{ {
imports = [ imports = [
@ -43,14 +48,18 @@
enable = true; enable = true;
keyMap = "us"; keyMap = "us";
}; };
services.xserver = { layout = "us"; }; services.xserver = {
layout = "us";
};
boot = { boot = {
supportedFilesystems = [ "ntfs" "btrfs" ]; supportedFilesystems = [
"ntfs"
"btrfs"
];
loader = { loader = {
grub.enable = false; grub.enable = false;
generic-extlinux-compatible.enable = true; generic-extlinux-compatible.enable = true;
}; };
}; };
} }

View file

@ -19,10 +19,12 @@
fsType = "vfat"; fsType = "vfat";
}; };
swapDevices = [{ swapDevices = [
{
device = "/var/lib/swapfile"; device = "/var/lib/swapfile";
size = (4 * 1024) + (2 * 1024); size = (4 * 1024) + (2 * 1024);
}]; }
];
networking.wireless.enable = true; networking.wireless.enable = true;
@ -37,4 +39,3 @@
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.enableRedistributableFirmware = true; hardware.enableRedistributableFirmware = true;
} }

View file

@ -1,4 +1,11 @@
{ config, pkgs, lib, modulesPath, self, ... }: {
config,
pkgs,
lib,
modulesPath,
self,
...
}:
{ {
jopejoe1 = { jopejoe1 = {
@ -13,8 +20,7 @@
gui.enable = false; gui.enable = false;
}; };
imports = imports = [
[
(modulesPath + "/profiles/qemu-guest.nix") (modulesPath + "/profiles/qemu-guest.nix")
self.inputs.srvos.nixosModules.server self.inputs.srvos.nixosModules.server
self.inputs.srvos.nixosModules.mixins-cloud-init self.inputs.srvos.nixosModules.mixins-cloud-init
@ -22,7 +28,14 @@
./wp-test.nix ./wp-test.nix
]; ];
boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod" ]; boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
networking.useDHCP = false; networking.useDHCP = false;
@ -70,8 +83,16 @@
networking.firewall = { networking.firewall = {
enable = true; enable = true;
allowedTCPPorts = [ 80 443 8000 ]; allowedTCPPorts = [
allowedUDPPorts = [ 80 443 8000 ]; 80
443
8000
];
allowedUDPPorts = [
80
443
8000
];
}; };
users.users.fp = { users.users.fp = {
@ -88,7 +109,10 @@
services.openssh.settings.PermitRootLogin = lib.mkForce "yes"; services.openssh.settings.PermitRootLogin = lib.mkForce "yes";
services.openssh.ports = [ 8081 22 ]; services.openssh.ports = [
8081
22
];
services.surrealdb.enable = false; services.surrealdb.enable = false;
services.surrealdb.host = "134.255.219.135"; services.surrealdb.host = "134.255.219.135";

View file

@ -1,4 +1,9 @@
{pkgs, config, lib, ...}: {
pkgs,
config,
lib,
...
}:
{ {
services.nginx = { services.nginx = {
@ -100,16 +105,27 @@
systemd.services = systemd.services =
let let
secretsVars = [ "AUTH_KEY" "SECURE_AUTH_KEY" "LOGGED_IN_KEY" "NONCE_KEY" "AUTH_SALT" "SECURE_AUTH_SALT" "LOGGED_IN_SALT" "NONCE_SALT" ]; secretsVars = [
"AUTH_KEY"
"SECURE_AUTH_KEY"
"LOGGED_IN_KEY"
"NONCE_KEY"
"AUTH_SALT"
"SECURE_AUTH_SALT"
"LOGGED_IN_SALT"
"NONCE_SALT"
];
secretsScript = hostStateDir: '' secretsScript = hostStateDir: ''
# The match in this line is not a typo, see https://github.com/NixOS/nixpkgs/pull/124839 # The match in this line is not a typo, see https://github.com/NixOS/nixpkgs/pull/124839
grep -q "LOOGGED_IN_KEY" "${hostStateDir}/secret-keys.php" && rm "${hostStateDir}/secret-keys.php" grep -q "LOOGGED_IN_KEY" "${hostStateDir}/secret-keys.php" && rm "${hostStateDir}/secret-keys.php"
if ! test -e "${hostStateDir}/secret-keys.php"; then if ! test -e "${hostStateDir}/secret-keys.php"; then
umask 0177 umask 0177
echo "<?php" >> "${hostStateDir}/secret-keys.php" echo "<?php" >> "${hostStateDir}/secret-keys.php"
${lib.concatMapStringsSep "\n" (var: '' ${
lib.concatMapStringsSep "\n" (var: ''
echo "define('${var}', '`tr -dc a-zA-Z0-9 </dev/urandom | head -c 64`');" >> "${hostStateDir}/secret-keys.php" echo "define('${var}', '`tr -dc a-zA-Z0-9 </dev/urandom | head -c 64`');" >> "${hostStateDir}/secret-keys.php"
'') secretsVars} '') secretsVars
}
echo "?>" >> "${hostStateDir}/secret-keys.php" echo "?>" >> "${hostStateDir}/secret-keys.php"
chmod 440 "${hostStateDir}/secret-keys.php" chmod 440 "${hostStateDir}/secret-keys.php"
fi fi

View file

@ -1,7 +1,5 @@
{ self, ... }: { self, ... }:
{ {
imports = [ imports = [ ./modules ];
./modules
];
} }

View file

@ -1,6 +1,5 @@
{ self, ... }: { self, ... }:
{ {
imports = [ imports = [ ];
];
} }

View file

@ -1,6 +1,5 @@
{ self, ... }: { self, ... }:
{ {
imports = [ imports = [ ];
];
} }