diff options
author | Rory& <root@rory.gay> | 2024-07-04 14:59:36 +0200 |
---|---|---|
committer | Rory& <root@rory.gay> | 2024-07-04 14:59:36 +0200 |
commit | dd7b872694441a96b8b042ccbc4b63a96d0b89b9 (patch) | |
tree | 76a25875e08415c38cdb7b5ad8f93241b387d078 /modules | |
parent | Update flake inputs (diff) | |
download | Rory-Open-Architecture-dd7b872694441a96b8b042ccbc4b63a96d0b89b9.tar.xz |
Nixfmt
Diffstat (limited to 'modules')
30 files changed, 453 insertions, 440 deletions
diff --git a/modules/base-client.nix b/modules/base-client.nix index c88db02..936e426 100755 --- a/modules/base-client.nix +++ b/modules/base-client.nix @@ -1,11 +1,15 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { - imports = - [ - ./base.nix - ./users/Rory.client.nix - ]; + imports = [ + ./base.nix + ./users/Rory.client.nix + ]; networking = { hostName = lib.mkDefault "Rory-nix-base"; @@ -22,7 +26,7 @@ sleep.extraConfig = '' AllowSuspend=no AllowHibernation=no - ''; + ''; }; environment.systemPackages = with pkgs; [ @@ -51,7 +55,10 @@ ''; nix = { settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; auto-optimise-store = true; }; }; @@ -67,8 +74,6 @@ boot.initrd.systemd.network.wait-online.enable = false; # disable all serial ports/consoles - systemd.suppressedSystemUnits = [ - "serial-getty@.service" - ]; + systemd.suppressedSystemUnits = [ "serial-getty@.service" ]; } diff --git a/modules/base-secrets.nix b/modules/base-secrets.nix index e159b2a..90fdd21 100755 --- a/modules/base-secrets.nix +++ b/modules/base-secrets.nix @@ -1,4 +1,10 @@ -{ path }: { config, pkgs, lib, ... }: +{ path }: +{ + config, + pkgs, + lib, + ... +}: { sops = { defaultSopsFile = path; diff --git a/modules/base-server.nix b/modules/base-server.nix index 35279e4..29949ef 100755 --- a/modules/base-server.nix +++ b/modules/base-server.nix @@ -1,20 +1,26 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { - imports = - [ - ./base.nix - ./users/chris.nix - ]; + imports = [ + ./base.nix + ./users/chris.nix + ]; documentation.nixos.enable = false; documentation.enable = false; documentation.info.enable = false; documentation.man.enable = false; - environment.variables.BROWSER = "echo"; - nix.settings.trusted-users = [ "root" "@wheel" ]; + nix.settings.trusted-users = [ + "root" + "@wheel" + ]; time.timeZone = lib.mkDefault "UTC"; systemd = { @@ -46,8 +52,8 @@ systemd.services.NetworkManager-wait-online.enable = false; systemd.network.wait-online.enable = false; - # systemd.services.systemd-networkd.stopIfChanged = false; - # systemd.services.systemd-resolved.stopIfChanged = false; + # systemd.services.systemd-networkd.stopIfChanged = false; + # systemd.services.systemd-resolved.stopIfChanged = false; nix.settings.max-free = lib.mkDefault (1000 * 1000 * 1000); nix.settings.min-free = lib.mkDefault (128 * 1000 * 1000); @@ -82,8 +88,15 @@ }; useDHCP = false; -# nameservers = [ "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ]; - nameservers = [ "10.10.0.4" "10.10.0.5" "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ]; + # nameservers = [ "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ]; + nameservers = [ + "10.10.0.4" + "10.10.0.5" + "1.1.1.1" + "1.0.0.1" + "8.8.8.8" + "8.4.4.8" + ]; resolvconf.enable = true; defaultGateway = "192.168.1.1"; }; @@ -125,25 +138,26 @@ positions = { filename = "/tmp/positions.yaml"; }; - clients = [{ - url = "https://loki.regional.seian.cloud/loki/api/v1/push"; - }]; - scrape_configs = [{ - job_name = "journal"; - journal = { - max_age = "12h"; - labels = { - job = "systemd-journal"; - host = "${toString config.networking.hostName}"; + clients = [ { url = "https://loki.regional.seian.cloud/loki/api/v1/push"; } ]; + scrape_configs = [ + { + job_name = "journal"; + journal = { + max_age = "12h"; + labels = { + job = "systemd-journal"; + host = "${toString config.networking.hostName}"; + }; }; - }; - relabel_configs = [{ - source_labels = [ "__journal__systemd_unit" ]; - target_label = "unit"; - }]; - }]; + relabel_configs = [ + { + source_labels = [ "__journal__systemd_unit" ]; + target_label = "unit"; + } + ]; + } + ]; }; }; }; } - diff --git a/modules/base.nix b/modules/base.nix index a1559fb..6597a97 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -1,16 +1,20 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { - imports = - [ - ./packages/vim.nix - ./users/Rory.nix - ./extra-substituters.nix - ]; + imports = [ + ./packages/vim.nix + ./users/Rory.nix + ./extra-substituters.nix + ]; boot = { initrd.systemd.enable = true; - kernelParams = [ + kernelParams = [ "memory_hotplug.memmap_on_memory=1" "memhp_default_state=online" "net.core.default_qdisc=fq" @@ -60,14 +64,19 @@ # allowedTCPPorts = [ ... ]; # allowedUDPPorts = [ ... ]; }; - nameservers = [ "1.1.1.1" "1.0.0.1" "8.8.8.8" "8.4.4.8" ]; + nameservers = [ + "1.1.1.1" + "1.0.0.1" + "8.8.8.8" + "8.4.4.8" + ]; }; environment.etc."resolv.conf".text = '' - nameserver 8.8.8.8 - nameserver 8.4.4.8 - nameserver 1.1.1.1 - nameserver 1.0.0.1 - ''; + nameserver 8.8.8.8 + nameserver 8.4.4.8 + nameserver 1.1.1.1 + nameserver 1.0.0.1 + ''; i18n.defaultLocale = "en_US.UTF-8"; @@ -77,7 +86,7 @@ #allow more logins in cases where i have many ssh keys on a system extraConfig = '' MaxAuthTries 32 - ''; + ''; }; resolved = { enable = lib.mkForce false; @@ -90,7 +99,7 @@ sleep.extraConfig = '' AllowSuspend=no AllowHibernation=no - ''; + ''; }; environment.systemPackages = with pkgs; [ @@ -120,7 +129,6 @@ unzip brotli - # - zsh zsh zsh-powerlevel10k @@ -135,7 +143,10 @@ ''; nix = { settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; auto-optimise-store = true; trusted-users = [ "@wheel" ]; }; diff --git a/modules/environments/home.nix b/modules/environments/home.nix index 0658abb..3fbf14e 100755 --- a/modules/environments/home.nix +++ b/modules/environments/home.nix @@ -1,12 +1,20 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { nix = { distributedBuilds = true; -# + # buildMachines = builtins.filter (machine: !builtins.any (ip: ip == machine.hostName) (builtins.map (iface: iface.ipv4.addresses) (builtins.attrValues config.networking.interfaces))) [ { - systems = [ "x86_64-linux" "i686-linux" ]; + systems = [ + "x86_64-linux" + "i686-linux" + ]; hostName = "192.168.0.3"; sshUser = "Rory"; sshKey = "/home/Rory/.ssh/id_ed25519"; @@ -14,7 +22,10 @@ speedFactor = 43200; } { - systems = [ "x86_64-linux" "i686-linux" ]; + systems = [ + "x86_64-linux" + "i686-linux" + ]; hostName = "192.168.0.59"; sshUser = "Rory"; sshKey = "/home/Rory/.ssh/id_ed25519"; @@ -22,7 +33,7 @@ speedFactor = 16000; } ]; - + #ssh://Rory@192.168.0.3 x86_64-linux,i686-linux /home/Rory/.ssh/id_ed25519 12 1 - - - registry.nixpkgs.flake = pkgs; nixPath = [ "nixpkgs=flake:nixpkgs" ]; @@ -39,7 +50,11 @@ "cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g=" "numtide.cachix.org-1:2ps1kLBUWjxIneOy1Ik6cQjb41X0iXVXeHigGmycPPE=" ]; - trusted-users = [ "root" "@wheel" "Rory" ]; + trusted-users = [ + "root" + "@wheel" + "Rory" + ]; }; }; diff --git a/modules/extra-substituters.nix b/modules/extra-substituters.nix index 9eea94f..31b5c4f 100644 --- a/modules/extra-substituters.nix +++ b/modules/extra-substituters.nix @@ -1,4 +1,9 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { nix.settings.trusted-substituters = [ diff --git a/modules/packages/discord-screenaudio.nix b/modules/packages/discord-screenaudio.nix index 4bf7c11..2829381 100644 --- a/modules/packages/discord-screenaudio.nix +++ b/modules/packages/discord-screenaudio.nix @@ -1,16 +1,17 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, wrapQtAppsHook -, pkg-config -, qtbase -, qtwebengine -, knotifications -, kxmlgui -, kglobalaccel -, pipewire -, xdg-desktop-portal +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + wrapQtAppsHook, + pkg-config, + qtbase, + qtwebengine, + knotifications, + kxmlgui, + kglobalaccel, + pipewire, + xdg-desktop-portal, }: stdenv.mkDerivation rec { diff --git a/modules/packages/dotnet-pack.nix b/modules/packages/dotnet-pack.nix index 75a01a1..0e4a9b4 100644 --- a/modules/packages/dotnet-pack.nix +++ b/modules/packages/dotnet-pack.nix @@ -1,12 +1,18 @@ -{ pkgs ? import <nixpkgs> {} }: +{ + pkgs ? import <nixpkgs> { }, +}: pkgs.symlinkJoin { name = "dotnet-pack"; - paths = [ pkgs.dotnet-sdk_8 pkgs.dotnet-sdk_7 pkgs.dotnet-sdk ]; + paths = [ + pkgs.dotnet-sdk_8 + pkgs.dotnet-sdk_7 + pkgs.dotnet-sdk + ]; postBuild = '' rm -rfv $out/bin rm -rfv $out/dotnet cp -rv ${pkgs.dotnet-sdk_8}/dotnet $out/ cp -rv ${pkgs.dotnet-sdk_8}/bin $out/ ''; -} \ No newline at end of file +} diff --git a/modules/packages/gitfs.nix b/modules/packages/gitfs.nix index 804a747..728e836 100755 --- a/modules/packages/gitfs.nix +++ b/modules/packages/gitfs.nix @@ -2,16 +2,16 @@ { environment.systemPackages = with pkgs; [ (gitfs.overrideAttrs (old: { - # TODO: pls fix the nixpkgs derivation - patchPhase = null; - postPatch = old.patchPhase; - patches = (old.patches or []) ++ [ - (fetchpatch { - name = "fix-MutableMapping.patch"; - url = "https://patch-diff.githubusercontent.com/raw/presslabs/gitfs/pull/382.diff"; - hash = "sha256-ZaIEhv37sorSq3P+6GeH346u/5xh3qE+49D9FRNujMQ="; - }) + # TODO: pls fix the nixpkgs derivation + patchPhase = null; + postPatch = old.patchPhase; + patches = (old.patches or [ ]) ++ [ + (fetchpatch { + name = "fix-MutableMapping.patch"; + url = "https://patch-diff.githubusercontent.com/raw/presslabs/gitfs/pull/382.diff"; + hash = "sha256-ZaIEhv37sorSq3P+6GeH346u/5xh3qE+49D9FRNujMQ="; + }) + ]; + })) ]; -}) - )]; } diff --git a/modules/packages/mc/modloaders/forge/1.19.2/43.2.11.nix b/modules/packages/mc/modloaders/forge/1.19.2/43.2.11.nix deleted file mode 100644 index e69de29..0000000 --- a/modules/packages/mc/modloaders/forge/1.19.2/43.2.11.nix +++ /dev/null diff --git a/modules/packages/mc/server/modpack/curseforge/techopolis-2/5.4.nix b/modules/packages/mc/server/modpack/curseforge/techopolis-2/5.4.nix deleted file mode 100644 index e150b7f..0000000 --- a/modules/packages/mc/server/modpack/curseforge/techopolis-2/5.4.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ lib, stdenv, pkgs, jdk17, makeWrapper }: - -let - url = "https://mediafilez.forgecdn.net/files/4824/587/Techopolis_2_server_pack.zip"; - hash = "sha256-4Ig4v8c14kxzJFeHPYv/w44c0/KkayoFc3rOuxxB+9s="; - name = "techopolis-2"; - version = "5.4"; - -in stdenv.mkDerivation { - name = name; - - #sources - src = pkgs.fetchzip { - url = url; - stripRoot = false; - hash = hash; - name = "server"; - }; - forgeJar = import ../../../../modloaders/forge/1.19.2/43.2.11.nix; - - phases = [ - "unpackPhase" - "installPhase" - ]; - buildInputs = [ jdk17 makeWrapper ]; - installPhase = '' - ls -lah - # Create the wrapper script - mkdir -p $out/bin - mkdir -p $out/lib - cp -r * $out/lib - makeWrapper ${jdk17}/bin/java $out/bin/mc-${name}-${version}-server \ - --set JAVA_HOME ${jdk17} \ - --add-args "-Dlog4j2.formatMsgNoLookups=true" - ''; -} diff --git a/modules/packages/mc/server/vanilla/1.19.2.nix b/modules/packages/mc/server/vanilla/1.19.2.nix deleted file mode 100644 index 3ad79e8..0000000 --- a/modules/packages/mc/server/vanilla/1.19.2.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ lib, stdenv, pkgs, jdk17, makeWrapper }: - -let - url = "https://piston-data.mojang.com/v1/objects/f69c284232d7c7580bd89a5a4931c3581eae1378/server.jar"; - hash = "sha256-4Ig4v8c14kxzJFeHPYv/w44c0/KkayoFc3rOuxxB+9s="; - name = "vanilla"; - version = "1.19.2"; -in stdenv.mkDerivation { - name = name; - src = pkgs.fetchzip { - url = url; - stripRoot = false; - hash = hash; - name = "server"; - }; - phases = [ - "unpackPhase" - "installPhase" - ]; - buildInputs = [ jdk17 makeWrapper ]; - installPhase = '' - ls -lah - # Create the wrapper script - mkdir -p $out/bin - mkdir -p $out/lib - cp -r * $out/lib - makeWrapper ${jdk17}/bin/java $out/bin/mc-${name}-${version}-server \ - --set JAVA_HOME ${jdk17} \ - --add-args "-Dlog4j2.formatMsgNoLookups=true" - ''; -} diff --git a/modules/packages/mtxclient-git.nix b/modules/packages/mtxclient-git.nix index d2a9d6a..2392312 100644 --- a/modules/packages/mtxclient-git.nix +++ b/modules/packages/mtxclient-git.nix @@ -1,19 +1,21 @@ # This file was copied from NUR: https://github.com/nix-community/nur-combined/blob/master/repos/deeunderscore/pkgs/mtxclient/default.nix # This file is a modified version of nixpkgs/pkgs/development/libraries/mtxclient/default.nix (copied at 5c4b9be) -{ lib, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, openssl -, olm -, spdlog -, nlohmann_json -, libevent -, curl -, coeurl -, re2 -, mtxclientSrc +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + openssl, + olm, + spdlog, + nlohmann_json, + libevent, + curl, + coeurl, + re2, + mtxclientSrc, }: stdenv.mkDerivation { pname = "mtxclient"; @@ -32,7 +34,6 @@ stdenv.mkDerivation { sed -i '1a add_compile_definitions(SPDLOG_FMT_EXTERNAL)' CMakeLists.txt ''; - nativeBuildInputs = [ cmake pkg-config @@ -52,7 +53,10 @@ stdenv.mkDerivation { description = "Client API library for Matrix, built on top of Boost.Asio"; homepage = "https://github.com/Nheko-Reborn/mtxclient"; license = licenses.mit; - maintainers = with maintainers; [ fpletz pstn ]; + maintainers = with maintainers; [ + fpletz + pstn + ]; platforms = platforms.all; # Should be fixable if a higher clang version is used, see: # https://github.com/NixOS/nixpkgs/pull/85922#issuecomment-619287177 diff --git a/modules/packages/nheko-git.nix b/modules/packages/nheko-git.nix index adc3a09..c38e622 100644 --- a/modules/packages/nheko-git.nix +++ b/modules/packages/nheko-git.nix @@ -1,37 +1,38 @@ # This file was copied from NUR: https://github.com/nix-community/nur-combined/blob/master/repos/deeunderscore/pkgs/nheko/default.nix#L93 # This file is a modified version of nixpkgs/pkgs/applications/networking/instant-messengers/nheko/default.nix (copied at 2e896fce) -{ lib -, stdenv -, fetchFromGitHub -, cmake -#, wrapQtAppsHook -, asciidoctor -, qt6 -, qt6Packages -#, qtmultimedia -#, qtimageformats -#, qtkeychain -, cmark -, coeurl -, curl -, libevent -, lmdb -, lmdbxx -#, mtxclient -, nlohmann_json -, olm -, pkg-config -, re2 -, spdlog -, httplib -, voipSupport ? true -, gst_all_1 -, libnice -, kdsingleapplication -, pkgs -, nhekoSrc -, mtxclientSrc +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + #, wrapQtAppsHook + asciidoctor, + qt6, + qt6Packages, + #, qtmultimedia + #, qtimageformats + #, qtkeychain + cmark, + coeurl, + curl, + libevent, + lmdb, + lmdbxx, + #, mtxclient + nlohmann_json, + olm, + pkg-config, + re2, + spdlog, + httplib, + voipSupport ? true, + gst_all_1, + libnice, + kdsingleapplication, + pkgs, + nhekoSrc, + mtxclientSrc, }: stdenv.mkDerivation { @@ -47,32 +48,37 @@ stdenv.mkDerivation { qt6.wrapQtAppsHook ]; - buildInputs = [ - qt6.qtbase - qt6.qttools - qt6.qtsvg - qt6.qtmultimedia - qt6.qtimageformats - qt6Packages.qtkeychain - kdsingleapplication - cmark - coeurl - curl - libevent - lmdb - (pkgs.callPackage ./mtxclient-git.nix { inherit mtxclientSrc; }) - nlohmann_json - olm - re2 - spdlog - httplib - ] ++ lib.optionals voipSupport (with gst_all_1; [ - gstreamer - gst-plugins-base - (gst-plugins-good.override { qt5Support = true; }) - gst-plugins-bad - libnice - ]); + buildInputs = + [ + qt6.qtbase + qt6.qttools + qt6.qtsvg + qt6.qtmultimedia + qt6.qtimageformats + qt6Packages.qtkeychain + kdsingleapplication + cmark + coeurl + curl + libevent + lmdb + (pkgs.callPackage ./mtxclient-git.nix { inherit mtxclientSrc; }) + nlohmann_json + olm + re2 + spdlog + httplib + ] + ++ lib.optionals voipSupport ( + with gst_all_1; + [ + gstreamer + gst-plugins-base + (gst-plugins-good.override { qt5Support = true; }) + gst-plugins-bad + libnice + ] + ); LC_ALL = lib.optionalString (!stdenv.isDarwin) "C.UTF-8"; @@ -82,11 +88,8 @@ stdenv.mkDerivation { "-DBUILD_SHARED_LIBS=OFF" #Rory& "-DMAN=OFF" - - ] ++ lib.optionals (!voipSupport) [ - "-DVOIP=OFF" - ]; + ] ++ lib.optionals (!voipSupport) [ "-DVOIP=OFF" ]; preFixup = lib.optionalString voipSupport '' # add gstreamer plugins path to the wrapper diff --git a/modules/packages/overlays/haskell/basement/IntWord64.nix b/modules/packages/overlays/haskell/basement/IntWord64.nix index 6cf5b86..d407bf0 100644 --- a/modules/packages/overlays/haskell/basement/IntWord64.nix +++ b/modules/packages/overlays/haskell/basement/IntWord64.nix @@ -2,16 +2,13 @@ { nixpkgs.overlays = [ (self: super: { - haskellPackages = super.haskellPackages.override { - overrides = haskellPackages-self: haskellPackages-super: { - basement = haskellPackages-super.basement.overrideAttrs (oldAttrs: { - patches = [ - ./IntWord64.patch - ]; - }); - }; + haskellPackages = super.haskellPackages.override { + overrides = haskellPackages-self: haskellPackages-super: { + basement = haskellPackages-super.basement.overrideAttrs (oldAttrs: { + patches = [ ./IntWord64.patch ]; + }); }; - } - ) + }; + }) ]; } diff --git a/modules/packages/overlays/rocm-gfx1102.nix b/modules/packages/overlays/rocm-gfx1102.nix deleted file mode 100644 index f5c650e..0000000 --- a/modules/packages/overlays/rocm-gfx1102.nix +++ /dev/null @@ -1,14 +0,0 @@ -#{ pkgs, ... }: -#{ -# nixpkgs.overlays = [ -# (final: old: { -# rocmPackages = old.rocmPackages.override { -# rocblas = (old.rocmPackages.rocblas.overrideAttrs (oldAttrs: { -# gpuTargets = [ "gfx1102" ]; -# })); -# }; -# } -# ) -# ]; -#} -# \ No newline at end of file diff --git a/modules/packages/vim.nix b/modules/packages/vim.nix index 3524e2c..eaec336 100755 --- a/modules/packages/vim.nix +++ b/modules/packages/vim.nix @@ -1,14 +1,20 @@ { pkgs, ... }: { - environment.variables = { EDITOR = "vim"; }; + environment.variables = { + EDITOR = "vim"; + }; environment.systemPackages = with pkgs; [ (neovim.override { vimAlias = true; configure = { packages.myPlugins = with pkgs.vimPlugins; { - start = [ vim-lastplace vim-nix vim-airline ]; - opt = []; + start = [ + vim-lastplace + vim-nix + vim-airline + ]; + opt = [ ]; }; customRC = '' " your custom vimrc @@ -17,6 +23,6 @@ " ... ''; }; - } - )]; + }) + ]; } diff --git a/modules/packages/xdg-desktop-portal-gtk.nix b/modules/packages/xdg-desktop-portal-gtk.nix index fa32730..cfe48d4 100644 --- a/modules/packages/xdg-desktop-portal-gtk.nix +++ b/modules/packages/xdg-desktop-portal-gtk.nix @@ -1,17 +1,18 @@ -{ stdenv -, lib -, fetchFromGitHub -, meson -, ninja -, pkg-config -, xdg-desktop-portal -, gtk3 -, gnome -, gnome-desktop -, glib -, wrapGAppsHook -, gsettings-desktop-schemas -, buildPortalsInGnome ? true +{ + stdenv, + lib, + fetchFromGitHub, + meson, + ninja, + pkg-config, + xdg-desktop-portal, + gtk3, + gnome, + gnome-desktop, + glib, + wrapGAppsHook, + gsettings-desktop-schemas, + buildPortalsInGnome ? true, }: stdenv.mkDerivation (finalAttrs: { @@ -32,17 +33,19 @@ stdenv.mkDerivation (finalAttrs: { wrapGAppsHook ]; - buildInputs = [ - glib - gtk3 - xdg-desktop-portal - gsettings-desktop-schemas # settings exposed by settings portal - #fontconfig - ] ++ lib.optionals buildPortalsInGnome [ - gsettings-desktop-schemas # settings exposed by settings portal - gnome-desktop - gnome.gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s, just mouse and xsettings) - ]; + buildInputs = + [ + glib + gtk3 + xdg-desktop-portal + gsettings-desktop-schemas # settings exposed by settings portal + #fontconfig + ] + ++ lib.optionals buildPortalsInGnome [ + gsettings-desktop-schemas # settings exposed by settings portal + gnome-desktop + gnome.gnome-settings-daemon # schemas needed for settings api (mostly useless now that fonts were moved to g-d-s, just mouse and xsettings) + ]; mesonFlags = lib.optionals (!buildPortalsInGnome) [ "-Dwallpaper=disabled" diff --git a/modules/software-templates/dotnet.client.nix b/modules/software-templates/dotnet.client.nix index b10be16..ab8d812 100644 --- a/modules/software-templates/dotnet.client.nix +++ b/modules/software-templates/dotnet.client.nix @@ -1,11 +1,14 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { - imports = [ - ./dotnet.nix - ]; - environment.systemPackages = with pkgs; [ - #`jetbrains.rider - (jetbrains.plugins.addPlugins jetbrains.rider [ "github-copilot" ]) - ]; + imports = [ ./dotnet.nix ]; + environment.systemPackages = with pkgs; [ + #`jetbrains.rider + (jetbrains.plugins.addPlugins jetbrains.rider [ "github-copilot" ]) + ]; } diff --git a/modules/software-templates/dotnet.nix b/modules/software-templates/dotnet.nix index ede22a2..be9ab4d 100644 --- a/modules/software-templates/dotnet.nix +++ b/modules/software-templates/dotnet.nix @@ -1,11 +1,14 @@ -{ config, pkgs, lib, ... }: +{ + config, + pkgs, + lib, + ... +}: { - environment.systemPackages = with pkgs; [ - (callPackage ../packages/dotnet-pack.nix { inherit pkgs; }) - ]; - environment.sessionVariables = { - DOTNET_CLI_TELEMETRY_OPTOUT = "1"; - DOTNET_ROOT = "${(pkgs.callPackage ../packages/dotnet-pack.nix { inherit pkgs; })}"; - }; + environment.systemPackages = with pkgs; [ (callPackage ../packages/dotnet-pack.nix { inherit pkgs; }) ]; + environment.sessionVariables = { + DOTNET_CLI_TELEMETRY_OPTOUT = "1"; + DOTNET_ROOT = "${(pkgs.callPackage ../packages/dotnet-pack.nix { inherit pkgs; })}"; + }; } diff --git a/modules/software-templates/firefox-policy.nix b/modules/software-templates/firefox-policy.nix index 9e07193..83d0a47 100644 --- a/modules/software-templates/firefox-policy.nix +++ b/modules/software-templates/firefox-policy.nix @@ -1,78 +1,76 @@ { - AppAutoUpdate = false; - BackgroundAppUpdate = false; - BlockAboutAddons = false; - BlockAboutConfig = false; - BlockAboutProfiles = false; - BlockAboutSupport = false; - CaptivePortal = false; - Cookies = { - Block = import ../../data/domain_lists/airelle.nix; - AcceptThirdParty = false; - RejectTracker = true; - Behavior = "reject-tracker"; - }; - DisableBuiltInPDFViewer = false; - DisableFirefoxAccounts = true; - DisableFeedbackCommands = true; - DisableFirefoxStudies = true; - DisableFirefoxScreenshots = true; - DisablePocket = true; - DisableSystemAddonUpdate = true; - DisableTelemetry = true; - DisplayBookmarksToolbar = "always"; - DisplayMenuBar = "always"; - DNSOverHTTPS = { - Enabled = false; - }; - DontCheckDefaultBrowser = true; - EnableTrackingProtection = { - Value = true; - Cryptomining = true; - Fingerprinting = true; - EmailTracking = true; - }; - EncryptedMediaExtensions = { - Enabled = false; - }; - Extensions = { - Install = [ - "https://github.com/gorhill/uBlock/releases/download/1.52.2/uBlock0_1.52.2.firefox.signed.xpi" - ]; - }; - ExtensionUpdate = false; - FirefoxHome = { - Snippets = false; - TopSites = false; - Highlights = false; - Pocket = false; - SponsoredTopSites = false; - SponsoredPocket = false; - }; - FirefoxSuggest = { - ImproveSuggest = false; - SponsoredSuggestions = false; - WebSuggestions = false; - }; - GoToIntranetSiteForSingleWordEntryInAddressBar = true; - LocalFileLinks = [ - "file://" - "https://*.rory.gay" - "http://*.localhost" - "http://localhost" - ]; - PictureInPicture = false; - SearchSuggestEnabled = false; - UserMessaging = { - WhatsNew = false; - ExtensionRecommendations = false; - UrlbarInterventions = false; - SkipOnboarding = true; - MoreFromMozilla = false; - Locked = true; - }; - WebsiteFilter = { - Block = import ../../data/domain_lists/airelle.nix; - }; - WindowsSSO = true; -} \ No newline at end of file + AppAutoUpdate = false; + BackgroundAppUpdate = false; + BlockAboutAddons = false; + BlockAboutConfig = false; + BlockAboutProfiles = false; + BlockAboutSupport = false; + CaptivePortal = false; + Cookies = { + Block = import ../../data/domain_lists/airelle.nix; + AcceptThirdParty = false; + RejectTracker = true; + Behavior = "reject-tracker"; + }; + DisableBuiltInPDFViewer = false; + DisableFirefoxAccounts = true; + DisableFeedbackCommands = true; + DisableFirefoxStudies = true; + DisableFirefoxScreenshots = true; + DisablePocket = true; + DisableSystemAddonUpdate = true; + DisableTelemetry = true; + DisplayBookmarksToolbar = "always"; + DisplayMenuBar = "always"; + DNSOverHTTPS = { + Enabled = false; + }; + DontCheckDefaultBrowser = true; + EnableTrackingProtection = { + Value = true; + Cryptomining = true; + Fingerprinting = true; + EmailTracking = true; + }; + EncryptedMediaExtensions = { + Enabled = false; + }; + Extensions = { + Install = [ "https://github.com/gorhill/uBlock/releases/download/1.52.2/uBlock0_1.52.2.firefox.signed.xpi" ]; + }; + ExtensionUpdate = false; + FirefoxHome = { + Snippets = false; + TopSites = false; + Highlights = false; + Pocket = false; + SponsoredTopSites = false; + SponsoredPocket = false; + }; + FirefoxSuggest = { + ImproveSuggest = false; + SponsoredSuggestions = false; + WebSuggestions = false; + }; + GoToIntranetSiteForSingleWordEntryInAddressBar = true; + LocalFileLinks = [ + "file://" + "https://*.rory.gay" + "http://*.localhost" + "http://localhost" + ]; + PictureInPicture = false; + SearchSuggestEnabled = false; + UserMessaging = { + WhatsNew = false; + ExtensionRecommendations = false; + UrlbarInterventions = false; + SkipOnboarding = true; + MoreFromMozilla = false; + Locked = true; + }; + WebsiteFilter = { + Block = import ../../data/domain_lists/airelle.nix; + }; + WindowsSSO = true; +} diff --git a/modules/software-templates/profilers.nix b/modules/software-templates/profilers.nix index ce55c4e..99090da 100644 --- a/modules/software-templates/profilers.nix +++ b/modules/software-templates/profilers.nix @@ -1,10 +1,16 @@ -{ config, lib, pkgs, home-manager, ... }: +{ + config, + lib, + pkgs, + home-manager, + ... +}: { - environment.systemPackages = with pkgs; [ - kcachegrind - linuxKernel.packages.linux_5_15.perf - hotspot - valgrind - ]; -} \ No newline at end of file + environment.systemPackages = with pkgs; [ + kcachegrind + linuxKernel.packages.linux_5_15.perf + hotspot + valgrind + ]; +} diff --git a/modules/users/Alice.nix b/modules/users/Alice.nix index e2e343a..465754a 100755 --- a/modules/users/Alice.nix +++ b/modules/users/Alice.nix @@ -2,16 +2,13 @@ { imports = [ groups/BugMine-contrib.nix ]; - users.groups.Alice = {}; + users.groups.Alice = { }; users.users.Alice = { isSystemUser = true; extraGroups = [ "BugMine-contrib" ]; group = "Alice"; home = "/group/bugmine-contrib"; shell = "${pkgs.git}/bin/git-shell"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb52m1rnJSffSOJvN6OYkKgK0TmiRKE4SbOKlkT8Tvn" - ]; + openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPb52m1rnJSffSOJvN6OYkKgK0TmiRKE4SbOKlkT8Tvn" ]; }; } - diff --git a/modules/users/Rory.client.nix b/modules/users/Rory.client.nix index b74bbd9..ec1692c 100755 --- a/modules/users/Rory.client.nix +++ b/modules/users/Rory.client.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, home-manager, ... }: +{ + config, + lib, + pkgs, + home-manager, + ... +}: { programs = { @@ -12,8 +18,8 @@ services.gnome-keyring.enable = lib.mkForce false; dconf.settings = { "org/virt-manager/virt-manager/connections" = { - autoconnect = ["qemu:///system"]; - uris = ["qemu:///system"]; + autoconnect = [ "qemu:///system" ]; + uris = [ "qemu:///system" ]; }; }; # keepassxc, maybe? @@ -23,24 +29,24 @@ # #After = [ "graphical-session-pre.target" ]; # PartOf = [ "default.target" ]; # }; -# + # # Install = { WantedBy = [ "default.target" ]; }; -# + # # Service = { # ExecStart = "${pkgs.keepassxc}/bin/keepassxc ~/.secrets.kdbx"; # Restart = "always"; # }; #}; -# + # #systemd.user.services.easyeffects = { # Unit = { # Description = "EasyEffects"; # #After = [ "graphical-session-pre.target" ]; # PartOf = [ "default.target" ]; # }; -# + # # Install = { WantedBy = [ "default.target" ]; }; -# + # # Service = { # ExecStart = "${pkgs.easyeffects}/bin/easyeffects"; # Restart = "always"; @@ -50,4 +56,3 @@ home.stateVersion = "22.11"; }; } - diff --git a/modules/users/Rory.nix b/modules/users/Rory.nix index a31e8c2..5e09c09 100755 --- a/modules/users/Rory.nix +++ b/modules/users/Rory.nix @@ -1,9 +1,19 @@ -{ config, lib, pkgs, home-manager, ... }: +{ + config, + lib, + pkgs, + home-manager, + ... +}: { users.users.Rory = { isNormalUser = true; - extraGroups = [ "wheel" "libvirtd" "ocp" ]; + extraGroups = [ + "wheel" + "libvirtd" + "ocp" + ]; packages = with pkgs; [ lnav age @@ -44,14 +54,14 @@ EDITOR = "nvim"; SYSTEMD_EDITOR = "nvim"; GIT_EDITOR = "nvim"; - QT_QPA_PLATFORMTHEME="xdgdesktopportal"; - GTK_USE_PORTAL="1"; - _JAVA_AWT_WM_NONREPARENTING="1"; - WINEDEBUG="-all"; - CHOKIDAR_USEPOLLING="true"; - MSBUILDLIVELOGGER="auto"; - DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER="1"; - DOTNET_CLI_TELEMETRY_OPTOUT="1"; + QT_QPA_PLATFORMTHEME = "xdgdesktopportal"; + GTK_USE_PORTAL = "1"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + WINEDEBUG = "-all"; + CHOKIDAR_USEPOLLING = "true"; + MSBUILDLIVELOGGER = "auto"; + DOTNET_WATCH_SUPPRESS_LAUNCH_BROWSER = "1"; + DOTNET_CLI_TELEMETRY_OPTOUT = "1"; NIXPKGS_ALLOW_UNFREE = "1"; MOZ_USE_XINPUT2 = "1"; }; @@ -99,7 +109,7 @@ export DISABLE_AUTO_UPDATE=true COMPLETION_WAITING_DOTS="true" - ''; + ''; initExtra = '' alias mv='mv -v' alias pre='npx prettier -w' @@ -115,15 +125,15 @@ alias transfetch='neofetch --kitty ~/trans_witch.jpg' alias gc='git-commit' [ -f "$HOME/.profile" ] && . $HOME/.profile - ''; - #alias knconfig='cp .config ../$(date ''+%Y%m%d_%k%M%S\'').config -v; make CC=clang LLVM=1 nconfig' + ''; + #alias knconfig='cp .config ../$(date ''+%Y%m%d_%k%M%S\'').config -v; make CC=clang LLVM=1 nconfig' oh-my-zsh = { enable = true; plugins = [ "git" "sudo" ]; - }; + }; plugins = [ { @@ -189,7 +199,7 @@ vimdiffAlias = true; coc = { enable = true; - + }; }; }; @@ -205,4 +215,3 @@ home.stateVersion = "22.11"; }; } - diff --git a/modules/users/chris.nix b/modules/users/chris.nix index 86acee5..3ab5d98 100755 --- a/modules/users/chris.nix +++ b/modules/users/chris.nix @@ -10,9 +10,6 @@ nodejs-slim ]; #initialPassword = "password"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd9U0+wKjBG3Q9Qg249xJY+ybYeRV9/VMPjuwKvFBEI" - ]; + openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMd9U0+wKjBG3Q9Qg249xJY+ybYeRV9/VMPjuwKvFBEI" ]; }; } - diff --git a/modules/users/db2k.nix b/modules/users/db2k.nix index a6dc7cd..65457a4 100755 --- a/modules/users/db2k.nix +++ b/modules/users/db2k.nix @@ -1,16 +1,13 @@ { config, pkgs, ... }: { - users.groups.db2k = {}; + users.groups.db2k = { }; users.users.db2k = { isSystemUser = true; extraGroups = [ "ocp" ]; group = "db2k"; home = "/data/nginx/html_git/.ocp"; shell = "${pkgs.git}/bin/git-shell"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMfXA4Oh0LZqY8LAS/lnANKVDBlemHGPWdtep1GE/LId garyzipperer09@gmail.com" - ]; + openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMfXA4Oh0LZqY8LAS/lnANKVDBlemHGPWdtep1GE/LId garyzipperer09@gmail.com" ]; }; } - diff --git a/modules/users/groups/BugMine-contrib.nix b/modules/users/groups/BugMine-contrib.nix index 636afba..3b3ce07 100644 --- a/modules/users/groups/BugMine-contrib.nix +++ b/modules/users/groups/BugMine-contrib.nix @@ -1,5 +1,5 @@ { config, pkgs, ... }: { - users.groups.BugMine-contrib = {}; + users.groups.BugMine-contrib = { }; } diff --git a/modules/users/ks.nix b/modules/users/ks.nix index 878e55b..1039fd1 100755 --- a/modules/users/ks.nix +++ b/modules/users/ks.nix @@ -1,16 +1,21 @@ -{ config, pkgs, home-manager, ... }: +{ + config, + pkgs, + home-manager, + ... +}: { users.users.ks = { isNormalUser = true; - extraGroups = [ "wheel" "ocp" ]; - packages = with pkgs; [ + extraGroups = [ + "wheel" + "ocp" ]; + packages = with pkgs; [ ]; #initialPassword = "password"; - openssh.authorizedKeys.keys = [ - "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPUDh1WPUF6mPQ1E38ozUjY/DZhEbwZL37eZ51DgpuLo ks" - ]; + openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPUDh1WPUF6mPQ1E38ozUjY/DZhEbwZL37eZ51DgpuLo ks" ]; }; home-manager.users.ks = { @@ -28,4 +33,3 @@ home.stateVersion = "22.11"; }; } - diff --git a/modules/users/levi.nix b/modules/users/levi.nix index bb28656..8112df2 100755 --- a/modules/users/levi.nix +++ b/modules/users/levi.nix @@ -1,7 +1,7 @@ { config, pkgs, ... }: { - users.groups.levi = {}; + users.groups.levi = { }; users.users.levi = { isSystemUser = true; extraGroups = [ "ocp" ]; @@ -15,4 +15,3 @@ ]; }; } - |