From d5cbe31c02dc3692f418d39cd875ec03696b524f Mon Sep 17 00:00:00 2001 From: jopejoe1 Date: Wed, 10 Jul 2024 23:02:54 +0200 Subject: [PATCH] run nix fmt --- flake.nix | 30 +- home-modules/common/default.nix | 7 +- home-modules/direnv/default.nix | 8 +- home-modules/firefox/default.nix | 426 ++++++++++--------- home-modules/git/default.nix | 21 +- home-modules/gpg/default.nix | 15 +- home-modules/nushell/default.nix | 15 +- modules/asf/default.nix | 11 +- modules/audio/default.nix | 76 ++-- modules/audio/sennheiser-hd660s.nix | 354 +++++++-------- modules/auto-update/default.nix | 19 +- modules/bluetooth/default.nix | 6 +- modules/boot/default.nix | 4 +- modules/boot/systemd/default.nix | 6 +- modules/doc/default.nix | 18 +- modules/events/37c3/default.nix | 13 +- modules/keyboard/default.nix | 14 +- modules/kodi/default.nix | 18 +- modules/local/default.nix | 22 +- modules/minecraft-server/default.nix | 9 +- modules/moodle-dl/default.nix | 21 +- modules/nix/default.nix | 89 ++-- modules/plasma/default.nix | 11 +- modules/printing/default.nix | 14 +- modules/repo-sync/default.nix | 21 +- modules/ssh/default.nix | 19 +- modules/steam/default.nix | 22 +- modules/sway/default.nix | 7 +- modules/users/default.nix | 5 +- modules/users/jopejoe1/default.nix | 37 +- modules/users/root/default.nix | 11 +- modules/zerotierone/default.nix | 18 +- packages/default.nix | 52 +-- packages/kde-hdr.nix | 9 +- packages/kde-wallpaper.nix | 4 +- systems/benzaiten/default.nix | 21 +- systems/benzaiten/hardware-configuration.nix | 13 +- systems/default.nix | 50 ++- systems/ebisu/default.nix | 5 +- systems/ebisu/hardware-configuration.nix | 13 +- systems/hetzner/bind.nix | 12 +- systems/hetzner/default.nix | 13 +- systems/hetzner/mail.nix | 70 ++- systems/hetzner/matrix.nix | 11 +- systems/hetzner/nginx.nix | 66 +-- systems/hetzner/radicale.nix | 18 +- systems/kamimusubi/default.nix | 12 +- systems/kuraokami/default.nix | 72 ++-- systems/kuraokami/hardware.nix | 27 +- systems/omoikane/default.nix | 21 +- systems/omoikane/hardware.nix | 47 +- systems/pi4/default.nix | 15 +- systems/raspberry4/default.nix | 24 +- systems/sukuna-biko-na/default.nix | 15 +- systems/yokai/default.nix | 17 +- systems/yokai/hardware.nix | 11 +- systems/zap/default.nix | 56 ++- systems/zap/wp-test.nix | 78 ++-- upstream/default.nix | 4 +- upstream/modules/default.nix | 3 +- upstream/pkgs/default.nix | 3 +- 61 files changed, 1299 insertions(+), 830 deletions(-) diff --git a/flake.nix b/flake.nix index c80ad36..4d84da1 100644 --- a/flake.nix +++ b/flake.nix @@ -43,7 +43,6 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - # Packages tela-icon-theme = { url = "github:vinceliuice/Tela-icon-theme"; @@ -67,18 +66,21 @@ }; }; - outputs = inputs@{ self, nixpkgs, ... }: { - nixosModules.default = import ./modules; - homeManagerModules.default = import ./home-modules; - nixosConfigurations = import ./systems { - inherit self inputs nixpkgs; + outputs = + inputs@{ self, nixpkgs, ... }: + { + nixosModules.default = import ./modules; + homeManagerModules.default = import ./home-modules; + nixosConfigurations = import ./systems { inherit self inputs nixpkgs; }; + packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed ( + system: + import ./packages { + inherit system inputs; + pkgs = nixpkgs.legacyPackages.${system}; + } + ); + formatter = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed ( + system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style + ); }; - packages = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: import ./packages { - inherit system inputs; - pkgs = nixpkgs.legacyPackages.${system}; - }); - formatter = nixpkgs.lib.attrsets.genAttrs nixpkgs.lib.systems.flakeExposed (system: - nixpkgs.legacyPackages.${system}.nixfmt-rfc-style - ); - }; } diff --git a/home-modules/common/default.nix b/home-modules/common/default.nix index 1769843..4aded03 100644 --- a/home-modules/common/default.nix +++ b/home-modules/common/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.common; -in { +let + cfg = config.jopejoe1.common; +in +{ options.jopejoe1.common = { enable = lib.mkEnableOption "Enable Common Homanger settings"; gui = lib.mkEnableOption "Graphical programms"; @@ -63,4 +65,3 @@ in { }; }; } - diff --git a/home-modules/direnv/default.nix b/home-modules/direnv/default.nix index e58ef09..749b00a 100644 --- a/home-modules/direnv/default.nix +++ b/home-modules/direnv/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.direnv; -in { +let + cfg = config.jopejoe1.direnv; +in +{ options.jopejoe1.direnv = { enable = lib.mkEnableOption "Enable direnv"; }; @@ -13,5 +15,3 @@ in { }; }; } - - diff --git a/home-modules/firefox/default.nix b/home-modules/firefox/default.nix index 5b9f40f..47b2aad 100644 --- a/home-modules/firefox/default.nix +++ b/home-modules/firefox/default.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, inputs, ... }: +{ + config, + lib, + pkgs, + inputs, + ... +}: let cfg = config.jopejoe1.firefox; @@ -6,7 +12,8 @@ let Value = value; Status = "locked"; }; -in { +in +{ options.jopejoe1.firefox = { enable = lib.mkEnableOption "Enable Firefox"; }; @@ -90,68 +97,70 @@ in { }; Preferences = { "privacy.resistFingerprinting" = lock true; - "privacy.trackingprotection.fingerprinting.enabled" = lock true; - "privacy.trackingprotection.cryptomining.enabled" = lock true; - "dom.event.clipboardevents.enabled" = lock false; - "dom.battery.enabled" = lock false; - "browser.safebrowsing.phishing.enabled" = lock false; - "browser.safebrowsing.malware.enabled" = lock false; - "browser.zoom.siteSpecific" = lock true; - "config.trim_on_minimize" = lock true; - "pdfjs.annotationEditorMode" = lock 0; - "pdfjs.annotationMode" = lock 2; - "font.name-list.emoji" = lock (lib.strings.concatStringsSep ", " config.jopejoe1.common.fonts.emoji); + "privacy.trackingprotection.fingerprinting.enabled" = lock true; + "privacy.trackingprotection.cryptomining.enabled" = lock true; + "dom.event.clipboardevents.enabled" = lock false; + "dom.battery.enabled" = lock false; + "browser.safebrowsing.phishing.enabled" = lock false; + "browser.safebrowsing.malware.enabled" = lock false; + "browser.zoom.siteSpecific" = lock true; + "config.trim_on_minimize" = lock true; + "pdfjs.annotationEditorMode" = lock 0; + "pdfjs.annotationMode" = lock 2; + "font.name-list.emoji" = lock ( + lib.strings.concatStringsSep ", " config.jopejoe1.common.fonts.emoji + ); - # Theming - "widget.gtk.overlay-scrollbars.enabled" = lock false; + # Theming + "widget.gtk.overlay-scrollbars.enabled" = lock false; - ## Arkenfox Stuff - "browser.aboutConfig.showWarning" = lock false; - "browser.newtabpage.activity-stream.showSponsored" = lock false; - "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock false; - "extensions.getAddons.showPane" = lock false; - "extensions.htmlaboutaddons.recommendations.enabled" = lock false; - "browser.discovery.enabled" = lock false; - "browser.shopping.experience2023.enabled" = lock false; - "datareporting.policy.dataSubmissionEnabled" = lock false; - "datareporting.healthreport.uploadEnabled" = lock false; - "toolkit.telemetry.unified" = lock false; - "toolkit.telemetry.enabled" = lock false; - "toolkit.telemetry.server" = lock "data:,"; - "toolkit.telemetry.archive.enabled" = lock false; - "toolkit.telemetry.newProfilePing.enabled" = lock false; - "toolkit.telemetry.shutdownPingSender.enabled" = lock false; - "toolkit.telemetry.updatePing.enabled" = lock false; - "toolkit.telemetry.bhrPing.enabled" = lock false; - "toolkit.telemetry.firstShutdownPing.enabled" = lock false; - "toolkit.telemetry.coverage.opt-out" = lock true; - "toolkit.coverage.opt-out" = lock true; - "toolkit.coverage.endpoint.base" = lock ""; - "browser.ping-centre.telemetry" = lock false; - "browser.newtabpage.activity-stream.feeds.telemetry" = lock false; - "browser.newtabpage.activity-stream.telemetry" = lock false; - "app.shield.optoutstudies.enabled" = lock false; - "app.normandy.enabled" = lock false; - "app.normandy.api_url" = lock ""; - "breakpad.reportURL" = lock ""; - "browser.tabs.crashReporting.sendReport" = lock false; - "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock false; - "captivedetect.canonicalURL" = lock ""; - "network.captive-portal-service.enabled" = lock false; - "network.connectivity-service.enabled" = lock false; - "network.prefetch-next" = lock false; - "network.dns.disablePrefetch" = lock true; - "network.predictor.enabled" = lock false; - "network.predictor.enable-prefetch" = lock false; - "network.http.speculative-parallel-limit" = lock 0; - "browser.places.speculativeConnect.enabled" = lock false; - "browser.urlbar.speculativeConnect.enabled" = lock false; - "browser.urlbar.suggest.quicksuggest.nonsponsored" = lock false; - "browser.urlbar.suggest.quicksuggest.sponsored" = lock false; - "browser.formfill.enable" = lock false; - "browser.download.start_downloads_in_tmp_dir" = lock true; - "browser.uitour.enabled" = lock false; - "browser.tabs.inTitlebar" = lock 0; + ## Arkenfox Stuff + "browser.aboutConfig.showWarning" = lock false; + "browser.newtabpage.activity-stream.showSponsored" = lock false; + "browser.newtabpage.activity-stream.showSponsoredTopSites" = lock false; + "extensions.getAddons.showPane" = lock false; + "extensions.htmlaboutaddons.recommendations.enabled" = lock false; + "browser.discovery.enabled" = lock false; + "browser.shopping.experience2023.enabled" = lock false; + "datareporting.policy.dataSubmissionEnabled" = lock false; + "datareporting.healthreport.uploadEnabled" = lock false; + "toolkit.telemetry.unified" = lock false; + "toolkit.telemetry.enabled" = lock false; + "toolkit.telemetry.server" = lock "data:,"; + "toolkit.telemetry.archive.enabled" = lock false; + "toolkit.telemetry.newProfilePing.enabled" = lock false; + "toolkit.telemetry.shutdownPingSender.enabled" = lock false; + "toolkit.telemetry.updatePing.enabled" = lock false; + "toolkit.telemetry.bhrPing.enabled" = lock false; + "toolkit.telemetry.firstShutdownPing.enabled" = lock false; + "toolkit.telemetry.coverage.opt-out" = lock true; + "toolkit.coverage.opt-out" = lock true; + "toolkit.coverage.endpoint.base" = lock ""; + "browser.ping-centre.telemetry" = lock false; + "browser.newtabpage.activity-stream.feeds.telemetry" = lock false; + "browser.newtabpage.activity-stream.telemetry" = lock false; + "app.shield.optoutstudies.enabled" = lock false; + "app.normandy.enabled" = lock false; + "app.normandy.api_url" = lock ""; + "breakpad.reportURL" = lock ""; + "browser.tabs.crashReporting.sendReport" = lock false; + "browser.crashReports.unsubmittedCheck.autoSubmit2" = lock false; + "captivedetect.canonicalURL" = lock ""; + "network.captive-portal-service.enabled" = lock false; + "network.connectivity-service.enabled" = lock false; + "network.prefetch-next" = lock false; + "network.dns.disablePrefetch" = lock true; + "network.predictor.enabled" = lock false; + "network.predictor.enable-prefetch" = lock false; + "network.http.speculative-parallel-limit" = lock 0; + "browser.places.speculativeConnect.enabled" = lock false; + "browser.urlbar.speculativeConnect.enabled" = lock false; + "browser.urlbar.suggest.quicksuggest.nonsponsored" = lock false; + "browser.urlbar.suggest.quicksuggest.sponsored" = lock false; + "browser.formfill.enable" = lock false; + "browser.download.start_downloads_in_tmp_dir" = lock true; + "browser.uitour.enabled" = lock false; + "browser.tabs.inTitlebar" = lock 0; }; "3rdparty" = { Extensions = { @@ -162,43 +171,43 @@ in { uiAccentCustom0 = "#b4befe"; cloudStorageEnabled = false; }; - selectedFilterLists = [ - "adguard-generic" - "adguard-annoyance" - "adguard-cookies" - "adguard-social" - "adguard-spyware" - "adguard-spyware-url" - "adguard-popup-overlays" - "adguard-other-annoyances" - "adguard-widgets" - "block-lan" - "curben-phishing" - "dpollock-0" - "easylist" - "easylist-chat" - "easylist-newsletters" - "easylist-notifications" - "easylist-annoyances" - "easyprivacy" - "fanboy-cookiemonster" - "fanboy-social" - "fanboy-thirdparty_social" - "FIN-0" - "plowe-0" - "ublock-abuse" - "ublock-badware" - "ublock-cookies-adguard" - "ublock-cookies-easylist" - "ublock-filters" - "ublock-privacy" - "ublock-quick-fixes" - "ublock-unbreak" - "ublock-annoyances" - "urlhaus-1" - ]; - }; - filters = [''stackoverflow.com##.sm\:fd-column.flex__allitems6.d-flex.mx-auto.wmx9'']; + selectedFilterLists = [ + "adguard-generic" + "adguard-annoyance" + "adguard-cookies" + "adguard-social" + "adguard-spyware" + "adguard-spyware-url" + "adguard-popup-overlays" + "adguard-other-annoyances" + "adguard-widgets" + "block-lan" + "curben-phishing" + "dpollock-0" + "easylist" + "easylist-chat" + "easylist-newsletters" + "easylist-notifications" + "easylist-annoyances" + "easyprivacy" + "fanboy-cookiemonster" + "fanboy-social" + "fanboy-thirdparty_social" + "FIN-0" + "plowe-0" + "ublock-abuse" + "ublock-badware" + "ublock-cookies-adguard" + "ublock-cookies-easylist" + "ublock-filters" + "ublock-privacy" + "ublock-quick-fixes" + "ublock-unbreak" + "ublock-annoyances" + "urlhaus-1" + ]; + }; + filters = [ ''stackoverflow.com##.sm\:fd-column.flex__allitems6.d-flex.mx-auto.wmx9'' ]; }; }; }; @@ -239,138 +248,162 @@ in { force = true; engines = { "Nix Packages" = { - urls = [{ - template = "https://search.nixos.org/packages"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - }]; + urls = [ + { + template = "https://search.nixos.org/packages"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@np" ]; }; "NixOS Modules" = { - urls = [{ - template = "https://search.nixos.org/options"; - params = [ - { - name = "type"; - value = "packages"; - } - { - name = "channel"; - value = "unstable"; - } - { - name = "query"; - value = "{searchTerms}"; - } - ]; - }]; + urls = [ + { + template = "https://search.nixos.org/options"; + params = [ + { + name = "type"; + value = "packages"; + } + { + name = "channel"; + value = "unstable"; + } + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@nm" ]; }; "Home Manager Modules" = { - urls = [{ - template = "https://home-manager-options.extranix.com/"; - params = [ - { - name = "query"; - value = "{searchTerms}"; - } - { - name = "release"; - value = "master"; - } - ]; - }]; + urls = [ + { + template = "https://home-manager-options.extranix.com/"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + { + name = "release"; + value = "master"; + } + ]; + } + ]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; definedAliases = [ "@hm" ]; }; "Repology" = { - urls = [{ - template = "https://repology.org/projects"; - params = [ - { - name = "search"; - value = "{searchTerms}"; - } - ]; - }]; + urls = [ + { + template = "https://repology.org/projects"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; iconUpdateURL = "https://raw.githubusercontent.com/repology/repology-webapp/master/repologyapp/static/repology40x40.v1.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@repo" ]; }; "NixOS Wiki" = { - urls = [{ - template = "https://wiki.nixos.org/w/index.php"; - params = [{ - name = "search"; - value = "{searchTerms}"; - }]; - }]; + urls = [ + { + template = "https://wiki.nixos.org/w/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; icon = "${config.programs.firefox.profiles.default.search.engines."Nix Packages".icon}"; definedAliases = [ "@nw" ]; }; "Arch Wiki" = { - urls = [{ - template = "https://wiki.archlinux.org/index.php"; - params = [{ - name = "search"; - value = "{searchTerms}"; - }]; - }]; + urls = [ + { + template = "https://wiki.archlinux.org/index.php"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; iconUpdateURL = "https://upload.wikimedia.org/wikipedia/commons/1/13/Arch_Linux_%22Crystal%22_icon.svg"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@arch" ]; }; "Minecraft Wiki" = { - urls = [{ - template = "https://minecraft.wiki/"; - params = [{ - name = "search"; - value = "{searchTerms}"; - }]; - }]; + urls = [ + { + template = "https://minecraft.wiki/"; + params = [ + { + name = "search"; + value = "{searchTerms}"; + } + ]; + } + ]; iconUpdateURL = "https://minecraft.wiki/images/Wiki.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@mc" ]; }; "Warframe Wiki" = { - urls = [{ - template = - "https://warframe.fandom.com/wiki/Special:Search"; - params = [{ - name = "query"; - value = "{searchTerms}"; - }]; - }]; - iconUpdateURL = - "https://static.wikia.nocookie.net/warframe/images/e/e6/Site-logo.png"; + urls = [ + { + template = "https://warframe.fandom.com/wiki/Special:Search"; + params = [ + { + name = "query"; + value = "{searchTerms}"; + } + ]; + } + ]; + iconUpdateURL = "https://static.wikia.nocookie.net/warframe/images/e/e6/Site-logo.png"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@wf" ]; }; "DuckDuckGo" = { - urls = [{ - template = - "https://duckduckgo.com"; - params = [{ - name = "q"; - value = "{searchTerms}"; - }]; - }]; - iconUpdateURL = - "https://duckduckgo.com/assets/logo_header.v109.svg"; + urls = [ + { + template = "https://duckduckgo.com"; + params = [ + { + name = "q"; + value = "{searchTerms}"; + } + ]; + } + ]; + iconUpdateURL = "https://duckduckgo.com/assets/logo_header.v109.svg"; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "ddg" ]; }; @@ -395,4 +428,3 @@ in { }; }; } - diff --git a/home-modules/git/default.nix b/home-modules/git/default.nix index 4dee9a0..af6723f 100644 --- a/home-modules/git/default.nix +++ b/home-modules/git/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.git; -in { +let + cfg = config.jopejoe1.git; +in +{ options.jopejoe1.git = { enable = lib.mkEnableOption "Enable Git"; }; @@ -15,11 +22,13 @@ in { userName = "jopejoe1"; extraConfig = { core = { - whitespace = [ "blank-at-eol" "blank-at-eof" "space-before-tab" ]; + whitespace = [ + "blank-at-eol" + "blank-at-eof" + "space-before-tab" + ]; }; }; }; }; } - - diff --git a/home-modules/gpg/default.nix b/home-modules/gpg/default.nix index 48b817b..05e1992 100644 --- a/home-modules/gpg/default.nix +++ b/home-modules/gpg/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.gpg; -in { +let + cfg = config.jopejoe1.gpg; +in +{ options.jopejoe1.gpg = { enable = lib.mkEnableOption "Enable Nushell"; }; @@ -15,5 +22,3 @@ in { }; }; } - - diff --git a/home-modules/nushell/default.nix b/home-modules/nushell/default.nix index 241960d..ce1d709 100644 --- a/home-modules/nushell/default.nix +++ b/home-modules/nushell/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.nushell; -in { +let + cfg = config.jopejoe1.nushell; +in +{ options.jopejoe1.nushell = { enable = lib.mkEnableOption "Enable Nushell"; }; @@ -28,5 +35,3 @@ in { }; }; } - - diff --git a/modules/asf/default.nix b/modules/asf/default.nix index e6f921f..a8c9377 100644 --- a/modules/asf/default.nix +++ b/modules/asf/default.nix @@ -1,8 +1,12 @@ { config, lib, ... }: -let cfg = config.jopejoe1.asf; -in { - options.jopejoe1.asf = { enable = lib.mkEnableOption "Enable ASF"; }; +let + cfg = config.jopejoe1.asf; +in +{ + options.jopejoe1.asf = { + enable = lib.mkEnableOption "Enable ASF"; + }; config = lib.mkIf cfg.enable { services.archisteamfarm = { @@ -27,4 +31,3 @@ in { }; }; } - diff --git a/modules/audio/default.nix b/modules/audio/default.nix index d131a9d..13c0e7e 100644 --- a/modules/audio/default.nix +++ b/modules/audio/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.audio; -in { +let + cfg = config.jopejoe1.audio; +in +{ options.jopejoe1.audio = { enable = lib.mkEnableOption "Enable Audio"; sennheiser-hd-660s = lib.mkEnableOption "Equalizer for Sennheiser HD 660S"; @@ -23,37 +30,40 @@ in { wireplumber.enable = true; extraConfig.pipewire."30-noise-filter" = { - "context.modules" = [{ - name = "libpipewire-module-filter-chain"; - args = { - "node.description" = "Noise Canceling source"; - "media.name" = "Noise Canceling source"; - "filter.graph" = { - nodes = [{ - type = "ladspa"; - name = "rnnoise"; - plugin = - "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; - label = "noise_suppressor_mono"; - control = { - "VAD Threshold (%)" = 50.0; - #"VAD Grace Period (ms)" = 0; - "Retroactive VAD Grace (ms)" = 50; - }; - }]; + "context.modules" = [ + { + name = "libpipewire-module-filter-chain"; + args = { + "node.description" = "Noise Canceling source"; + "media.name" = "Noise Canceling source"; + "filter.graph" = { + nodes = [ + { + type = "ladspa"; + name = "rnnoise"; + plugin = "${pkgs.rnnoise-plugin}/lib/ladspa/librnnoise_ladspa.so"; + label = "noise_suppressor_mono"; + control = { + "VAD Threshold (%)" = 50.0; + #"VAD Grace Period (ms)" = 0; + "Retroactive VAD Grace (ms)" = 50; + }; + } + ]; + }; + "capture.props" = { + "node.name" = "capture.rnnoise_source"; + "node.passive" = true; + "audio.rate" = 48000; + }; + "playback.props" = { + "node.name" = "rnnoise_source"; + "media.class" = "Audio/Source"; + "audio.rate" = 48000; + }; }; - "capture.props" = { - "node.name" = "capture.rnnoise_source"; - "node.passive" = true; - "audio.rate" = 48000; - }; - "playback.props" = { - "node.name" = "rnnoise_source"; - "media.class" = "Audio/Source"; - "audio.rate" = 48000; - }; - }; - }]; + } + ]; }; }; }; diff --git a/modules/audio/sennheiser-hd660s.nix b/modules/audio/sennheiser-hd660s.nix index f409078..418c35e 100644 --- a/modules/audio/sennheiser-hd660s.nix +++ b/modules/audio/sennheiser-hd660s.nix @@ -1,185 +1,191 @@ { config, lib, ... }: -let cfg = config.jopejoe1.audio; -in { +let + cfg = config.jopejoe1.audio; +in +{ config = lib.mkIf cfg.sennheiser-hd-660s { services.pipewire = { extraConfig.pipewire."20-Senheiser-HD660S" = { - "context.modules" = [{ - name = "libpipewire-module-filter-chain"; - args = { - "node.description" = "Senheiser HD 660 S Equaliser"; - "media.name" = "Senheiser HD 660 S Equaliser"; - "filter.graph" = { - nodes = [ - { - type = "builtin"; - name = "eq_band_1"; - label = "bq_highshelf"; - control = { - "Freq" = 0.0; - "Q" = 1.0; - "Gain" = -6.4; - }; - } - { - type = "builtin"; - name = "eq_band_2"; - label = "bq_lowshelf"; - control = { - "Freq" = 105.0; - "Q" = 0.7; - "Gain" = 6.5; - }; - } - { - type = "builtin"; - name = "eq_band_3"; - label = "bq_peaking"; - control = { - "Freq" = 178.0; - "Q" = 0.49; - "Gain" = -3.2; - }; - } - { - type = "builtin"; - name = "eq_band_4"; - label = "bq_peaking"; - control = { - "Freq" = 1222.0; - "Q" = 2.34; - "Gain" = -2.3; - }; - } - { - type = "builtin"; - name = "eq_band_5"; - label = "bq_peaking"; - control = { - "Freq" = 5470.0; - "Q" = 4.4; - "Gain" = -7.3; - }; - } - { - type = "builtin"; - name = "eq_band_6"; - label = "bq_peaking"; - control = { - "Freq" = 7899.0; - "Q" = 0.68; - "Gain" = 6.5; - }; - } - { - type = "builtin"; - name = "eq_band_7"; - label = "bq_peaking"; - control = { - "Freq" = 784.0; - "Q" = 3.52; - "Gain" = -0.4; - }; - } - { - type = "builtin"; - name = "eq_band_8"; - label = "bq_peaking"; - control = { - "Freq" = 2250.0; - "Q" = 3.58; - "Gain" = 1.3; - }; - } - { - type = "builtin"; - name = "eq_band_9"; - label = "bq_peaking"; - control = { - "Freq" = 3380.0; - "Q" = 2.84; - "Gain" = -0.9; - }; - } - { - type = "builtin"; - name = "eq_band_10"; - label = "bq_peaking"; - control = { - "Freq" = 6701.0; - "Q" = 6.0; - "Gain" = 1.2; - }; - } - { - type = "builtin"; - name = "eq_band_11"; - label = "bq_highshelf"; - control = { - "Freq" = 10000.0; - "Q" = 0.7; - "Gain" = -1.1; - }; - } - ]; - links = [ - { - output = "eq_band_1:Out"; - input = "eq_band_2:In"; - } - { - output = "eq_band_2:Out"; - input = "eq_band_3:In"; - } - { - output = "eq_band_3:Out"; - input = "eq_band_4:In"; - } - { - output = "eq_band_4:Out"; - input = "eq_band_5:In"; - } - { - output = "eq_band_5:Out"; - input = "eq_band_6:In"; - } - { - output = "eq_band_6:Out"; - input = "eq_band_7:In"; - } - { - output = "eq_band_7:Out"; - input = "eq_band_8:In"; - } - { - output = "eq_band_8:Out"; - input = "eq_band_9:In"; - } - { - output = "eq_band_9:Out"; - input = "eq_band_10:In"; - } - { - output = "eq_band_10:Out"; - input = "eq_band_11:In"; - } + "context.modules" = [ + { + name = "libpipewire-module-filter-chain"; + args = { + "node.description" = "Senheiser HD 660 S Equaliser"; + "media.name" = "Senheiser HD 660 S Equaliser"; + "filter.graph" = { + nodes = [ + { + type = "builtin"; + name = "eq_band_1"; + label = "bq_highshelf"; + control = { + "Freq" = 0.0; + "Q" = 1.0; + "Gain" = -6.4; + }; + } + { + type = "builtin"; + name = "eq_band_2"; + label = "bq_lowshelf"; + control = { + "Freq" = 105.0; + "Q" = 0.7; + "Gain" = 6.5; + }; + } + { + type = "builtin"; + name = "eq_band_3"; + label = "bq_peaking"; + control = { + "Freq" = 178.0; + "Q" = 0.49; + "Gain" = -3.2; + }; + } + { + type = "builtin"; + name = "eq_band_4"; + label = "bq_peaking"; + control = { + "Freq" = 1222.0; + "Q" = 2.34; + "Gain" = -2.3; + }; + } + { + type = "builtin"; + name = "eq_band_5"; + label = "bq_peaking"; + control = { + "Freq" = 5470.0; + "Q" = 4.4; + "Gain" = -7.3; + }; + } + { + type = "builtin"; + name = "eq_band_6"; + label = "bq_peaking"; + control = { + "Freq" = 7899.0; + "Q" = 0.68; + "Gain" = 6.5; + }; + } + { + type = "builtin"; + name = "eq_band_7"; + label = "bq_peaking"; + control = { + "Freq" = 784.0; + "Q" = 3.52; + "Gain" = -0.4; + }; + } + { + type = "builtin"; + name = "eq_band_8"; + label = "bq_peaking"; + control = { + "Freq" = 2250.0; + "Q" = 3.58; + "Gain" = 1.3; + }; + } + { + type = "builtin"; + name = "eq_band_9"; + label = "bq_peaking"; + control = { + "Freq" = 3380.0; + "Q" = 2.84; + "Gain" = -0.9; + }; + } + { + type = "builtin"; + name = "eq_band_10"; + label = "bq_peaking"; + control = { + "Freq" = 6701.0; + "Q" = 6.0; + "Gain" = 1.2; + }; + } + { + type = "builtin"; + name = "eq_band_11"; + label = "bq_highshelf"; + control = { + "Freq" = 10000.0; + "Q" = 0.7; + "Gain" = -1.1; + }; + } + ]; + links = [ + { + output = "eq_band_1:Out"; + input = "eq_band_2:In"; + } + { + output = "eq_band_2:Out"; + input = "eq_band_3:In"; + } + { + output = "eq_band_3:Out"; + input = "eq_band_4:In"; + } + { + output = "eq_band_4:Out"; + input = "eq_band_5:In"; + } + { + output = "eq_band_5:Out"; + input = "eq_band_6:In"; + } + { + output = "eq_band_6:Out"; + input = "eq_band_7:In"; + } + { + output = "eq_band_7:Out"; + input = "eq_band_8:In"; + } + { + output = "eq_band_8:Out"; + input = "eq_band_9:In"; + } + { + output = "eq_band_9:Out"; + input = "eq_band_10:In"; + } + { + output = "eq_band_10:Out"; + input = "eq_band_11:In"; + } + ]; + }; + "audio.channels" = 2; + "audio.position" = [ + "FL" + "FR" ]; + "capture.props" = { + "node.name" = "effect_input.eq11"; + "media.class" = "Audio/Sink"; + }; + "playback.props" = { + "node.name" = "effect_output.eq11"; + "node.passive" = true; + }; }; - "audio.channels" = 2; - "audio.position" = [ "FL" "FR" ]; - "capture.props" = { - "node.name" = "effect_input.eq11"; - "media.class" = "Audio/Sink"; - }; - "playback.props" = { - "node.name" = "effect_output.eq11"; - "node.passive" = true; - }; - }; - }]; + } + ]; }; }; }; } - diff --git a/modules/auto-update/default.nix b/modules/auto-update/default.nix index a55dbd7..3ebf87f 100644 --- a/modules/auto-update/default.nix +++ b/modules/auto-update/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.auto-update; -in { +let + cfg = config.jopejoe1.auto-update; +in +{ options.jopejoe1.auto-update = { enable = lib.mkEnableOption "Enable Auto-Updates"; }; @@ -12,11 +19,7 @@ in { randomizedDelaySec = "30min"; flake = if config.services.archisteamfarm.enable then - "$(${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" + "$(${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" else "github:jopejoe1/nix-conf"; dates = "hourly"; diff --git a/modules/bluetooth/default.nix b/modules/bluetooth/default.nix index a88e56d..8f0beb2 100644 --- a/modules/bluetooth/default.nix +++ b/modules/bluetooth/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.bluetooth; -in { +let + cfg = config.jopejoe1.bluetooth; +in +{ options.jopejoe1.bluetooth = { enable = lib.mkEnableOption "Enable Bluetooth"; }; diff --git a/modules/boot/default.nix b/modules/boot/default.nix index 469f0e3..8d866ea 100644 --- a/modules/boot/default.nix +++ b/modules/boot/default.nix @@ -1,7 +1,5 @@ { ... }: { - imports = [ - ./systemd - ]; + imports = [ ./systemd ]; } diff --git a/modules/boot/systemd/default.nix b/modules/boot/systemd/default.nix index c97c11e..d205795 100644 --- a/modules/boot/systemd/default.nix +++ b/modules/boot/systemd/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.boot.systemd; -in { +let + cfg = config.jopejoe1.boot.systemd; +in +{ options.jopejoe1.boot.systemd = { enable = lib.mkEnableOption "Enable Systemd boot"; }; diff --git a/modules/doc/default.nix b/modules/doc/default.nix index 0bfba2b..41936a1 100644 --- a/modules/doc/default.nix +++ b/modules/doc/default.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, self, ... }: +{ + config, + lib, + pkgs, + self, + ... +}: -let cfg = config.jopejoe1.doc; -in { - options.jopejoe1.doc = { enable = lib.mkEnableOption "Enable Documentation"; }; +let + cfg = config.jopejoe1.doc; +in +{ + options.jopejoe1.doc = { + enable = lib.mkEnableOption "Enable Documentation"; + }; config = lib.mkIf cfg.enable { documentation = { diff --git a/modules/events/37c3/default.nix b/modules/events/37c3/default.nix index 857e1db..02c4c55 100644 --- a/modules/events/37c3/default.nix +++ b/modules/events/37c3/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.events."37c3"; -in { +let + cfg = config.events."37c3"; +in +{ options.events."37c3" = { enable = lib.mkEnableOption "Enable settings for the 37c3 event"; }; @@ -29,7 +31,9 @@ in { password = "37C3"; phase2-auth = "mschapv2"; }; - ipv4 = { method = "auto"; }; + ipv4 = { + method = "auto"; + }; ipv6 = { addr-gen-mode = "default"; method = "auto"; @@ -43,8 +47,7 @@ in { ca_cert="${ builtins.fetchurl { url = "https://letsencrypt.org/certs/isrgrootx1.pem"; - sha256 = - "sha256:1la36n2f31j9s03v847ig6ny9lr875q3g7smnq33dcsmf2i5gd92"; + sha256 = "sha256:1la36n2f31j9s03v847ig6ny9lr875q3g7smnq33dcsmf2i5gd92"; } }" altsubject_match="DNS:radius.c3noc.net" diff --git a/modules/keyboard/default.nix b/modules/keyboard/default.nix index 8feb2ec..6044e98 100644 --- a/modules/keyboard/default.nix +++ b/modules/keyboard/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.keyboard; -in { +let + cfg = config.jopejoe1.keyboard; +in +{ options.jopejoe1.keyboard = { enable = lib.mkEnableOption "Enable Keyboard"; layout = lib.mkOption { @@ -23,4 +30,3 @@ in { }; }; } - diff --git a/modules/kodi/default.nix b/modules/kodi/default.nix index 60070f5..d222b19 100644 --- a/modules/kodi/default.nix +++ b/modules/kodi/default.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, self, ... }: +{ + config, + lib, + pkgs, + self, + ... +}: -let cfg = config.jopejoe1.kodi; -in { - options.jopejoe1.kodi = { enable = lib.mkEnableOption "Enable Kodi"; }; +let + cfg = config.jopejoe1.kodi; +in +{ + options.jopejoe1.kodi = { + enable = lib.mkEnableOption "Enable Kodi"; + }; config = lib.mkIf cfg.enable { environment.systemPackages = [ pkgs.kodi-wayland ]; diff --git a/modules/local/default.nix b/modules/local/default.nix index 764c18e..3ebf0ca 100644 --- a/modules/local/default.nix +++ b/modules/local/default.nix @@ -1,8 +1,17 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.local; -in { - options.jopejoe1.local = { enable = lib.mkEnableOption "Enable Locals"; }; +let + cfg = config.jopejoe1.local; +in +{ + options.jopejoe1.local = { + enable = lib.mkEnableOption "Enable Locals"; + }; config = lib.mkIf cfg.enable { xdg = { @@ -35,9 +44,10 @@ in { }; }; - environment.variables = { LOG_ICONS = "true"; }; + environment.variables = { + LOG_ICONS = "true"; + }; fonts.fontDir.enable = true; }; } - diff --git a/modules/minecraft-server/default.nix b/modules/minecraft-server/default.nix index d9c5505..bb20990 100644 --- a/modules/minecraft-server/default.nix +++ b/modules/minecraft-server/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.minecraft-server; -in { +let + cfg = config.jopejoe1.minecraft-server; +in +{ options.jopejoe1.minecraft-server = { enable = lib.mkEnableOption "Enable Bluetooth"; }; @@ -16,8 +18,7 @@ in { difficulty = 3; enable-rcon = true; "rcon.password" = "test"; - motd = - "\\u00A7cWake up to reality! Nothing ever goes as planned in this accursed world.☯"; + motd = "\\u00A7cWake up to reality! Nothing ever goes as planned in this accursed world.☯"; spawn-protection = 0; level-type = "minecraft:amplified"; level-name = "amplified_world"; diff --git a/modules/moodle-dl/default.nix b/modules/moodle-dl/default.nix index 24846c4..cb447a6 100644 --- a/modules/moodle-dl/default.nix +++ b/modules/moodle-dl/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.moodle-dl; -in { +let + cfg = config.jopejoe1.moodle-dl; +in +{ options.jopejoe1.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 commit -m "moodle-dl updated on `$(date)`" ''; - path = with pkgs; [ openssh moodle-dl git coreutils ]; + path = with pkgs; [ + openssh + moodle-dl + git + coreutils + ]; serviceConfig = { Type = "oneshot"; User = "root"; @@ -30,4 +42,3 @@ in { }; }; } - diff --git a/modules/nix/default.nix b/modules/nix/default.nix index d9544f7..adf4e4f 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -1,9 +1,21 @@ -{ config, lib, pkgs, self, ... }: +{ + config, + lib, + pkgs, + self, + ... +}: -let cfg = config.jopejoe1.nix; -in { - options.jopejoe1.nix = { enable = lib.mkEnableOption "Enable Nix"; }; - options.jopejoe1.gui = { enable = lib.mkEnableOption "Enable GUI"; }; +let + cfg = config.jopejoe1.nix; +in +{ + options.jopejoe1.nix = { + enable = lib.mkEnableOption "Enable Nix"; + }; + options.jopejoe1.gui = { + enable = lib.mkEnableOption "Enable GUI"; + }; config = lib.mkIf cfg.enable { nix = { @@ -31,39 +43,44 @@ in { keep-going = true; builders-use-substitutes = true; }; -# buildMachines = [ -# (rec { -# systems = [ self.nixosConfigurations.kuraokami.config.nixpkgs.hostPlatform.system ]; -# supportedFeatures = self.nixosConfigurations.kuraokami.config.nix.settings.system-features; -# maxJobs = if hostName != config.networking.hostName then 24 else 0; -# speedFactor = 20; -# sshKey = "/home/jopejoe1/.ssh/github"; -# sshUser = "jopejoe1"; -# hostName = "kuraokami"; -# protocol = "ssh-ng"; -# }) -# (rec { -# systems = [ self.nixosConfigurations.zap.config.nixpkgs.hostPlatform.system ]; -# supportedFeatures = self.nixosConfigurations.zap.config.nix.settings.system-features; -# maxJobs = if hostName != config.networking.hostName then 4 else 0; -# speedFactor = 10; -# sshUser = "jopejoe1"; -# sshKey = "/home/jopejoe1/.ssh/github"; -# hostName = "zap"; -# protocol = "ssh-ng"; -# }) -# ]; + # buildMachines = [ + # (rec { + # systems = [ self.nixosConfigurations.kuraokami.config.nixpkgs.hostPlatform.system ]; + # supportedFeatures = self.nixosConfigurations.kuraokami.config.nix.settings.system-features; + # maxJobs = if hostName != config.networking.hostName then 24 else 0; + # speedFactor = 20; + # sshKey = "/home/jopejoe1/.ssh/github"; + # sshUser = "jopejoe1"; + # hostName = "kuraokami"; + # protocol = "ssh-ng"; + # }) + # (rec { + # systems = [ self.nixosConfigurations.zap.config.nixpkgs.hostPlatform.system ]; + # supportedFeatures = self.nixosConfigurations.zap.config.nix.settings.system-features; + # maxJobs = if hostName != config.networking.hostName then 4 else 0; + # speedFactor = 10; + # sshUser = "jopejoe1"; + # sshKey = "/home/jopejoe1/.ssh/github"; + # hostName = "zap"; + # protocol = "ssh-ng"; + # }) + # ]; distributedBuilds = true; package = pkgs.lix; - registry = lib.mkForce ((lib.mapAttrs (_: flake: { inherit flake; })) ((lib.filterAttrs (_: lib.isType "flake")) self.inputs) // { - self.flake = self; - }); + registry = lib.mkForce ( + (lib.mapAttrs (_: flake: { inherit flake; })) ( + (lib.filterAttrs (_: lib.isType "flake")) self.inputs + ) + // { + self.flake = self; + } + ); nixPath = lib.mkForce [ "/etc/nix/path" ]; }; nixpkgs = { - config ={ + config = { allowUnfree = true; nvidia.acceptLicense = true; }; @@ -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; [ deploy-rs @@ -92,9 +112,7 @@ in { useGlobalPkgs = true; useUserPackages = true; backupFileExtension = "backup"; - sharedModules = [ - self.outputs.homeManagerModules.default - ]; + sharedModules = [ self.outputs.homeManagerModules.default ]; }; systemd.services.nix-daemon.serviceConfig.LimitNOFILE = lib.mkForce 1048576000; @@ -106,4 +124,3 @@ in { }; }; } - diff --git a/modules/plasma/default.nix b/modules/plasma/default.nix index 9e4b4d2..402e889 100644 --- a/modules/plasma/default.nix +++ b/modules/plasma/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.plasma; -in { +let + cfg = config.jopejoe1.plasma; +in +{ options.jopejoe1.plasma = { enable = lib.mkEnableOption "Enable KDE Plasma"; }; @@ -24,9 +26,10 @@ in { }; }; - programs.kdeconnect = { enable = true; }; + programs.kdeconnect = { + enable = true; + }; networking.networkmanager.enable = true; }; } - diff --git a/modules/printing/default.nix b/modules/printing/default.nix index e32a8be..d72a43d 100644 --- a/modules/printing/default.nix +++ b/modules/printing/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.printing; -in { +let + cfg = config.jopejoe1.printing; +in +{ options.jopejoe1.printing = { enable = lib.mkEnableOption "Enable Printing"; }; @@ -27,4 +34,3 @@ in { }; }; } - diff --git a/modules/repo-sync/default.nix b/modules/repo-sync/default.nix index 483f07c..e83adf6 100644 --- a/modules/repo-sync/default.nix +++ b/modules/repo-sync/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.repo-sync; -in { +let + cfg = config.jopejoe1.repo-sync; +in +{ options.jopejoe1.repo-sync = { enable = lib.mkEnableOption "Enable Repo Sync"; }; @@ -30,7 +37,12 @@ in { git -C /var/lib/repo-sync push gitlab 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 = { Type = "oneshot"; User = "root"; @@ -38,4 +50,3 @@ in { }; }; } - diff --git a/modules/ssh/default.nix b/modules/ssh/default.nix index 6193fb9..0ebd03e 100644 --- a/modules/ssh/default.nix +++ b/modules/ssh/default.nix @@ -1,8 +1,18 @@ -{ config, lib, pkgs, self, ... }: +{ + config, + lib, + pkgs, + self, + ... +}: -let cfg = config.jopejoe1.ssh; -in { - options.jopejoe1.ssh = { enable = lib.mkEnableOption "Enable ssh"; }; +let + cfg = config.jopejoe1.ssh; +in +{ + options.jopejoe1.ssh = { + enable = lib.mkEnableOption "Enable ssh"; + }; config = lib.mkIf cfg.enable { services.openssh = { @@ -15,4 +25,3 @@ in { }; }; } - diff --git a/modules/steam/default.nix b/modules/steam/default.nix index 4c9cb48..84c6c7b 100644 --- a/modules/steam/default.nix +++ b/modules/steam/default.nix @@ -1,8 +1,17 @@ -{ pkgs, config, lib, ... }: +{ + pkgs, + config, + lib, + ... +}: -let cfg = config.jopejoe1.steam; -in { - options.jopejoe1.steam = { enable = lib.mkEnableOption "Enable Steam"; }; +let + cfg = config.jopejoe1.steam; +in +{ + options.jopejoe1.steam = { + enable = lib.mkEnableOption "Enable Steam"; + }; config = lib.mkIf cfg.enable { hardware.steam-hardware.enable = true; @@ -14,10 +23,7 @@ in { localNetworkGameTransfers.openFirewall = true; gamescopeSession.enable = true; extest.enable = true; - extraCompatPackages = with pkgs; [ - proton-ge-bin - ]; + extraCompatPackages = with pkgs; [ proton-ge-bin ]; }; }; } - diff --git a/modules/sway/default.nix b/modules/sway/default.nix index 50d58f0..d2c346b 100644 --- a/modules/sway/default.nix +++ b/modules/sway/default.nix @@ -1,7 +1,9 @@ { config, lib, ... }: -let cfg = config.jopejoe1.sway; -in { +let + cfg = config.jopejoe1.sway; +in +{ options.jopejoe1.sway = { enable = lib.mkEnableOption "Enable Sway"; }; @@ -12,4 +14,3 @@ in { }; }; } - diff --git a/modules/users/default.nix b/modules/users/default.nix index e0e5bc8..00935d4 100644 --- a/modules/users/default.nix +++ b/modules/users/default.nix @@ -1,5 +1,8 @@ { ... }: { - imports = [ ./root ./jopejoe1 ]; + imports = [ + ./root + ./jopejoe1 + ]; } diff --git a/modules/users/jopejoe1/default.nix b/modules/users/jopejoe1/default.nix index fd56339..82ddf55 100644 --- a/modules/users/jopejoe1/default.nix +++ b/modules/users/jopejoe1/default.nix @@ -1,7 +1,14 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.user.jopejoe1; -in { +let + cfg = config.jopejoe1.user.jopejoe1; +in +{ options.jopejoe1.user.jopejoe1 = { enable = lib.mkEnableOption "Enable jopejoe1 user"; }; @@ -12,7 +19,13 @@ in { shell = pkgs.nushell; description = "Johannes Jöns"; hashedPassword = "$2b$05$Uk84TY/RHlH8DIigUlFYjeorjTlCMEY9wN2pAcw5BLaPoc7dKiSsC"; - extraGroups = [ "wheel" "networkmanager" "pipewire" "audio" "adbusers" ]; + extraGroups = [ + "wheel" + "networkmanager" + "pipewire" + "audio" + "adbusers" + ]; uid = 1000; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB8oyMpS2hK3gQXyHIIVS6oilgMpemLmfhKKJ6RBMwUh johannes@joens.email" @@ -21,8 +34,9 @@ in { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFZDUoC+1lNR2JTY1Q+vhXpuLmKMdVl2OMFLVbQ3cGkw jopejoe1@kuraokami" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKm2igbJ+Ke+dJO3r7wp5ZTreHqC39Sjctca119Bl2yc jopejoe1@zap" ]; - packages = with pkgs; - [] + packages = + with pkgs; + [ ] ++ lib.optionals config.jopejoe1.gui.enable [ libsForQt5.kate libsForQt5.ark @@ -35,10 +49,13 @@ in { catppuccin-kde #catppuccin-gtk tela-icon-theme - ((discord.overrideAttrs (old: { - desktopItem = old.desktopItem.override - (old: { exec = old.exec + " --disable-gpu-sandbox"; }); - })).override { + ( + (discord.overrideAttrs (old: { + desktopItem = old.desktopItem.override (old: { + exec = old.exec + " --disable-gpu-sandbox"; + }); + })).override + { withOpenASAR = true; withVencord = true; withTTS = true; diff --git a/modules/users/root/default.nix b/modules/users/root/default.nix index 9e1b818..5299f31 100644 --- a/modules/users/root/default.nix +++ b/modules/users/root/default.nix @@ -1,8 +1,12 @@ { config, lib, ... }: -let cfg = config.jopejoe1.user.root; -in { - options.jopejoe1.user.root = { enable = lib.mkEnableOption "Enable root user"; }; +let + cfg = config.jopejoe1.user.root; +in +{ + options.jopejoe1.user.root = { + enable = lib.mkEnableOption "Enable root user"; + }; config = lib.mkIf cfg.enable { users.users.root = { @@ -34,4 +38,3 @@ in { }; }; } - diff --git a/modules/zerotierone/default.nix b/modules/zerotierone/default.nix index 6943d00..344b67c 100644 --- a/modules/zerotierone/default.nix +++ b/modules/zerotierone/default.nix @@ -1,16 +1,24 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: -let cfg = config.jopejoe1.zerotierone; -in { +let + cfg = config.jopejoe1.zerotierone; +in +{ options.jopejoe1.zerotierone = { enable = lib.mkEnableOption "Enable zerotierone"; }; config = lib.mkIf cfg.enable { 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; environment.systemPackages = with pkgs; lib.optional config.jopejoe1.gui.enable moonlight-qt; }; } - diff --git a/packages/default.nix b/packages/default.nix index 26b0249..65c7ed4 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -1,20 +1,22 @@ -{ inputs, pkgs, system }: +{ + inputs, + pkgs, + system, +}: { - tela-icon-theme-git = pkgs.tela-icon-theme.overrideAttrs { - src = inputs.tela-icon-theme; - }; + tela-icon-theme-git = pkgs.tela-icon-theme.overrideAttrs { src = inputs.tela-icon-theme; }; libadwaita-follow-theme = pkgs.libadwaita.overrideAttrs (old: { patches = (old.patches or [ ]) ++ [ ./adwaita-theming-support.patch ]; doCheck = false; }); - prismlauncher-withExtraStuff = inputs.prismlauncher.packages.${system}.prismlauncher.overrideAttrs (old: { - patches = (old.patches or [ ]) ++ [ - ./prism-ftb.patch - ]; - }); + prismlauncher-withExtraStuff = + inputs.prismlauncher.packages.${system}.prismlauncher.overrideAttrs + (old: { + patches = (old.patches or [ ]) ++ [ ./prism-ftb.patch ]; + }); nixos-anywhere = inputs.nixos-anywhere.packages.${system}.nixos-anywhere; @@ -26,9 +28,7 @@ url = "https://mangabooth.com/"; hash = "sha256-JxfjZLoN6I9twAQMT60Q27CgJg22G7zEU5GDra9rROs="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; installPhase = "mkdir -p $out; cp -R * $out/"; }; madara-child = pkgs.stdenv.mkDerivation rec { @@ -39,9 +39,7 @@ url = "https://mangabooth.com/"; hash = "sha256-h9w2TmX1nXaoP27b9DQ1jf6z1hTS5+BWtlz+Fprk5dQ="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; unpackPhase = '' mkdir -p $out unzip $src "madara-child/*" -d $out @@ -56,9 +54,7 @@ url = "https://mangabooth.com/"; hash = "sha256-r22hGCDlVeYTOFlhfKoc3r4TtpZExJ2E2QP9ssRoJco="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; installPhase = "mkdir -p $out; cp -R * $out/"; }; madara-shortcodes = pkgs.stdenv.mkDerivation rec { @@ -69,9 +65,7 @@ url = "https://mangabooth.com/"; hash = "sha256-IW7C5DTzvt3ROFpfB21LY2wmdR45lNj9c8/THHCi6eY="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; unpackPhase = '' mkdir -p $out unzip $src "madara-shortcodes/*" -d $out @@ -86,9 +80,7 @@ url = "https://mangabooth.com/"; hash = "sha256-9u+MGdOarNdLtARWiJpw/hsMR9X8r0h5qugGir+amUI="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; installPhase = "mkdir -p $out; cp -R * $out/"; }; option-tree = pkgs.stdenv.mkDerivation rec { @@ -98,9 +90,7 @@ url = "https://downloads.wordpress.org/plugin/option-tree.zip"; hash = "sha256-+dPt8qJ4rkmSKrIXX5IiWO4zkFkR+Uapjlbx1g7KzKs="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; installPhase = "mkdir -p $out; cp -R * $out/"; }; widget-logic = pkgs.stdenv.mkDerivation rec { @@ -110,11 +100,9 @@ url = "https://downloads.wordpress.org/plugin/widget-logic.zip"; hash = "sha256-J2NOth3q+IaPVhFT97arsNfjUPyTZF4Vvin1Cb+xnKw="; }; - nativeBuildInputs = [ - pkgs.unzip - ]; + nativeBuildInputs = [ pkgs.unzip ]; installPhase = "mkdir -p $out; cp -R * $out/"; }; - kde-hdr-fix = pkgs.callPackage ./kde-hdr.nix {}; - kde-wallpaper = pkgs.callPackage ./kde-wallpaper.nix {}; + kde-hdr-fix = pkgs.callPackage ./kde-hdr.nix { }; + kde-wallpaper = pkgs.callPackage ./kde-wallpaper.nix { }; } diff --git a/packages/kde-hdr.nix b/packages/kde-hdr.nix index 31c897d..a6cfec7 100644 --- a/packages/kde-hdr.nix +++ b/packages/kde-hdr.nix @@ -2,7 +2,7 @@ lib, stdenv, meson, -# ninja, + # ninja, fetchFromGitHub, vulkan-headers, libX11, @@ -22,10 +22,13 @@ stdenv.mkDerivation { nativeBuildInputs = [ meson - # ninja + # ninja ]; - buildInputs = [ vulkan-headers libX11 ]; + buildInputs = [ + vulkan-headers + libX11 + ]; strictDeps = true; diff --git a/packages/kde-wallpaper.nix b/packages/kde-wallpaper.nix index feca033..2b8d3f7 100644 --- a/packages/kde-wallpaper.nix +++ b/packages/kde-wallpaper.nix @@ -23,9 +23,7 @@ stdenv.mkDerivation { kdePackages.wrapQtAppsHook ]; - buildInputs = [ - kdePackages.qtbase - ]; + buildInputs = [ kdePackages.qtbase ]; cmakeFlags = [ "-DECM_DIR=${kdePackages.extra-cmake-modules}/share/ECM/cmake" diff --git a/systems/benzaiten/default.nix b/systems/benzaiten/default.nix index 8cc4164..8605c4a 100644 --- a/systems/benzaiten/default.nix +++ b/systems/benzaiten/default.nix @@ -1,4 +1,9 @@ -{ pkgs, config, nixos-hardware, ... }: +{ + pkgs, + config, + nixos-hardware, + ... +}: { imports = [ @@ -10,7 +15,9 @@ ]; jopejoe1 = { - audio = { enable = true; }; + audio = { + enable = true; + }; bluetooth.enable = true; local.enable = true; nix.enable = true; @@ -60,9 +67,7 @@ settings = { server = { systemTrayEnabled = true; - extensionRepos = [ - "https://raw.githubusercontent.com/keiyoushi/extensions/repo/index.min.json" - ]; + extensionRepos = [ "https://raw.githubusercontent.com/keiyoushi/extensions/repo/index.min.json" ]; webUIEnabled = true; initialOpenInBrowserEnabled = true; webUIInterface = "browser"; @@ -103,6 +108,10 @@ networking.hosts = { "192.168.88.251" = [ "wiki.it3" ]; "192.168.88.252" = [ "pi400" ]; - "127.0.0.1" = [ "local" "rss.local" "manga.local" ]; + "127.0.0.1" = [ + "local" + "rss.local" + "manga.local" + ]; }; } diff --git a/systems/benzaiten/hardware-configuration.nix b/systems/benzaiten/hardware-configuration.nix index e8e4bdc..6c6c236 100644 --- a/systems/benzaiten/hardware-configuration.nix +++ b/systems/benzaiten/hardware-configuration.nix @@ -1,4 +1,9 @@ -{ config, lib, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -22,11 +27,9 @@ fsType = "ext4"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; } ]; networking.useDHCP = lib.mkDefault true; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/systems/default.nix b/systems/default.nix index 3700583..f7f2e93 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -1,22 +1,38 @@ -{ self, nixpkgs, inputs }: +{ + self, + nixpkgs, + inputs, +}: let - mkSystem = systemConfig: name: nixpkgs.lib.nixosSystem rec { - system = builtins.replaceStrings [ "-unknown-" "-gnu" ] [ "-" "" ] systemConfig; - specialArgs = inputs; - modules = [ - ./${name} - self.outputs.nixosModules.default - { - system.stateVersion = "24.05"; - nixpkgs.hostPlatform = { - system = system; - config = systemConfig; - }; - networking.hostName = name; - } - ]; - }; + mkSystem = + systemConfig: name: + nixpkgs.lib.nixosSystem rec { + system = + builtins.replaceStrings + [ + "-unknown-" + "-gnu" + ] + [ + "-" + "" + ] + systemConfig; + specialArgs = inputs; + modules = [ + ./${name} + self.outputs.nixosModules.default + { + system.stateVersion = "24.05"; + nixpkgs.hostPlatform = { + system = system; + config = systemConfig; + }; + networking.hostName = name; + } + ]; + }; in { kuraokami = mkSystem "x86_64-unknown-linux-gnu" "kuraokami"; diff --git a/systems/ebisu/default.nix b/systems/ebisu/default.nix index 0aa76e6..eabe15b 100644 --- a/systems/ebisu/default.nix +++ b/systems/ebisu/default.nix @@ -3,7 +3,9 @@ { jopejoe1 = { - audio = { enable = true; }; + audio = { + enable = true; + }; bluetooth.enable = true; local.enable = true; nix.enable = true; @@ -14,7 +16,6 @@ boot.systemd.enable = true; }; - environment.systemPackages = with pkgs; [ moonlight-qt ]; time.timeZone = "Europe/Berlin"; diff --git a/systems/ebisu/hardware-configuration.nix b/systems/ebisu/hardware-configuration.nix index e8e4bdc..6c6c236 100644 --- a/systems/ebisu/hardware-configuration.nix +++ b/systems/ebisu/hardware-configuration.nix @@ -1,4 +1,9 @@ -{ config, lib, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -22,11 +27,9 @@ fsType = "ext4"; }; - swapDevices = - [{ device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; }]; + swapDevices = [ { device = "/dev/disk/by-uuid/8569ee66-b939-4ce8-a94a-dca7df5e301b"; } ]; networking.useDHCP = lib.mkDefault true; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/systems/hetzner/bind.nix b/systems/hetzner/bind.nix index 6f99a2b..fc93751 100644 --- a/systems/hetzner/bind.nix +++ b/systems/hetzner/bind.nix @@ -28,14 +28,20 @@ }; systemd.services.dns-rfc2136-conf = { - requiredBy = [ "acme-net0loggy.net.service" "bind.service" ]; - before = [ "acme-net0loggy.net.service" "bind.service" ]; + requiredBy = [ + "acme-net0loggy.net.service" + "bind.service" + ]; + before = [ + "acme-net0loggy.net.service" + "bind.service" + ]; unitConfig = { ConditionPathExists = "!/var/lib/secrets/dnskeys.conf"; }; serviceConfig = { Type = "oneshot"; - UMask = 0077; + UMask = 77; }; path = [ pkgs.bind ]; script = '' diff --git a/systems/hetzner/default.nix b/systems/hetzner/default.nix index b17cdfd..36a2233 100644 --- a/systems/hetzner/default.nix +++ b/systems/hetzner/default.nix @@ -1,4 +1,10 @@ -{ config, pkgs, lib, self, ... }: +{ + config, + pkgs, + lib, + self, + ... +}: { @@ -24,7 +30,10 @@ ssh.enable = true; }; - boot.initrd.availableKernelModules = [ "ahci" "nvme" ]; + boot.initrd.availableKernelModules = [ + "ahci" + "nvme" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; diff --git a/systems/hetzner/mail.nix b/systems/hetzner/mail.nix index 12aee61..0ade0e1 100644 --- a/systems/hetzner/mail.nix +++ b/systems/hetzner/mail.nix @@ -1,17 +1,54 @@ -{ config, pkgs, lib, ...}: +{ + config, + pkgs, + lib, + ... +}: { mailserver = { enable = true; 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 # nix-shell -p mkpasswd --run 'mkpasswd -sm bcrypt' loginAccounts = { "jopejoe1@missing.ninja" = { 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" + ]; }; }; @@ -30,18 +67,21 @@ }; services.roundcube = { - enable = true; - # this is the url of the vhost, not necessarily the same as the fqdn of - # the mailserver - hostName = "webmail.missing.ninja"; - extraConfig = '' - # starttls needed for authentication, so the fqdn required to match - # the certificate - $config['smtp_server'] = "tls://${config.mailserver.fqdn}"; - $config['smtp_user'] = "%u"; - $config['smtp_pass'] = "%p"; - ''; + enable = true; + # this is the url of the vhost, not necessarily the same as the fqdn of + # the mailserver + hostName = "webmail.missing.ninja"; + extraConfig = '' + # starttls needed for authentication, so the fqdn required to match + # the certificate + $config['smtp_server'] = "tls://${config.mailserver.fqdn}"; + $config['smtp_user'] = "%u"; + $config['smtp_pass'] = "%p"; + ''; }; - networking.firewall.allowedTCPPorts = [ 80 443 ]; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; } diff --git a/systems/hetzner/matrix.nix b/systems/hetzner/matrix.nix index af5d1b6..4806209 100644 --- a/systems/hetzner/matrix.nix +++ b/systems/hetzner/matrix.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ...}: +{ config, pkgs, ... }: let fqdn = "matrix.missing.ninja"; @@ -54,9 +54,7 @@ in server_name = "missing.ninja"; registration_shared_secret = ""; public_baseurl = baseUrl; - app_service_config_files = [ - "/var/lib/matrix-synapse/whatsapp-registration.yaml" - ]; + app_service_config_files = [ "/var/lib/matrix-synapse/whatsapp-registration.yaml" ]; listeners = [ { port = 8448; @@ -66,7 +64,10 @@ in x_forwarded = true; resources = [ { - names = [ "client" "federation" ]; + names = [ + "client" + "federation" + ]; compress = true; } ]; diff --git a/systems/hetzner/nginx.nix b/systems/hetzner/nginx.nix index b3df48d..b04a044 100644 --- a/systems/hetzner/nginx.nix +++ b/systems/hetzner/nginx.nix @@ -1,4 +1,9 @@ -{config, pkgs, self, ...}: +{ + config, + pkgs, + self, + ... +}: { services.nginx = { @@ -9,7 +14,21 @@ recommendedProxySettings = true; virtualHosts = { "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; forceSSL = true; }; @@ -23,9 +42,7 @@ locations."/socket.io/" = { proxyPass = "http://localhost:3333"; proxyWebsockets = true; - extraConfig = - "proxy_ssl_server_name on;" - ; + extraConfig = "proxy_ssl_server_name on;"; }; }; "test.missing.ninja" = { @@ -57,24 +74,25 @@ max_input_time = 300 ''; - services.wordpress.sites."test.missing.ninja" = with self.packages.${config.nixpkgs.hostPlatform.system}; { - themes = [ - madara - madara-child - pkgs.wordpressPackages.themes.twentytwentythree - ]; - plugins = [ - madara-core - madara-shortcodes - option-tree - option-tree-lean - widget-logic - ]; - settings = { - FORCE_SSL_ADMIN = true; + services.wordpress.sites."test.missing.ninja" = + with self.packages.${config.nixpkgs.hostPlatform.system}; { + themes = [ + madara + madara-child + pkgs.wordpressPackages.themes.twentytwentythree + ]; + plugins = [ + madara-core + madara-shortcodes + option-tree + option-tree-lean + widget-logic + ]; + settings = { + FORCE_SSL_ADMIN = true; + }; + extraConfig = '' + $_SERVER['HTTPS']='on'; + ''; }; - extraConfig = '' - $_SERVER['HTTPS']='on'; - ''; - }; } diff --git a/systems/hetzner/radicale.nix b/systems/hetzner/radicale.nix index 2c9ac52..487cbf4 100644 --- a/systems/hetzner/radicale.nix +++ b/systems/hetzner/radicale.nix @@ -1,16 +1,22 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: with lib; let mailAccounts = config.mailserver.loginAccounts; - htpasswd = pkgs.writeText "radicale.users" (concatStrings - (flip mapAttrsToList mailAccounts (mail: user: - mail + ":" + user.hashedPassword + "\n" - )) + htpasswd = pkgs.writeText "radicale.users" ( + concatStrings ( + flip mapAttrsToList mailAccounts (mail: user: mail + ":" + user.hashedPassword + "\n") + ) ); -in { +in +{ services.radicale = { enable = true; settings = { diff --git a/systems/kamimusubi/default.nix b/systems/kamimusubi/default.nix index 93b44aa..294ae82 100644 --- a/systems/kamimusubi/default.nix +++ b/systems/kamimusubi/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { jopejoe1 = { @@ -10,11 +15,10 @@ ssh.enable = true; }; - time.timeZone = "Europe/Berlin"; - + services.openssh.settings.PermitRootLogin = lib.mkForce "yes"; - + boot.loader = { efi = { canTouchEfiVariables = false; diff --git a/systems/kuraokami/default.nix b/systems/kuraokami/default.nix index 4541ce7..ea29f61 100644 --- a/systems/kuraokami/default.nix +++ b/systems/kuraokami/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, nixos-hardware, self, ... }: +{ + config, + pkgs, + lib, + nixos-hardware, + self, + ... +}: { imports = [ @@ -105,25 +112,25 @@ environment.systemPackages = with pkgs; [ localPkgs.prismlauncher-withExtraStuff mixxx - (picard.overrideAttrs{ - dontUseSetuptoolsCheck = true; - }) + (picard.overrideAttrs { dontUseSetuptoolsCheck = true; }) goverlay - (strawberry-qt6.overrideAttrs (finalAttrs: previousAttrs: { - version = "1.1.0-rc3"; - src = fetchFromGitHub { - owner = "strawberrymusicplayer"; - repo = "strawberry"; - rev = "1.1.0-rc3"; - hash = "sha256-4LhFxCi0ixMAjVaNVrQrLc0Vf1Z2dhnw6DTfTqtpiC4="; - }; - buildInputs = previousAttrs.buildInputs ++ [ - kdsingleapplication - gst_all_1.gst-plugins-rs - kdePackages.qtsvg - kdePackages.qtimageformats - ]; - })) + (strawberry-qt6.overrideAttrs ( + finalAttrs: previousAttrs: { + version = "1.1.0-rc3"; + src = fetchFromGitHub { + owner = "strawberrymusicplayer"; + repo = "strawberry"; + rev = "1.1.0-rc3"; + hash = "sha256-4LhFxCi0ixMAjVaNVrQrLc0Vf1Z2dhnw6DTfTqtpiC4="; + }; + buildInputs = previousAttrs.buildInputs ++ [ + kdsingleapplication + gst_all_1.gst-plugins-rs + kdePackages.qtsvg + kdePackages.qtimageformats + ]; + } + )) libreoffice-qt jitsi-meet-electron thunderbird @@ -139,9 +146,7 @@ gamemode.enable = true; appimage = { enable = true; - package = pkgs.appimage-run.override { - extraPkgs = pkgs: [ pkgs.brotli ]; - }; + package = pkgs.appimage-run.override { extraPkgs = pkgs: [ pkgs.brotli ]; }; }; gnupg.agent = { enable = true; @@ -150,13 +155,28 @@ }; }; - nix.settings.system-features = [ "gccarch-alderlake" "benchmark" "big-parallel" "kvm" "nixos-test" ] - ++ map (x: "gccarch-${x}") (lib.systems.architectures.inferiors.alderlake or [ ]); + nix.settings.system-features = [ + "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 = { enable = true; - libraries = with pkgs; [ libz xz xorg.libX11 freetype zstd dbus ]; + libraries = with pkgs; [ + libz + xz + xorg.libX11 + freetype + zstd + dbus + ]; }; } diff --git a/systems/kuraokami/hardware.nix b/systems/kuraokami/hardware.nix index 7529c97..e9d3798 100644 --- a/systems/kuraokami/hardware.nix +++ b/systems/kuraokami/hardware.nix @@ -1,7 +1,12 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { 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.kernelModules = [ "kvm-intel" "nouveau" ]; + boot.kernelModules = [ + "kvm-intel" + "nouveau" + ]; boot.extraModulePackages = [ ]; fileSystems = { @@ -38,7 +54,10 @@ "/media/gaming" = { device = "/dev/disk/by-uuid/4038F97238F966F6"; fsType = "ntfs"; - options = [ "rw" "uid=1000" ]; + options = [ + "rw" + "uid=1000" + ]; }; }; diff --git a/systems/omoikane/default.nix b/systems/omoikane/default.nix index b7c682e..c9347db 100644 --- a/systems/omoikane/default.nix +++ b/systems/omoikane/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, nixos-hardware, self, ... }: +{ + config, + pkgs, + lib, + nixos-hardware, + self, + ... +}: { 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 = { enable = true; }; diff --git a/systems/omoikane/hardware.nix b/systems/omoikane/hardware.nix index 2644319..77bfb7b 100644 --- a/systems/omoikane/hardware.nix +++ b/systems/omoikane/hardware.nix @@ -1,34 +1,49 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { 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.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/6842a9de-c5fd-4648-b3b8-f76e56633825"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/6842a9de-c5fd-4648-b3b8-f76e56633825"; + fsType = "ext4"; + }; boot.initrd.luks.devices."luks-eaed8652-a306-4434-a187-71e6fcb13e71".device = "/dev/disk/by-uuid/eaed8652-a306-4434-a187-71e6fcb13e71"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7C5A-EE45"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/7C5A-EE45"; + fsType = "vfat"; + options = [ + "fmask=0022" + "dmask=0022" + ]; + }; - fileSystems."/home/jopejoe1/Public/games" = - { device = "/dev/sda"; - fsType = "bcachefs"; - options = [ "compression=zstd" ]; - }; + fileSystems."/home/jopejoe1/Public/games" = { + device = "/dev/sda"; + fsType = "bcachefs"; + options = [ "compression=zstd" ]; + }; swapDevices = [ ]; diff --git a/systems/pi4/default.nix b/systems/pi4/default.nix index 7693220..fd2feed 100644 --- a/systems/pi4/default.nix +++ b/systems/pi4/default.nix @@ -1,4 +1,9 @@ -{ modulesPath, lib, nixos-hardware, ... }: +{ + modulesPath, + lib, + nixos-hardware, + ... +}: { imports = [ @@ -7,8 +12,12 @@ ]; boot = { - initrd = { availableKernelModules = [ "xhci_pci" ]; }; - loader = { generic-extlinux-compatible.enable = true; }; + initrd = { + availableKernelModules = [ "xhci_pci" ]; + }; + loader = { + generic-extlinux-compatible.enable = true; + }; }; hardware.raspberry-pi."4".fkms-3d.enable = true; diff --git a/systems/raspberry4/default.nix b/systems/raspberry4/default.nix index cdbde21..8cdbf6a 100644 --- a/systems/raspberry4/default.nix +++ b/systems/raspberry4/default.nix @@ -1,4 +1,10 @@ -{ modulesPath, lib, nixos-hardware, pkgs, ... }: +{ + modulesPath, + lib, + nixos-hardware, + pkgs, + ... +}: { imports = [ @@ -7,11 +13,23 @@ ]; boot = { - initrd = { availableKernelModules = [ "xhci_pci" ]; }; + initrd = { + availableKernelModules = [ "xhci_pci" ]; + }; 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; diff --git a/systems/sukuna-biko-na/default.nix b/systems/sukuna-biko-na/default.nix index 1395449..9b5b360 100644 --- a/systems/sukuna-biko-na/default.nix +++ b/systems/sukuna-biko-na/default.nix @@ -1,4 +1,9 @@ -{ modulesPath, lib, nixos-hardware, ... }: +{ + modulesPath, + lib, + nixos-hardware, + ... +}: { imports = [ @@ -7,8 +12,12 @@ ]; boot = { - initrd = { availableKernelModules = [ "xhci_pci" ]; }; - loader = { generic-extlinux-compatible.enable = true; }; + initrd = { + availableKernelModules = [ "xhci_pci" ]; + }; + loader = { + generic-extlinux-compatible.enable = true; + }; }; fileSystems."/" = { diff --git a/systems/yokai/default.nix b/systems/yokai/default.nix index 1e62096..f7105b5 100644 --- a/systems/yokai/default.nix +++ b/systems/yokai/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, nixos-hardware, ... }: +{ + config, + pkgs, + nixos-hardware, + ... +}: { imports = [ @@ -43,14 +48,18 @@ enable = true; keyMap = "us"; }; - services.xserver = { layout = "us"; }; + services.xserver = { + layout = "us"; + }; boot = { - supportedFilesystems = [ "ntfs" "btrfs" ]; + supportedFilesystems = [ + "ntfs" + "btrfs" + ]; loader = { grub.enable = false; generic-extlinux-compatible.enable = true; }; }; } - diff --git a/systems/yokai/hardware.nix b/systems/yokai/hardware.nix index 7fe5c89..ff8104a 100644 --- a/systems/yokai/hardware.nix +++ b/systems/yokai/hardware.nix @@ -19,10 +19,12 @@ fsType = "vfat"; }; - swapDevices = [{ - device = "/var/lib/swapfile"; - size = (4 * 1024) + (2 * 1024); - }]; + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = (4 * 1024) + (2 * 1024); + } + ]; networking.wireless.enable = true; @@ -37,4 +39,3 @@ powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.enableRedistributableFirmware = true; } - diff --git a/systems/zap/default.nix b/systems/zap/default.nix index 9423e8f..d9a0d75 100644 --- a/systems/zap/default.nix +++ b/systems/zap/default.nix @@ -1,4 +1,11 @@ -{ config, pkgs, lib, modulesPath, self, ... }: +{ + config, + pkgs, + lib, + modulesPath, + self, + ... +}: { jopejoe1 = { @@ -13,16 +20,22 @@ gui.enable = false; }; - imports = - [ - (modulesPath + "/profiles/qemu-guest.nix") - self.inputs.srvos.nixosModules.server - self.inputs.srvos.nixosModules.mixins-cloud-init - self.inputs.srvos.nixosModules.mixins-nginx - ./wp-test.nix - ]; + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + self.inputs.srvos.nixosModules.server + self.inputs.srvos.nixosModules.mixins-cloud-init + self.inputs.srvos.nixosModules.mixins-nginx + ./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; @@ -44,10 +57,10 @@ #"db.missing.ninja" = { # enableACME = true; # forceSSL = true; - # locations."/" = { + # locations."/" = { # proxyPass = "http://134.255.219.135:8000/"; - # }; - # }; + # }; + # }; }; services.nginx.enable = true; @@ -70,8 +83,16 @@ networking.firewall = { enable = true; - allowedTCPPorts = [ 80 443 8000 ]; - allowedUDPPorts = [ 80 443 8000 ]; + allowedTCPPorts = [ + 80 + 443 + 8000 + ]; + allowedUDPPorts = [ + 80 + 443 + 8000 + ]; }; users.users.fp = { @@ -88,7 +109,10 @@ services.openssh.settings.PermitRootLogin = lib.mkForce "yes"; - services.openssh.ports = [ 8081 22 ]; + services.openssh.ports = [ + 8081 + 22 + ]; services.surrealdb.enable = false; services.surrealdb.host = "134.255.219.135"; diff --git a/systems/zap/wp-test.nix b/systems/zap/wp-test.nix index 5651be4..a5bdf45 100644 --- a/systems/zap/wp-test.nix +++ b/systems/zap/wp-test.nix @@ -1,4 +1,9 @@ -{pkgs, config, lib, ...}: +{ + pkgs, + config, + lib, + ... +}: { services.nginx = { @@ -58,7 +63,7 @@ }; }; - users.users.www-wordpress= { + users.users.www-wordpress = { isNormalUser = true; group = "www-wordpress"; packages = with pkgs; [ @@ -96,37 +101,48 @@ # ensurePermissions = { "www-wordpress.*" = "ALL PRIVILEGES"; }; # } #]; - }; + }; - systemd.services = - let - secretsVars = [ "AUTH_KEY" "SECURE_AUTH_KEY" "LOGGED_IN_KEY" "NONCE_KEY" "AUTH_SALT" "SECURE_AUTH_SALT" "LOGGED_IN_SALT" "NONCE_SALT" ]; - secretsScript = hostStateDir: '' - # 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" - if ! test -e "${hostStateDir}/secret-keys.php"; then - umask 0177 - echo "> "${hostStateDir}/secret-keys.php" - ${lib.concatMapStringsSep "\n" (var: '' - echo "define('${var}', '`tr -dc a-zA-Z0-9 > "${hostStateDir}/secret-keys.php" - '') secretsVars} - echo "?>" >> "${hostStateDir}/secret-keys.php" - chmod 440 "${hostStateDir}/secret-keys.php" - fi - ''; - in - { - "wordpress-init" = { - wantedBy = [ "multi-user.target" ]; - before = [ "phpfpm-wordpress.service" ]; - after = [ "mysql.service" ]; - script = secretsScript "/var/www/wordpress/"; + systemd.services = + let + secretsVars = [ + "AUTH_KEY" + "SECURE_AUTH_KEY" + "LOGGED_IN_KEY" + "NONCE_KEY" + "AUTH_SALT" + "SECURE_AUTH_SALT" + "LOGGED_IN_SALT" + "NONCE_SALT" + ]; + secretsScript = hostStateDir: '' + # 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" + if ! test -e "${hostStateDir}/secret-keys.php"; then + umask 0177 + echo "> "${hostStateDir}/secret-keys.php" + ${ + lib.concatMapStringsSep "\n" (var: '' + echo "define('${var}', '`tr -dc a-zA-Z0-9 > "${hostStateDir}/secret-keys.php" + '') secretsVars + } + echo "?>" >> "${hostStateDir}/secret-keys.php" + chmod 440 "${hostStateDir}/secret-keys.php" + fi + ''; + in + { + "wordpress-init" = { + wantedBy = [ "multi-user.target" ]; + before = [ "phpfpm-wordpress.service" ]; + after = [ "mysql.service" ]; + script = secretsScript "/var/www/wordpress/"; - serviceConfig = { - Type = "oneshot"; - User = "www-wordpress"; - Group = "nginx"; + serviceConfig = { + Type = "oneshot"; + User = "www-wordpress"; + Group = "nginx"; + }; }; }; - }; } diff --git a/upstream/default.nix b/upstream/default.nix index 7d57ad7..df27484 100644 --- a/upstream/default.nix +++ b/upstream/default.nix @@ -1,7 +1,5 @@ { self, ... }: { - imports = [ - ./modules - ]; + imports = [ ./modules ]; } diff --git a/upstream/modules/default.nix b/upstream/modules/default.nix index c08a416..a58e7c2 100644 --- a/upstream/modules/default.nix +++ b/upstream/modules/default.nix @@ -1,6 +1,5 @@ { self, ... }: { - imports = [ - ]; + imports = [ ]; } diff --git a/upstream/pkgs/default.nix b/upstream/pkgs/default.nix index c08a416..a58e7c2 100644 --- a/upstream/pkgs/default.nix +++ b/upstream/pkgs/default.nix @@ -1,6 +1,5 @@ { self, ... }: { - imports = [ - ]; + imports = [ ]; }