From 2889fc6eec5d99c5f7cf4df5a7e04f20a17dfb4f Mon Sep 17 00:00:00 2001 From: dusk Date: Fri, 25 Apr 2025 14:42:54 +0000 Subject: [PATCH] style: format everything tm --- flake.nix | 99 ++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------- treefmt.toml | 2 +- hosts/default.nix | 27 ++++++++++++++------------- lib/default.nix | 32 +++++++++++++++++--------------- lib/systems.nix | 2 +- locale/default.nix | 8 ++++++-- modules/github.nix | 3 ++- pkgs-set/default.nix | 43 ++++++++++++++++--------------------------- pkgs-set/pkgs-to-export.nix | 15 ++++++--------- secrets/secrets.nix | 40 +++++++++++++++++++++++++++++++--------- shells/default.nix | 55 +++++++++++++++++++++++++++++++++---------------------- hosts/lungmen/default.nix | 86 +++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------- hosts/tkaronto/default.nix | 51 +++++++++++++++++++++++++++++++++++++-------------- hosts/wolumonde/default.nix | 24 ++++++++++++++---------- hosts/wsl/default.nix | 19 +++++++++---------- modules/ananicy/default.nix | 6 ++++-- modules/base/default.nix | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------- modules/base/hm-system-defaults.nix | 39 +++++++++++++++++++++------------------ modules/base/nix.nix | 20 ++++++++++++-------- modules/cachix/default.nix | 8 +++++--- modules/cachix/helix.nix | 4 ++-- modules/cachix/nix-community.nix | 4 ++-- modules/develop/default.nix | 10 +++++++--- modules/flatpak/default.nix | 3 ++- modules/gamemode/default.nix | 6 ++++-- modules/gnome-boxes/default.nix | 7 ++++--- modules/libvirtd/default.nix | 3 ++- modules/network/default.nix | 2 +- modules/network/wpa_supplicant.nix | 2 +- modules/persist/default.nix | 3 ++- modules/persist/null.nix | 5 +++-- modules/syncthing/default.nix | 5 +++-- pkgs-set/overlays/agenix.nix | 3 ++- pkgs-set/overlays/calf.nix | 9 ++++++++- pkgs-set/overlays/musikcube.nix | 3 ++- pkgs-set/overlays/nur.nix | 2 +- pkgs-set/overlays/prismlauncher.nix | 5 +++-- pkgs-set/overlays/rofi-bluetooth.nix | 18 +++++++++--------- pkgs-set/overlays/steam.nix | 12 ++++++++++-- pkgs-set/pkgs/comic-mono.nix | 11 ++++++----- pkgs-set/pkgs/discordo.nix | 25 +++++++++++++------------ pkgs-set/pkgs/fluidsynth-dssi.nix | 19 +++++++++++++++++-- pkgs-set/pkgs/fractal-next.nix | 7 ++++++- pkgs-set/pkgs/phantom.nix | 2 +- users/firewatch/default.nix | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------- users/patriot/default.nix | 408 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ users/patriot/stylix.nix | 65 ++++++++++++++++++++++++++++++++++------------------------------- users/root/default.nix | 3 ++- hosts/tkaronto/modules/boot.nix | 15 +++++++++------ hosts/tkaronto/modules/fs.nix | 22 +++++++++++++++++----- hosts/tkaronto/modules/iphone.nix | 5 +++-- hosts/tkaronto/modules/secrets.nix | 2 +- hosts/tkaronto/modules/wireguard.nix | 5 +++-- hosts/wolumonde/modules/arpa.nix | 4 ++-- hosts/wolumonde/modules/atproto.nix | 60 +++++++++++++++++++++++++++++++++++------------------------- hosts/wolumonde/modules/bernbot.nix | 12 +++++++----- hosts/wolumonde/modules/blog.nix | 15 ++++++++++----- hosts/wolumonde/modules/forgejo.nix | 3 ++- hosts/wolumonde/modules/hardware-configuration.nix | 13 +++++++++---- hosts/wolumonde/modules/hedgedoc.nix | 6 ++++-- hosts/wolumonde/modules/limbusart.nix | 12 +++++++----- hosts/wolumonde/modules/nginx.nix | 5 +++-- hosts/wolumonde/modules/nixinate.nix | 3 ++- hosts/wolumonde/modules/pds.nix | 19 ++++++++++--------- hosts/wolumonde/modules/secrets.nix | 3 ++- hosts/wolumonde/modules/ssh.nix | 3 ++- hosts/wolumonde/modules/tailscale.nix | 2 +- hosts/wolumonde/modules/webhook.nix | 3 ++- hosts/wsl/modules/secrets.nix | 2 +- modules/de/budgie/default.nix | 3 ++- modules/de/gnome/default.nix | 3 ++- modules/de/greetd/default.nix | 3 ++- modules/develop/editor/default.nix | 11 ++++++++--- modules/develop/editor/helix.nix | 12 ++++++++---- modules/develop/editor/kakoune.nix | 12 ++++++++---- modules/develop/nixbuild/default.nix | 10 +++++++--- modules/network/dns/cloudflare.nix | 8 ++++++-- modules/network/dns/default.nix | 2 +- modules/network/dns/nextdns.nix | 5 ++++- modules/network/iwd/default.nix | 8 ++++++-- modules/network/networkmanager/default.nix | 10 +++++++--- users/modules/arrpc/default.nix | 5 +++-- users/modules/chromium/default.nix | 3 ++- users/modules/code/default.nix | 3 ++- users/modules/discord/default.nix | 55 +++++++++++++++++++++++++++++-------------------------- users/modules/discordrp-mpris/default.nix | 5 +++-- users/modules/dunst/default.nix | 7 +++++-- users/modules/firefox/default.nix | 14 ++++++++------ users/modules/firefox/extensions.nix | 5 +++-- users/modules/fluxbox/default.nix | 3 ++- users/modules/foot/default.nix | 3 ++- users/modules/fzf/default.nix | 3 ++- users/modules/git/default.nix | 3 ++- users/modules/godot/default.nix | 5 +++-- users/modules/helix/default.nix | 31 +++++++++++++++++++++++++------ users/modules/hyprland/config.nix | 29 ++++++++++++++++++----------- users/modules/hyprland/default.nix | 3 ++- users/modules/hyprland/swayidle.nix | 10 +++++++--- users/modules/lollypop/default.nix | 9 ++++++--- users/modules/mako/default.nix | 3 ++- users/modules/musikcube/default.nix | 14 +++++++++----- users/modules/musikcubed/default.nix | 13 ++++++++----- users/modules/newsflash/default.nix | 5 +++-- users/modules/obsidian/default.nix | 9 ++++++--- users/modules/premid/default.nix | 5 +++-- users/modules/psd/default.nix | 11 ++++++++--- users/modules/ripcord/default.nix | 5 +++-- users/modules/rofi-nm/default.nix | 10 ++++++---- users/modules/rofi/default.nix | 3 ++- users/modules/s3s/default.nix | 5 +++-- users/modules/settings/default.nix | 6 ++++-- users/modules/smos/default.nix | 8 +++++--- users/modules/spotify/default.nix | 5 +++-- users/modules/ssh/default.nix | 3 ++- users/modules/starship/default.nix | 3 ++- users/modules/sway/default.nix | 196 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------------------------------------------------------- users/modules/swaylock/default.nix | 3 ++- users/modules/urxvt/default.nix | 3 ++- users/modules/vesktop/default.nix | 5 +++-- users/modules/wayland/default.nix | 3 ++- users/modules/wezterm/default.nix | 5 +++-- users/modules/wlsunset/default.nix | 6 ++++-- users/modules/wtf/default.nix | 5 ++++- users/modules/zoxide/default.nix | 5 +++-- users/modules/zsh/default.nix | 24 ++++++++++++++++-------- hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix | 10 +++++++--- modules/network/dns/stubby/default.nix | 2 +- modules/network/dns/stubby/nextdns.nix | 26 ++++++++++++++------------ 128 file(s) changed, 1368 insertion(s)(+), 966 deletion(s)(-) diff --git a/flake.nix b/flake.nix --- a/flake.nix +++ b/flake.nix @@ -86,59 +86,56 @@ # catppuccin-discord.flake = false; }; - outputs = inputs: let - lib = inputs.nixpkgs.lib.extend (_: _: builtins); - tlib = (import ./lib lib).extend (_: prev: rec { - makePkgs = system: - import ./pkgs-set { - inherit system lib inputs; - tlib = prev; - }; - genPkgs = f: prev.genSystems (system: f (makePkgs system)); - }); - - allPkgs = tlib.genPkgs (x: x); - - miscApps = - lib.mapAttrs - ( - _: cmds: - lib.mapAttrs - (_: cmd: { - type = "app"; - program = cmd; - }) - cmds - ) - ( - lib.mapAttrs - ( - _: pkgs: { - generate-firefox-addons = - toString - "${pkgs.generate-firefox-addons}/bin/generate-firefox-addons"; - dns = toString "${pkgs.dnsmngmt}/bin/dns"; - nh = toString "${inputs.nh.packages.${pkgs.system}.default}/bin/nh"; - } - ) - allPkgs + outputs = + inputs: + let + lib = inputs.nixpkgs.lib.extend (_: _: builtins); + tlib = (import ./lib lib).extend ( + _: prev: rec { + makePkgs = + system: + import ./pkgs-set { + inherit system lib inputs; + tlib = prev; + }; + genPkgs = f: prev.genSystems (system: f (makePkgs system)); + } ); - in { - lib = tlib; - nixosConfigurations = import ./hosts {inherit lib tlib inputs;}; - packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs; - legacyPackages = allPkgs; - apps = miscApps - // (inputs.nixinate.nixinate.x86_64-linux inputs.self); + allPkgs = tlib.genPkgs (x: x); - # topology = lib.mapAttrs (_: pkgs: - # import inputs.nixtopo { - # inherit pkgs; - # modules = [{nixosConfigurations = {inherit (inputs.self.nixosConfigurations) wolumonde;};}]; - # }) - # allPkgs; + miscApps = + lib.mapAttrs + ( + _: cmds: + lib.mapAttrs (_: cmd: { + type = "app"; + program = cmd; + }) cmds + ) + ( + lib.mapAttrs (_: pkgs: { + generate-firefox-addons = toString "${pkgs.generate-firefox-addons}/bin/generate-firefox-addons"; + dns = toString "${pkgs.dnsmngmt}/bin/dns"; + nh = toString "${inputs.nh.packages.${pkgs.system}.default}/bin/nh"; + }) allPkgs + ); + in + { + lib = tlib; + nixosConfigurations = import ./hosts { inherit lib tlib inputs; }; - devShells = import ./shells {inherit lib tlib inputs;}; - }; + packages = lib.mapAttrs (_: pkgs: pkgs._exported) allPkgs; + legacyPackages = allPkgs; + apps = miscApps // (inputs.nixinate.nixinate.x86_64-linux inputs.self); + + # topology = lib.mapAttrs (_: pkgs: + # import inputs.nixtopo { + # inherit pkgs; + # modules = [{nixosConfigurations = {inherit (inputs.self.nixosConfigurations) wolumonde;};}]; + # }) + # allPkgs; + + devShells = import ./shells { inherit lib tlib inputs; }; + }; } diff --git a/treefmt.toml b/treefmt.toml --- a/treefmt.toml +++ b/treefmt.toml @@ -2,7 +2,7 @@ [formatter.nix] # Formatter to run -command = "alejandra" +command = "nixfmt" # Command-line arguments for the command options = [] # Glob pattern of files to include diff --git a/hosts/default.nix b/hosts/default.nix --- a/hosts/default.nix +++ b/hosts/default.nix @@ -3,26 +3,27 @@ lib, tlib, ... -}: let +}: +let baseModules = [ ../modules ../locale inputs.home.nixosModules.default ]; - mkSystem = name: system: let - pkgs = tlib.makePkgs system; - in + mkSystem = + name: system: + let + pkgs = tlib.makePkgs system; + in lib.nixosSystem { inherit system; - modules = - baseModules - ++ [ - {networking.hostName = name;} - {nixpkgs.pkgs = pkgs;} - (import (./. + "/${name}/default.nix")) - ]; - specialArgs = {inherit inputs tlib;}; + modules = baseModules ++ [ + { networking.hostName = name; } + { nixpkgs.pkgs = pkgs; } + (import (./. + "/${name}/default.nix")) + ]; + specialArgs = { inherit inputs tlib; }; }; systems = { @@ -32,4 +33,4 @@ wsl = "x86_64-linux"; }; in - lib.mapAttrs mkSystem systems +lib.mapAttrs mkSystem systems diff --git a/lib/default.nix b/lib/default.nix --- a/lib/default.nix +++ b/lib/default.nix @@ -3,22 +3,24 @@ defaultSystems = import ./systems.nix; genSystems = lib.genAttrs self.defaultSystems; - pkgBin = pkg: - if (pkg.meta or {}) ? mainProgram - then "${pkg}/bin/${pkg.meta.mainProgram}" - else "${pkg}/bin/${pkg.pname}"; + pkgBin = + pkg: + if (pkg.meta or { }) ? mainProgram then + "${pkg}/bin/${pkg.meta.mainProgram}" + else + "${pkg}/bin/${pkg.pname}"; - prefixStrings = prefix: strings: - lib.forEach strings (string: "${prefix}${string}"); + prefixStrings = prefix: strings: lib.forEach strings (string: "${prefix}${string}"); - importFolder = modules: let - b = builtins; - files = b.readDir modules; - fileNames = b.attrNames files; - filesToImport = - b.map - (name: "${modules}/${name}") - (b.filter (name: b.match ".*\.nix" name != null) fileNames); - in + importFolder = + modules: + let + b = builtins; + files = b.readDir modules; + fileNames = b.attrNames files; + filesToImport = b.map (name: "${modules}/${name}") ( + b.filter (name: b.match ".*\.nix" name != null) fileNames + ); + in filesToImport; }) diff --git a/lib/systems.nix b/lib/systems.nix --- a/lib/systems.nix +++ b/lib/systems.nix @@ -1,1 +1,1 @@ -["x86_64-linux"] +[ "x86_64-linux" ] diff --git a/locale/default.nix b/locale/default.nix --- a/locale/default.nix +++ b/locale/default.nix @@ -1,7 +1,11 @@ -{...}: { +{ ... }: +{ i18n = { defaultLocale = "en_US.UTF-8"; - supportedLocales = ["en_US.UTF-8/UTF-8" "tr_TR.UTF-8/UTF-8"]; + supportedLocales = [ + "en_US.UTF-8/UTF-8" + "tr_TR.UTF-8/UTF-8" + ]; }; time.timeZone = "Turkey"; services.xserver.xkb.layout = "us"; diff --git a/modules/github.nix b/modules/github.nix --- a/modules/github.nix +++ b/modules/github.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ nix.extraOptions = '' !include ${config.age.secrets.nixGithubAccessToken.path} ''; diff --git a/pkgs-set/default.nix b/pkgs-set/default.nix --- a/pkgs-set/default.nix +++ b/pkgs-set/default.nix @@ -4,30 +4,19 @@ lib, tlib, ... -}: let +}: +let l = lib; - overlays = - l.mapAttrsToList - ( - name: _: let - o = import "${./.}/overlays/${name}"; - in - if (l.functionArgs o) ? inputs - then o {inherit inputs;} - else o - ) - (l.readDir ./overlays); - newPkgs = - l.mapAttrsToList - ( - name: _: final: prev: { - ${l.removeSuffix ".nix" name} = - final.callPackage - "${./pkgs}/${name}" - {inherit inputs tlib;}; - } - ) - (l.readDir ./pkgs); + overlays = l.mapAttrsToList ( + name: _: + let + o = import "${./.}/overlays/${name}"; + in + if (l.functionArgs o) ? inputs then o { inherit inputs; } else o + ) (l.readDir ./overlays); + newPkgs = l.mapAttrsToList (name: _: final: prev: { + ${l.removeSuffix ".nix" name} = final.callPackage "${./pkgs}/${name}" { inherit inputs tlib; }; + }) (l.readDir ./pkgs); pkgs = import inputs.nixpkgs { inherit system; config.allowUnfree = true; @@ -37,7 +26,7 @@ }; pkgsToExport = import ./pkgs-to-export.nix pkgs; in - pkgs - // { - _exported = pkgsToExport; - } +pkgs +// { + _exported = pkgsToExport; +} diff --git a/pkgs-set/pkgs-to-export.nix b/pkgs-set/pkgs-to-export.nix --- a/pkgs-set/pkgs-to-export.nix +++ b/pkgs-set/pkgs-to-export.nix @@ -1,9 +1,6 @@ -pkgs: ( - pkgs.lib.getAttrs - [ - "phantom" - "comic-mono" - "bitwig-studio" - ] - pkgs -) +pkgs: +(pkgs.lib.getAttrs [ + "phantom" + "comic-mono" + "bitwig-studio" +] pkgs) diff --git a/secrets/secrets.nix b/secrets/secrets.nix --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,13 +1,35 @@ let yusdacra = builtins.readFile ./yusdacra.key.pub; wolumonde = builtins.readFile ./wolumonde.key.pub; -in { - "bernbotToken.age".publicKeys = [yusdacra wolumonde]; - "musikquadConfig.age".publicKeys = [yusdacra wolumonde]; - "nixGithubAccessToken.age".publicKeys = [yusdacra]; - "websiteConfig.age".publicKeys = [yusdacra wolumonde]; - "forgejoActRunnerToken.age".publicKeys = [yusdacra wolumonde]; - "xrayConfig.age".publicKeys = [yusdacra wolumonde]; - "pdsConfig.age".publicKeys = [yusdacra wolumonde]; - "webhookAuth.age".publicKeys = [yusdacra wolumonde]; +in +{ + "bernbotToken.age".publicKeys = [ + yusdacra + wolumonde + ]; + "musikquadConfig.age".publicKeys = [ + yusdacra + wolumonde + ]; + "nixGithubAccessToken.age".publicKeys = [ yusdacra ]; + "websiteConfig.age".publicKeys = [ + yusdacra + wolumonde + ]; + "forgejoActRunnerToken.age".publicKeys = [ + yusdacra + wolumonde + ]; + "xrayConfig.age".publicKeys = [ + yusdacra + wolumonde + ]; + "pdsConfig.age".publicKeys = [ + yusdacra + wolumonde + ]; + "webhookAuth.age".publicKeys = [ + yusdacra + wolumonde + ]; } diff --git a/shells/default.nix b/shells/default.nix --- a/shells/default.nix +++ b/shells/default.nix @@ -3,25 +3,36 @@ inputs, ... }: -tlib.genPkgs (pkgs: let - mkNakedShell = pkgs.callPackage inputs.naked-shell {}; - agenix-wrapped = pkgs.writeShellApplication { - name = "agenix"; - runtimeInputs = [pkgs.agenix]; - text = '' - if [ -z "''${1-}" ]; then - agenix - else - RULES="$FLAKE/secrets/secrets.nix" agenix -i "$FLAKE/ssh_key" "$@" - fi - ''; - }; -in { - default = mkNakedShell { - name = "prts"; - packages = (with pkgs; [git nixfmt-rfc-style treefmt rage]) ++ [agenix-wrapped]; - shellHook = '' - echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\" - ''; - }; -}) +tlib.genPkgs ( + pkgs: + let + mkNakedShell = pkgs.callPackage inputs.naked-shell { }; + agenix-wrapped = pkgs.writeShellApplication { + name = "agenix"; + runtimeInputs = [ pkgs.agenix ]; + text = '' + if [ -z "''${1-}" ]; then + agenix + else + RULES="$FLAKE/secrets/secrets.nix" agenix -i "$FLAKE/ssh_key" "$@" + fi + ''; + }; + in + { + default = mkNakedShell { + name = "prts"; + packages = + (with pkgs; [ + git + nixfmt-rfc-style + treefmt + rage + ]) + ++ [ agenix-wrapped ]; + shellHook = '' + echo \"$(tput bold)welcome to PRTS, $USER$(tput sgr0)\" + ''; + }; + } +) diff --git a/hosts/lungmen/default.nix b/hosts/lungmen/default.nix --- a/hosts/lungmen/default.nix +++ b/hosts/lungmen/default.nix @@ -4,24 +4,31 @@ pkgs, inputs, ... -}: let +}: +let btrfsPartPath = "/dev/disk/by-label/NIXOS"; - btrfsOptions = ["compress-force=zstd" "noatime"]; -in { - imports = with inputs; - with nixos-hardware.nixosModules; [ - nixpkgs.nixosModules.notDetected - nixos-persistence.nixosModule - common-pc-ssd - common-pc - common-gpu-amd - common-cpu-amd - ../../modules/persist - ../../modules/network - #../../modules/develop/nixbuild - ../../users/root - ../../users/patriot + btrfsOptions = [ + "compress-force=zstd" + "noatime" ]; +in +{ + imports = + with inputs; + with nixos-hardware.nixosModules; + [ + nixpkgs.nixosModules.notDetected + nixos-persistence.nixosModule + common-pc-ssd + common-pc + common-gpu-amd + common-cpu-amd + ../../modules/persist + ../../modules/network + #../../modules/develop/nixbuild + ../../users/root + ../../users/patriot + ]; system.persistDir = "/persist"; @@ -33,30 +40,42 @@ systemd-boot.configurationLimit = 10; }; kernelPackages = pkgs.linuxPackages_latest; - supportedFilesystems = ["btrfs"]; + supportedFilesystems = [ "btrfs" ]; initrd = { - availableKernelModules = ["xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod"]; - kernelModules = ["amdgpu"]; + availableKernelModules = [ + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; + kernelModules = [ "amdgpu" ]; }; - kernelModules = ["kvm-amd"]; - extraModulePackages = []; - kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;}; + kernelModules = [ "kvm-amd" ]; + extraModulePackages = [ ]; + kernel.sysctl = { + "fs.inotify.max_user_watches" = 524288; + }; }; fileSystems."/" = { device = "none"; fsType = "tmpfs"; - options = ["defaults" "size=2G" "mode=755"]; + options = [ + "defaults" + "size=2G" + "mode=755" + ]; }; fileSystems."/nix" = { device = btrfsPartPath; fsType = "btrfs"; - options = ["subvol=nix"] ++ btrfsOptions; + options = [ "subvol=nix" ] ++ btrfsOptions; }; fileSystems."${config.system.persistDir}" = { device = btrfsPartPath; fsType = "btrfs"; - options = ["subvol=persist"] ++ btrfsOptions; + options = [ "subvol=persist" ] ++ btrfsOptions; neededForBoot = true; }; fileSystems."/boot" = { @@ -64,7 +83,7 @@ fsType = "vfat"; }; - swapDevices = []; + swapDevices = [ ]; zramSwap = { enable = true; algorithm = "zstd"; @@ -113,7 +132,8 @@ vulkan-loader amdvlk ]; - extraPackages32 = with pkgs.pkgsi686Linux; + extraPackages32 = + with pkgs.pkgsi686Linux; [ libvdpau-va-gl vaapiVdpau @@ -133,15 +153,15 @@ fonts = { enableDefaultFonts = true; fontconfig.enable = true; - fonts = [pkgs.dejavu_fonts]; + fonts = [ pkgs.dejavu_fonts ]; }; environment = { - systemPackages = [pkgs.ntfs3g]; - pathsToLink = ["/share/zsh"]; + systemPackages = [ pkgs.ntfs3g ]; + pathsToLink = [ "/share/zsh" ]; persistence."${config.system.persistDir}" = { - directories = ["/etc/nixos"]; - files = ["/etc/machine-id"]; + directories = [ "/etc/nixos" ]; + files = [ "/etc/machine-id" ]; }; }; @@ -156,7 +176,7 @@ autoMount = true; }; flatpak.enable = false; - xserver.videoDrivers = ["amdgpu"]; + xserver.videoDrivers = [ "amdgpu" ]; }; system.stateVersion = "22.05"; diff --git a/hosts/tkaronto/default.nix b/hosts/tkaronto/default.nix --- a/hosts/tkaronto/default.nix +++ b/hosts/tkaronto/default.nix @@ -5,9 +5,11 @@ pkgs, inputs, ... -}: { - imports = with inputs; - with nixos-hardware.nixosModules; +}: +{ + imports = + with inputs; + with nixos-hardware.nixosModules; [ # vfio.nixosModules.kvmfr # vfio.nixosModules.virtualisation @@ -66,7 +68,10 @@ support32Bit = true; }; - services.xserver.videoDrivers = ["nvidia" "amdgpu"]; + services.xserver.videoDrivers = [ + "nvidia" + "amdgpu" + ]; hardware = { nvidia = { package = config.boot.kernelPackages.nvidiaPackages.production; @@ -112,29 +117,47 @@ fonts = { enableDefaultPackages = true; fontconfig.enable = true; - packages = [pkgs.dejavu_fonts]; + packages = [ pkgs.dejavu_fonts ]; }; environment = { sessionVariables.FLAKE = "/etc/nixos"; - pathsToLink = ["/share/zsh"]; + pathsToLink = [ "/share/zsh" ]; persistence."${config.system.persistDir}" = { directories = lib.flatten [ "/etc/nixos" - ( - lib.optional - config.virtualisation.docker.enable - ["/var/lib/docker" "/var/lib/containers"] - ) + (lib.optional config.virtualisation.docker.enable [ + "/var/lib/docker" + "/var/lib/containers" + ]) ]; - files = ["/etc/machine-id"]; + files = [ "/etc/machine-id" ]; }; }; # warframe - networking.firewall.allowedUDPPorts = [4990 4991 4992 4993 4994 4995]; + networking.firewall.allowedUDPPorts = [ + 4990 + 4991 + 4992 + 4993 + 4994 + 4995 + ]; # musikcube - networking.firewall.allowedTCPPorts = [7905 7906] ++ [6695 6696 6697 6698 6699] ++ [50300]; + networking.firewall.allowedTCPPorts = + [ + 7905 + 7906 + ] + ++ [ + 6695 + 6696 + 6697 + 6698 + 6699 + ] + ++ [ 50300 ]; # for tailscale networking.firewall.checkReversePath = "loose"; diff --git a/hosts/wolumonde/default.nix b/hosts/wolumonde/default.nix --- a/hosts/wolumonde/default.nix +++ b/hosts/wolumonde/default.nix @@ -3,15 +3,14 @@ tlib, pkgs, ... -}: { - imports = - [ - inputs.agenix.nixosModules.default - # inputs.nixtopo.nixosModules.default - ] - ++ (tlib.importFolder (toString ./modules)); +}: +{ + imports = [ + inputs.agenix.nixosModules.default + # inputs.nixtopo.nixosModules.default + ] ++ (tlib.importFolder (toString ./modules)); - environment.systemPackages = [pkgs.magic-wormhole-rs]; + environment.systemPackages = [ pkgs.magic-wormhole-rs ]; boot.tmp.cleanOnBoot = true; zramSwap.enable = true; @@ -19,8 +18,13 @@ # firewall stuffs networking.firewall = { enable = true; - allowedTCPPorts = [22 80 443 5005]; - allowedUDPPortRanges = []; + allowedTCPPorts = [ + 22 + 80 + 443 + 5005 + ]; + allowedUDPPortRanges = [ ]; }; virtualisation.docker.enable = true; diff --git a/hosts/wsl/default.nix b/hosts/wsl/default.nix --- a/hosts/wsl/default.nix +++ b/hosts/wsl/default.nix @@ -5,15 +5,14 @@ pkgs, inputs, ... -}: { - imports = - [ - ../../users/root - ../../users/firewatch - inputs.nixos-wsl.nixosModules.wsl - inputs.agenix.nixosModules.default - ] - ++ (tlib.importFolder (toString ./modules)); +}: +{ + imports = [ + ../../users/root + ../../users/firewatch + inputs.nixos-wsl.nixosModules.wsl + inputs.agenix.nixosModules.default + ] ++ (tlib.importFolder (toString ./modules)); wsl.enable = true; wsl.defaultUser = "firewatch"; @@ -22,7 +21,7 @@ networking.hostName = "wsl"; - environment.systemPackages = [pkgs.wget]; + environment.systemPackages = [ pkgs.wget ]; environment.sessionVariables = { FLAKE = "/home/firewatch/ark"; }; diff --git a/modules/ananicy/default.nix b/modules/ananicy/default.nix --- a/modules/ananicy/default.nix +++ b/modules/ananicy/default.nix @@ -1,9 +1,11 @@ -{lib, ...}: let +{ lib, ... }: +let l = lib // builtins; mkRule = name: type: { inherit name type; }; -in { +in +{ services.ananicy = { enable = true; extraRules = [ diff --git a/modules/base/default.nix b/modules/base/default.nix --- a/modules/base/default.nix +++ b/modules/base/default.nix @@ -5,13 +5,15 @@ lib, tlib, ... -}: let +}: +let inherit (lib) fileContents mkIf; coreBin = v: "${pkgs.coreutils}/bin/${v}"; nixBin = "${config.nix.package}/bin/nix"; pkgBin = tlib.pkgBin; -in { +in +{ imports = [ ./nix.nix ./hm-system-defaults.nix @@ -55,46 +57,55 @@ git git-crypt ]; - shellAliases = let - ifSudo = string: mkIf config.security.sudo.enable string; - inherit (pkgs) git bat eza du-dust; - in { - g = pkgBin git; - git-optimize = "${pkgBin git} gc --aggressive --prune=now"; - cat = "${pkgBin bat} -pp --theme=base16"; - c = "cat"; - du = "${pkgBin du-dust}"; - df = "${coreBin "df"} -h"; - free = "${pkgs.procps}/bin/free -h"; - ls = pkgBin eza; - l = "${pkgBin eza} -lhg"; - la = "${pkgBin eza} -lhg -a"; - t = "${pkgBin eza} -lhg -T"; - ta = "${pkgBin eza} -lhg -a -T"; - n = nixBin; - nb = "${nixBin} build"; - nf = "${nixBin} flake"; - nfu = "${nixBin} flake update"; - nfui = "${nixBin} flake update"; - nfs = "${nixBin} flake show"; - nsh = "${nixBin} shell"; - nix-store-refs = "nix-store -qR"; - nosrs = ifSudo "sudo nixos-rebuild --fast switch"; - nosrb = ifSudo "sudo nixos-rebuild --fast boot"; - nosrt = ifSudo "sudo nixos-rebuild --fast test"; - ngc = ifSudo "sudo nix-collect-garbage"; - ngcdo = ifSudo "sudo nix-collect-garbage --delete-old"; - top = "${pkgs.bottom}/bin/btm"; - myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1"; - mn = let - manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain"; - in ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix''; - # systemd - ctl = "systemctl"; - stl = ifSudo "s systemctl"; - utl = "systemctl --user"; - jtl = "journalctl"; - }; + shellAliases = + let + ifSudo = string: mkIf config.security.sudo.enable string; + inherit (pkgs) + git + bat + eza + du-dust + ; + in + { + g = pkgBin git; + git-optimize = "${pkgBin git} gc --aggressive --prune=now"; + cat = "${pkgBin bat} -pp --theme=base16"; + c = "cat"; + du = "${pkgBin du-dust}"; + df = "${coreBin "df"} -h"; + free = "${pkgs.procps}/bin/free -h"; + ls = pkgBin eza; + l = "${pkgBin eza} -lhg"; + la = "${pkgBin eza} -lhg -a"; + t = "${pkgBin eza} -lhg -T"; + ta = "${pkgBin eza} -lhg -a -T"; + n = nixBin; + nb = "${nixBin} build"; + nf = "${nixBin} flake"; + nfu = "${nixBin} flake update"; + nfui = "${nixBin} flake update"; + nfs = "${nixBin} flake show"; + nsh = "${nixBin} shell"; + nix-store-refs = "nix-store -qR"; + nosrs = ifSudo "sudo nixos-rebuild --fast switch"; + nosrb = ifSudo "sudo nixos-rebuild --fast boot"; + nosrt = ifSudo "sudo nixos-rebuild --fast test"; + ngc = ifSudo "sudo nix-collect-garbage"; + ngcdo = ifSudo "sudo nix-collect-garbage --delete-old"; + top = "${pkgs.bottom}/bin/btm"; + myip = "${pkgs.dnsutils}/bin/dig +short myip.opendns.com @208.67.222.222 2>&1"; + mn = + let + manix_preview = "manix '{}' | sed 's/type: /> type: /g' | bat -l Markdown --color=always --plain"; + in + ''manix "" | rg '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | sk --preview="${manix_preview}" | xargs manix''; + # systemd + ctl = "systemctl"; + stl = ifSudo "s systemctl"; + utl = "systemctl --user"; + jtl = "journalctl"; + }; }; system.activationScripts.diff = '' if [ -z "$systemConfig" ]; then @@ -108,7 +119,9 @@ command-not-found.enable = true; git = { enable = true; - config = {safe.directory = ["/etc/nixos"];}; + config = { + safe.directory = [ "/etc/nixos" ]; + }; }; }; } diff --git a/modules/base/hm-system-defaults.nix b/modules/base/hm-system-defaults.nix --- a/modules/base/hm-system-defaults.nix +++ b/modules/base/hm-system-defaults.nix @@ -3,7 +3,8 @@ inputs, tlib, ... -}: { +}: +{ home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.sharedModules = [ @@ -17,28 +18,30 @@ xdg.configFile."nix/nix.conf".source = config.environment.etc."nix/nix.conf".source; # xdg.configFile."nix/netrc".source = config.environment.etc."nix/netrc".source; } - ({ - config, - pkgs, - lib, - ... - }: { - home.packages = [ - ( - pkgs.writeShellScriptBin "apply-hm-env" '' - ${lib.optionalString (config.home.sessionPath != []) '' + ( + { + config, + pkgs, + lib, + ... + }: + { + home.packages = [ + (pkgs.writeShellScriptBin "apply-hm-env" '' + ${lib.optionalString (config.home.sessionPath != [ ]) '' export PATH=${builtins.concatStringsSep ":" config.home.sessionPath}:$PATH ''} - ${builtins.concatStringsSep "\n" (lib.mapAttrsToList (k: v: '' + ${builtins.concatStringsSep "\n" ( + lib.mapAttrsToList (k: v: '' export ${k}="${builtins.toString v}" - '') - config.home.sessionVariables)} + '') config.home.sessionVariables + )} ${config.home.sessionVariablesExtra} exec "$@" - '' - ) - ]; - }) + '') + ]; + } + ) ]; home-manager.extraSpecialArgs = { inherit inputs tlib; diff --git a/modules/base/nix.nix b/modules/base/nix.nix --- a/modules/base/nix.nix +++ b/modules/base/nix.nix @@ -3,12 +3,10 @@ lib, inputs, ... -}: { +}: +{ nix = { - registry = - builtins.mapAttrs - (_: v: {flake = v;}) - (lib.filterAttrs (_: v: v ? outputs) inputs); + registry = builtins.mapAttrs (_: v: { flake = v; }) (lib.filterAttrs (_: v: v ? outputs) inputs); package = pkgs.lixPackageSets.latest.lix; gc.automatic = false; optimise.automatic = true; @@ -20,12 +18,18 @@ extra-experimental-features = nix-command flakes builders-use-substitutes = true ''; - nixPath = ["nixpkgs=${inputs.nixpkgs}" "home-manager=${inputs.home}"]; + nixPath = [ + "nixpkgs=${inputs.nixpkgs}" + "home-manager=${inputs.home}" + ]; }; nix.settings = { sandbox = true; - allowed-users = ["@wheel"]; - trusted-users = ["root" "@wheel"]; + allowed-users = [ "@wheel" ]; + trusted-users = [ + "root" + "@wheel" + ]; auto-optimise-store = true; }; } diff --git a/modules/cachix/default.nix b/modules/cachix/default.nix --- a/modules/cachix/default.nix +++ b/modules/cachix/default.nix @@ -2,12 +2,14 @@ pkgs, lib, ... -}: let +}: +let folder = ./.; toImport = name: value: folder + ("/" + name); filterCaches = key: value: value == "regular" && lib.hasSuffix ".nix" key && key != "default.nix"; imports = lib.mapAttrsToList toImport (lib.filterAttrs filterCaches (builtins.readDir folder)); -in { +in +{ inherit imports; - nix.settings.substituters = ["https://cache.nixos.org/"]; + nix.settings.substituters = [ "https://cache.nixos.org/" ]; } diff --git a/modules/cachix/helix.nix b/modules/cachix/helix.nix --- a/modules/cachix/helix.nix +++ b/modules/cachix/helix.nix @@ -1,6 +1,6 @@ { nix.settings = { - substituters = ["https://helix.cachix.org"]; - trusted-public-keys = ["helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs="]; + substituters = [ "https://helix.cachix.org" ]; + trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; }; } diff --git a/modules/cachix/nix-community.nix b/modules/cachix/nix-community.nix --- a/modules/cachix/nix-community.nix +++ b/modules/cachix/nix-community.nix @@ -1,6 +1,6 @@ { nix.settings = { - substituters = ["https://nix-community.cachix.org"]; - trusted-public-keys = ["nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="]; + substituters = [ "https://nix-community.cachix.org" ]; + trusted-public-keys = [ "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" ]; }; } diff --git a/modules/develop/default.nix b/modules/develop/default.nix --- a/modules/develop/default.nix +++ b/modules/develop/default.nix @@ -1,5 +1,9 @@ -{pkgs, ...}: { - imports = [./editor]; - environment.systemPackages = with pkgs; [git tokei]; +{ pkgs, ... }: +{ + imports = [ ./editor ]; + environment.systemPackages = with pkgs; [ + git + tokei + ]; documentation.dev.enable = true; } diff --git a/modules/flatpak/default.nix b/modules/flatpak/default.nix --- a/modules/flatpak/default.nix +++ b/modules/flatpak/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ services.flatpak.enable = true; environment.persistence."${config.system.persistDir}".directories = [ "/var/lib/flatpak" diff --git a/modules/gamemode/default.nix b/modules/gamemode/default.nix --- a/modules/gamemode/default.nix +++ b/modules/gamemode/default.nix @@ -3,7 +3,8 @@ inputs, lib, ... -}: let +}: +let programs = inputs.hyprland.packages.${pkgs.system}.default; startscript = pkgs.writeShellScript "gamemode-start" '' @@ -17,7 +18,8 @@ export HYPRLAND_INSTANCE_SIGNATURE=$(ls -w1 /tmp/hypr | tail -1) hyprctl --batch 'keyword decoration:blur 1 ; keyword animations:enabled 1 ; keyword misc:no_vfr 0' ''; -in { +in +{ programs.gamemode = { enable = true; enableRenice = true; diff --git a/modules/gnome-boxes/default.nix b/modules/gnome-boxes/default.nix --- a/modules/gnome-boxes/default.nix +++ b/modules/gnome-boxes/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { - imports = [../libvirtd]; - environment.systemPackages = [pkgs.gnome.gnome-boxes]; +{ pkgs, ... }: +{ + imports = [ ../libvirtd ]; + environment.systemPackages = [ pkgs.gnome.gnome-boxes ]; } diff --git a/modules/libvirtd/default.nix b/modules/libvirtd/default.nix --- a/modules/libvirtd/default.nix +++ b/modules/libvirtd/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ virtualisation.libvirtd.enable = true; environment.persistence."${config.system.persistDir}".directories = [ "/var/lib/libvirt" diff --git a/modules/network/default.nix b/modules/network/default.nix --- a/modules/network/default.nix +++ b/modules/network/default.nix @@ -1,4 +1,4 @@ { - imports = [./networkmanager]; + imports = [ ./networkmanager ]; systemd.network.wait-online.enable = false; } diff --git a/modules/network/wpa_supplicant.nix b/modules/network/wpa_supplicant.nix --- a/modules/network/wpa_supplicant.nix +++ b/modules/network/wpa_supplicant.nix @@ -1,5 +1,5 @@ { - imports = [./dns]; + imports = [ ./dns ]; networking.wireless = { enable = true; userControlled.enable = true; diff --git a/modules/persist/default.nix b/modules/persist/default.nix --- a/modules/persist/default.nix +++ b/modules/persist/default.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ options.system.persistDir = lib.mkOption { type = lib.types.str; }; diff --git a/modules/persist/null.nix b/modules/persist/null.nix --- a/modules/persist/null.nix +++ b/modules/persist/null.nix @@ -1,5 +1,6 @@ -{lib, ...}: { - imports = [./default.nix]; +{ lib, ... }: +{ + imports = [ ./default.nix ]; config = { system.persistDir = "null"; diff --git a/modules/syncthing/default.nix b/modules/syncthing/default.nix --- a/modules/syncthing/default.nix +++ b/modules/syncthing/default.nix @@ -2,8 +2,9 @@ config, inputs, ... -}: { - users.users.syncthing.extraGroups = ["users"]; +}: +{ + users.users.syncthing.extraGroups = [ "users" ]; services.syncthing = { enable = true; devices.redmi-phone = { diff --git a/pkgs-set/overlays/agenix.nix b/pkgs-set/overlays/agenix.nix --- a/pkgs-set/overlays/agenix.nix +++ b/pkgs-set/overlays/agenix.nix @@ -1,3 +1,4 @@ -{inputs}: final: prev: { +{ inputs }: +final: prev: { agenix = inputs.agenix.packages."${final.system}".agenix; } diff --git a/pkgs-set/overlays/calf.nix b/pkgs-set/overlays/calf.nix --- a/pkgs-set/overlays/calf.nix +++ b/pkgs-set/overlays/calf.nix @@ -6,7 +6,14 @@ rev = "024e9deab2d32b26e90b556d36d9c74f6b0aeb17"; sha256 = "sha256-av6quHkesND9M8vlkOQKLXK4prf+oQxOLANuNsWL+eg="; }; - nativeBuildInputs = old.nativeBuildInputs ++ (with final; [automake autoconf pkg-config libtool]); + nativeBuildInputs = + old.nativeBuildInputs + ++ (with final; [ + automake + autoconf + pkg-config + libtool + ]); configurePhase = '' $SHELL autogen.sh ''; diff --git a/pkgs-set/overlays/musikcube.nix b/pkgs-set/overlays/musikcube.nix --- a/pkgs-set/overlays/musikcube.nix +++ b/pkgs-set/overlays/musikcube.nix @@ -1,3 +1,4 @@ -{inputs}: final: prev: { +{ inputs }: +final: prev: { musikcube = inputs.nixpkgs-master.legacyPackages.${final.system}.musikcube; } diff --git a/pkgs-set/overlays/nur.nix b/pkgs-set/overlays/nur.nix --- a/pkgs-set/overlays/nur.nix +++ b/pkgs-set/overlays/nur.nix @@ -1,1 +1,1 @@ -{inputs}: inputs.nur.overlays.default +{ inputs }: inputs.nur.overlays.default diff --git a/pkgs-set/overlays/prismlauncher.nix b/pkgs-set/overlays/prismlauncher.nix --- a/pkgs-set/overlays/prismlauncher.nix +++ b/pkgs-set/overlays/prismlauncher.nix @@ -1,5 +1,6 @@ -{inputs}: final: prev: { +{ inputs }: +final: prev: { prismlauncher = prev.prismlauncher.overrideAttrs (old: { - patches = [((toString inputs.self) + "/pkgs-set/patches/prismlauncher-offline.patch")]; + patches = [ ((toString inputs.self) + "/pkgs-set/patches/prismlauncher-offline.patch") ]; }); } diff --git a/pkgs-set/overlays/rofi-bluetooth.nix b/pkgs-set/overlays/rofi-bluetooth.nix --- a/pkgs-set/overlays/rofi-bluetooth.nix +++ b/pkgs-set/overlays/rofi-bluetooth.nix @@ -1,12 +1,12 @@ final: prev: { rofi-bluetooth-wayland = - (prev.rofi-bluetooth.override {rofi-unwrapped = final.rofi-wayland-unwrapped;}) - .overrideAttrs (old: { - src = final.fetchFromGitHub { - owner = "nickclyde"; - repo = "rofi-bluetooth"; - rev = "0c07719c428984893c46f6cfe0a56660e03ccf50"; - sha256 = "sha256-Er59/fMhcA7xCXn3abMeBlrYfDYsOBApeykR1r8XbNU="; - }; - }); + (prev.rofi-bluetooth.override { rofi-unwrapped = final.rofi-wayland-unwrapped; }).overrideAttrs + (old: { + src = final.fetchFromGitHub { + owner = "nickclyde"; + repo = "rofi-bluetooth"; + rev = "0c07719c428984893c46f6cfe0a56660e03ccf50"; + sha256 = "sha256-Er59/fMhcA7xCXn3abMeBlrYfDYsOBApeykR1r8XbNU="; + }; + }); } diff --git a/pkgs-set/overlays/steam.nix b/pkgs-set/overlays/steam.nix --- a/pkgs-set/overlays/steam.nix +++ b/pkgs-set/overlays/steam.nix @@ -1,5 +1,13 @@ -{inputs}: final: prev: { +{ inputs }: +final: prev: { steam = prev.steam.override { - extraLibraries = pkgs: with pkgs; [mimalloc pipewire vulkan-loader wayland wayland-protocols]; + extraLibraries = + pkgs: with pkgs; [ + mimalloc + pipewire + vulkan-loader + wayland + wayland-protocols + ]; }; } diff --git a/pkgs-set/pkgs/comic-mono.nix b/pkgs-set/pkgs/comic-mono.nix --- a/pkgs-set/pkgs/comic-mono.nix +++ b/pkgs-set/pkgs/comic-mono.nix @@ -2,13 +2,14 @@ fetchurl, runCommand, ... -}: let +}: +let ttf = fetchurl { url = "https://dtinth.github.io/comic-mono-font/ComicMono.ttf"; sha256 = "sha256-O8FCXpIqFqvw7HZ+/+TQJoQ5tMDc6YQy4H0V9drVcZY="; }; in - runCommand "comic-mono" {} '' - mkdir -p $out/share/fonts/truetype - ln -s ${ttf} $out/share/fonts/truetype - '' +runCommand "comic-mono" { } '' + mkdir -p $out/share/fonts/truetype + ln -s ${ttf} $out/share/fonts/truetype +'' diff --git a/pkgs-set/pkgs/discordo.nix b/pkgs-set/pkgs/discordo.nix --- a/pkgs-set/pkgs/discordo.nix +++ b/pkgs-set/pkgs/discordo.nix @@ -2,20 +2,21 @@ buildGoModule, fetchFromGitHub, ... -}: let +}: +let rev = "40e2e7e6a5533c1e0bd682cb7ccadf3e5bc5eae8"; shortRev = builtins.substring 0 8 rev; in - buildGoModule { - pname = "discordo"; - version = shortRev; +buildGoModule { + pname = "discordo"; + version = shortRev; - src = fetchFromGitHub { - owner = "ayntgl"; - repo = "discordo"; - inherit rev; - sha256 = "sha256-620PwT6RVrc3orD6Ny51kyMMdcQU5bZ1gSMJDJA7H2g="; - }; + src = fetchFromGitHub { + owner = "ayntgl"; + repo = "discordo"; + inherit rev; + sha256 = "sha256-620PwT6RVrc3orD6Ny51kyMMdcQU5bZ1gSMJDJA7H2g="; + }; - vendorSha256 = "sha256-XUoKEnLy88BAeUMZ19YS/vF1TksYroayQiyds5aQ3hI="; - } + vendorSha256 = "sha256-XUoKEnLy88BAeUMZ19YS/vF1TksYroayQiyds5aQ3hI="; +} diff --git a/pkgs-set/pkgs/fluidsynth-dssi.nix b/pkgs-set/pkgs/fluidsynth-dssi.nix --- a/pkgs-set/pkgs/fluidsynth-dssi.nix +++ b/pkgs-set/pkgs/fluidsynth-dssi.nix @@ -26,8 +26,23 @@ sha256 = "sha256-DJSrdxQpjvQTzio6e3p/iSYJWu+AbydyKkeKsRQA6qc="; }; - nativeBuildInputs = [autoconf automake pkg-config rpm2targz libtool]; - buildInputs = [alsa-lib dssi gtk2 libjack2 ladspaH ladspaPlugins liblo fluidsynth.dev]; + nativeBuildInputs = [ + autoconf + automake + pkg-config + rpm2targz + libtool + ]; + buildInputs = [ + alsa-lib + dssi + gtk2 + libjack2 + ladspaH + ladspaPlugins + liblo + fluidsynth.dev + ]; unpackPhase = '' rpm2targz $src diff --git a/pkgs-set/pkgs/fractal-next.nix b/pkgs-set/pkgs/fractal-next.nix --- a/pkgs-set/pkgs/fractal-next.nix +++ b/pkgs-set/pkgs/fractal-next.nix @@ -113,6 +113,11 @@ description = "Matrix group messaging app"; homepage = "https://gitlab.gnome.org/GNOME/fractal"; license = licenses.gpl3; - maintainers = teams.gnome.members ++ (with maintainers; [dtzWill genofire]); + maintainers = + teams.gnome.members + ++ (with maintainers; [ + dtzWill + genofire + ]); }; } diff --git a/pkgs-set/pkgs/phantom.nix b/pkgs-set/pkgs/phantom.nix --- a/pkgs-set/pkgs/phantom.nix +++ b/pkgs-set/pkgs/phantom.nix @@ -14,7 +14,7 @@ dontWrapQtApps = true; - buildInputs = [libsForQt5.qt5.qtbase]; + buildInputs = [ libsForQt5.qt5.qtbase ]; buildPhase = '' cd src/styleplugin diff --git a/users/firewatch/default.nix b/users/firewatch/default.nix --- a/users/firewatch/default.nix +++ b/users/firewatch/default.nix @@ -4,13 +4,15 @@ tlib, config, ... -} @ globalAttrs: let +}@globalAttrs: +let l = lib // builtins; nixosConfig = globalAttrs.config; signKeyText = builtins.readFile ../../secrets/yusdacra.key.pub; -in { +in +{ users.users.firewatch = { isNormalUser = true; createHome = true; @@ -24,60 +26,76 @@ shell = pkgs.zsh; hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/"; }; - environment.shells = with pkgs; [bashInteractive zsh]; + environment.shells = with pkgs; [ + bashInteractive + zsh + ]; programs = { # cuz nixos complains zsh.enable = true; }; - home-manager.users.firewatch = { - config, - pkgs, - inputs, - secrets, - ... - }: let - personal = import ../../personal.nix; - name = personal.name; - email = personal.emails.primary; - in { - imports = let - modulesToEnable = l.flatten [ - ["zoxide" "zsh" "fzf" "starship" "direnv"] - # dev stuff - ["helix" "git" "ssh"] - ]; + home-manager.users.firewatch = + { + config, + pkgs, + inputs, + secrets, + ... + }: + let + personal = import ../../personal.nix; + name = personal.name; + email = personal.emails.primary; in - l.flatten [ - ../../modules/persist/null.nix - (tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable) - ]; + { + imports = + let + modulesToEnable = l.flatten [ + [ + "zoxide" + "zsh" + "fzf" + "starship" + "direnv" + ] + # dev stuff + [ + "helix" + "git" + "ssh" + ] + ]; + in + l.flatten [ + ../../modules/persist/null.nix + (tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable) + ]; - settings.enable = false; + settings.enable = false; - home = { - homeDirectory = nixosConfig.users.users.firewatch.home; - packages = with pkgs; [ - # Programs - nix-output-monitor - inputs.nh.packages.${pkgs.system}.default - ]; - file.".ssh/authorized_keys".text = '' - ${signKeyText} - ''; - }; + home = { + homeDirectory = nixosConfig.users.users.firewatch.home; + packages = with pkgs; [ + # Programs + nix-output-monitor + inputs.nh.packages.${pkgs.system}.default + ]; + file.".ssh/authorized_keys".text = '' + ${signKeyText} + ''; + }; - programs = { - command-not-found.enable = - nixosConfig.programs.command-not-found.enable; - git = { - userName = name; - userEmail = email; - extraConfig = { - gpg.format = "ssh"; - commit.gpgsign = true; - user.signingkey = signKeyText; + programs = { + command-not-found.enable = nixosConfig.programs.command-not-found.enable; + git = { + userName = name; + userEmail = email; + extraConfig = { + gpg.format = "ssh"; + commit.gpgsign = true; + user.signingkey = signKeyText; + }; }; }; }; - }; } diff --git a/users/patriot/default.nix b/users/patriot/default.nix --- a/users/patriot/default.nix +++ b/users/patriot/default.nix @@ -4,12 +4,14 @@ tlib, config, ... -} @ globalAttrs: let +}@globalAttrs: +let l = lib // builtins; nixosConfig = globalAttrs.config; -in { - imports = [./stylix.nix]; +in +{ + imports = [ ./stylix.nix ]; users.users.patriot = { isNormalUser = true; @@ -23,7 +25,10 @@ "nix-build-key-access" (l.optional nixosConfig.networking.networkmanager.enable "networkmanager") (l.optional nixosConfig.virtualisation.docker.enable "docker") - (l.optionals nixosConfig.virtualisation.libvirtd.enable ["libvirtd" "kvm"]) + (l.optionals nixosConfig.virtualisation.libvirtd.enable [ + "libvirtd" + "kvm" + ]) ]; shell = pkgs.zsh; hashedPassword = "$6$spzqhAyJfhHy$iHgLBlhjGn1l8PnbjJdWTn1GPvcjMqYNKUzdCe/7IrX6sHNgETSr/Nfpdmq9FCXLhrAfwHOd/q/8SvfeIeNX4/"; @@ -45,8 +50,11 @@ "/home/patriot/.config/unity3d" "/home/patriot/.config/HKModInstaller" ]; - systemPackages = with pkgs; [qt5.qtwayland]; - shells = with pkgs; [bashInteractive zsh]; + systemPackages = with pkgs; [ qt5.qtwayland ]; + shells = with pkgs; [ + bashInteractive + zsh + ]; }; xdg.portal = { enable = true; @@ -68,7 +76,7 @@ # gnome stuffs seahorse.enable = true; dconf.enable = true; - weylus.users = ["patriot"]; + weylus.users = [ "patriot" ]; java = { enable = false; package = pkgs.jre8; @@ -94,197 +102,225 @@ NetworkManager-wait-online.enable = false; }; }; - home-manager.users.patriot = { - config, - pkgs, - inputs, - secrets, - ... - }: let - personal = import ../../personal.nix; - name = personal.name; - email = personal.emails.primary; - in { - imports = let - modulesToEnable = l.flatten [ - # wm - # ["hyprland" "foot"] - ["sway" "wayland" "foot"] - # ["fluxbox" "urxvt"] - # desktop stuff - # ["wayland" "foot"] - ["obsidian" "firefox" "vesktop"] - # cli stuff - ["zoxide" "zsh" "fzf" "starship" "direnv"] - # dev stuff - ["helix" "git" "ssh"] - # ["godot"] - ["musikcube" "musikcubed"] - ["arrpc"] - ["s3s"] - ]; + home-manager.users.patriot = + { + config, + pkgs, + inputs, + secrets, + ... + }: + let + personal = import ../../personal.nix; + name = personal.name; + email = personal.emails.primary; in - l.flatten [ - ../../modules/persist - inputs.nixos-persistence.nixosModules.home-manager.impermanence - (tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable) - ]; - - system.persistDir = nixosConfig.system.persistDir; - - home.persistence."${config.system.persistDir}${config.home.homeDirectory}" = let - mkPaths = pfx: paths: tlib.prefixStrings "${pfx}/" (l.flatten paths); - in { - directories = + { + imports = + let + modulesToEnable = l.flatten [ + # wm + # ["hyprland" "foot"] + [ + "sway" + "wayland" + "foot" + ] + # ["fluxbox" "urxvt"] + # desktop stuff + # ["wayland" "foot"] + [ + "obsidian" + "firefox" + "vesktop" + ] + # cli stuff + [ + "zoxide" + "zsh" + "fzf" + "starship" + "direnv" + ] + # dev stuff + [ + "helix" + "git" + "ssh" + ] + # ["godot"] + [ + "musikcube" + "musikcubed" + ] + [ "arrpc" ] + [ "s3s" ] + ]; + in l.flatten [ - "Downloads" - ".wine" - # ssh / gpg / keys - ".ssh" - ".gnupg" - "keys" - # caches / history stuff - ".directory_history" - ".cache" - "Bitwig Studio" - ".BitwigStudio" - ".vst" - ] - ++ mkPaths ".local/share" [ - "bottles" - "direnv" - "zsh" - "keyrings" - "yuzu" - # "lutris" - # "Terraria" - "PrismLauncher" - ] - ++ mkPaths ".config" [ - # "lutris" - "dconf" - "retroarch" - "yuzu" - "blender" + ../../modules/persist + inputs.nixos-persistence.nixosModules.home-manager.impermanence + (tlib.prefixStrings "${inputs.self}/users/modules/" modulesToEnable) ]; - files = l.flatten [ - ".config/gnome-initial-setup-done" - (lib.removePrefix "~/" config.programs.ssh.userKnownHostsFile) - ]; - allowOther = true; - }; - fonts.fontconfig.enable = l.mkForce true; + system.persistDir = nixosConfig.system.persistDir; - settings.iconTheme = { - name = "Yaru-dark"; - package = pkgs.yaru-theme; - }; + home.persistence."${config.system.persistDir}${config.home.homeDirectory}" = + let + mkPaths = pfx: paths: tlib.prefixStrings "${pfx}/" (l.flatten paths); + in + { + directories = + l.flatten [ + "Downloads" + ".wine" + # ssh / gpg / keys + ".ssh" + ".gnupg" + "keys" + # caches / history stuff + ".directory_history" + ".cache" + "Bitwig Studio" + ".BitwigStudio" + ".vst" + ] + ++ mkPaths ".local/share" [ + "bottles" + "direnv" + "zsh" + "keyrings" + "yuzu" + # "lutris" + # "Terraria" + "PrismLauncher" + ] + ++ mkPaths ".config" [ + # "lutris" + "dconf" + "retroarch" + "yuzu" + "blender" + ]; + files = l.flatten [ + ".config/gnome-initial-setup-done" + (lib.removePrefix "~/" config.programs.ssh.userKnownHostsFile) + ]; + allowOther = true; + }; - home.pointerCursor = { - package = pkgs.bibata-cursors; - name = "Bibata-Modern-Classic"; - size = 24; + fonts.fontconfig.enable = l.mkForce true; + + settings.iconTheme = { + name = "Yaru-dark"; + package = pkgs.yaru-theme; + }; + + home.pointerCursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Classic"; + size = 24; + gtk.enable = true; + x11.enable = true; + }; gtk.enable = true; - x11.enable = true; - }; - gtk.enable = true; - gtk.theme.package = pkgs.yaru-theme; - gtk.theme.name = "Yaru-dark"; + gtk.theme.package = pkgs.yaru-theme; + gtk.theme.name = "Yaru-dark"; - # home.sessionVariables.QT_QPA_PLATFORMTHEME = "qt5ct"; - # xdg.configFile = { - # "environment.d/20-apply-qtct.conf".text = '' - # QT_QPA_PLATFORMTHEME=qt5ct - # ''; - # }; - # qt.enable = true; - # qt.platformTheme = "qtct"; - # qt.style.name = "phantom"; - # qt.style.package = pkgs.phantom; + # home.sessionVariables.QT_QPA_PLATFORMTHEME = "qt5ct"; + # xdg.configFile = { + # "environment.d/20-apply-qtct.conf".text = '' + # QT_QPA_PLATFORMTHEME=qt5ct + # ''; + # }; + # qt.enable = true; + # qt.platformTheme = "qtct"; + # qt.style.name = "phantom"; + # qt.style.package = pkgs.phantom; - stylix.targets.gnome.enable = lib.mkForce false; - stylix.targets.gtk.enable = lib.mkForce false; + stylix.targets.gnome.enable = lib.mkForce false; + stylix.targets.gtk.enable = lib.mkForce false; - home = { - homeDirectory = nixosConfig.users.users.patriot.home; - packages = with pkgs; [ - # Font stuff - noto-fonts-cjk - font-awesome - dejavu_fonts - # Programs - pixelorama - krita - gnupg - imv - mpv - ffmpeg - mupdf - xdg-utils - protontricks - libreoffice-fresh - helvum - nix-output-monitor - inputs.nh.packages.${pkgs.system}.default - # steamPackages.steamcmd - # steam-tui - # fractal-next - # gtkcord4 - # gh - transmission_4-gtk - kdenlive - ### music prod - yabridge - yabridgectl - bitwig-studio - ### stream / record - obs-studio - ### gayming - # prismlauncher - # (retroarch.override { - # cores = with libretro; [desmume citra]; - # }) - # yuzu - # wineWowPackages.stagingFull - # lutris - # distrobox - bottles - blender - ]; - }; - programs = { - musikcube.enable = true; - command-not-found.enable = - nixosConfig.programs.command-not-found.enable; - git = { - userName = name; - userEmail = email; - extraConfig = { - gpg.format = "ssh"; - commit.gpgsign = true; - user.signingkey = builtins.readFile ../../secrets/yusdacra.key.pub; + home = { + homeDirectory = nixosConfig.users.users.patriot.home; + packages = with pkgs; [ + # Font stuff + noto-fonts-cjk + font-awesome + dejavu_fonts + # Programs + pixelorama + krita + gnupg + imv + mpv + ffmpeg + mupdf + xdg-utils + protontricks + libreoffice-fresh + helvum + nix-output-monitor + inputs.nh.packages.${pkgs.system}.default + # steamPackages.steamcmd + # steam-tui + # fractal-next + # gtkcord4 + # gh + transmission_4-gtk + kdenlive + ### music prod + yabridge + yabridgectl + bitwig-studio + ### stream / record + obs-studio + ### gayming + # prismlauncher + # (retroarch.override { + # cores = with libretro; [desmume citra]; + # }) + # yuzu + # wineWowPackages.stagingFull + # lutris + # distrobox + bottles + blender + ]; + }; + programs = { + musikcube.enable = true; + command-not-found.enable = nixosConfig.programs.command-not-found.enable; + git = { + userName = name; + userEmail = email; + extraConfig = { + gpg.format = "ssh"; + commit.gpgsign = true; + user.signingkey = builtins.readFile ../../secrets/yusdacra.key.pub; + }; }; }; - }; - services = { - musikcubed = { - enable = true; - settings.password = "somethingidk"; + services = { + musikcubed = { + enable = true; + settings.password = "somethingidk"; + }; + gpg-agent = + let + defaultCacheTtl = 3600 * 6; + maxCacheTtl = 3600 * 24; + in + { + inherit defaultCacheTtl maxCacheTtl; + enable = true; + enableSshSupport = true; + sshKeys = [ "8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965" ]; + defaultCacheTtlSsh = defaultCacheTtl; + maxCacheTtlSsh = maxCacheTtl; + grabKeyboardAndMouse = false; + pinentryFlavor = "gnome3"; + }; }; - gpg-agent = let - defaultCacheTtl = 3600 * 6; - maxCacheTtl = 3600 * 24; - in { - inherit defaultCacheTtl maxCacheTtl; - enable = true; - enableSshSupport = true; - sshKeys = ["8369D9CA26C3EAAAB8302A88CEE6FD14B58AA965"]; - defaultCacheTtlSsh = defaultCacheTtl; - maxCacheTtlSsh = maxCacheTtl; - grabKeyboardAndMouse = false; - pinentryFlavor = "gnome3"; - }; }; - }; } diff --git a/users/patriot/stylix.nix b/users/patriot/stylix.nix --- a/users/patriot/stylix.nix +++ b/users/patriot/stylix.nix @@ -4,7 +4,8 @@ pkgs, lib, ... -}: { +}: +{ imports = [ inputs.stylix.nixosModules.stylix ]; @@ -29,36 +30,38 @@ # "base0E" = "fffe27"; # splatoon 3 yellow # "base0F" = "bdbebc"; # }; - stylix.base16Scheme = let - night = "#2b292d"; - ash = "#383539"; - umber = "#4d424b"; - bark = "#6F5D63"; - mist = "#D1D1E0"; - sage = "#B1B695"; - blush = "#fecdb2"; - coral = "#ffa07a"; - rose = "#F6B6C9"; - ember = "#e06b75"; - honey = "#F5D76E"; - in { - base00 = night; - base01 = ash; - base02 = umber; - base03 = bark; - base04 = blush; - base05 = mist; - base06 = mist; - base07 = bark; - base08 = ember; - base09 = honey; - base0A = rose; - base0B = sage; - base0C = bark; - base0D = coral; - base0E = blush; - base0F = umber; - }; + stylix.base16Scheme = + let + night = "#2b292d"; + ash = "#383539"; + umber = "#4d424b"; + bark = "#6F5D63"; + mist = "#D1D1E0"; + sage = "#B1B695"; + blush = "#fecdb2"; + coral = "#ffa07a"; + rose = "#F6B6C9"; + ember = "#e06b75"; + honey = "#F5D76E"; + in + { + base00 = night; + base01 = ash; + base02 = umber; + base03 = bark; + base04 = blush; + base05 = mist; + base06 = mist; + base07 = bark; + base08 = ember; + base09 = honey; + base0A = rose; + base0B = sage; + base0C = bark; + base0D = coral; + base0E = blush; + base0F = umber; + }; stylix.fonts = { serif = { diff --git a/users/root/default.nix b/users/root/default.nix --- a/users/root/default.nix +++ b/users/root/default.nix @@ -1,3 +1,4 @@ -{...}: { +{ ... }: +{ users.users.root.initialHashedPassword = "$6$XLWo1sPpgp63Zm$XHBbULH9q1gb/.yalPPU/I7EgTcW80bM.moCjIe/qGyOwE47VcXNVbTHloBZdIWQq0MfIG0IxInAu59.oJyos/"; } diff --git a/hosts/tkaronto/modules/boot.nix b/hosts/tkaronto/modules/boot.nix --- a/hosts/tkaronto/modules/boot.nix +++ b/hosts/tkaronto/modules/boot.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ boot = { tmp.useTmpfs = true; loader = { @@ -7,7 +8,7 @@ systemd-boot.configurationLimit = 10; }; kernelPackages = pkgs.linuxPackages_zen; - supportedFilesystems = ["f2fs"]; + supportedFilesystems = [ "f2fs" ]; initrd = { availableKernelModules = [ "nvme" @@ -17,10 +18,12 @@ "usbhid" "sd_mod" ]; - kernelModules = ["amdgpu"]; + kernelModules = [ "amdgpu" ]; }; - kernelModules = ["kvm-amd"]; - extraModulePackages = []; - kernel.sysctl = {"fs.inotify.max_user_watches" = 524288;}; + kernelModules = [ "kvm-amd" ]; + extraModulePackages = [ ]; + kernel.sysctl = { + "fs.inotify.max_user_watches" = 524288; + }; }; } diff --git a/hosts/tkaronto/modules/fs.nix b/hosts/tkaronto/modules/fs.nix --- a/hosts/tkaronto/modules/fs.nix +++ b/hosts/tkaronto/modules/fs.nix @@ -1,11 +1,23 @@ -{config, ...}: let +{ config, ... }: +let byLabel = label: "/dev/disk/by-label/${label}"; - f2fsOptions = ["compress_algorithm=zstd:6" "compress_chksum" "atgc" "gc_merge" "lazytime"]; -in { + f2fsOptions = [ + "compress_algorithm=zstd:6" + "compress_chksum" + "atgc" + "gc_merge" + "lazytime" + ]; +in +{ fileSystems."/" = { device = "none"; fsType = "tmpfs"; - options = ["defaults" "size=2G" "mode=755"]; + options = [ + "defaults" + "size=2G" + "mode=755" + ]; }; fileSystems."/nix" = { device = byLabel "NIX"; @@ -23,7 +35,7 @@ fsType = "vfat"; }; - swapDevices = []; + swapDevices = [ ]; zramSwap = { enable = true; algorithm = "zstd"; diff --git a/hosts/tkaronto/modules/iphone.nix b/hosts/tkaronto/modules/iphone.nix --- a/hosts/tkaronto/modules/iphone.nix +++ b/hosts/tkaronto/modules/iphone.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.usbmuxd.enable = true; - environment.systemPackages = [pkgs.libimobiledevice]; + environment.systemPackages = [ pkgs.libimobiledevice ]; } diff --git a/hosts/tkaronto/modules/secrets.nix b/hosts/tkaronto/modules/secrets.nix --- a/hosts/tkaronto/modules/secrets.nix +++ b/hosts/tkaronto/modules/secrets.nix @@ -1,5 +1,5 @@ { - age.identityPaths = ["/persist/keys/ssh_key"]; + age.identityPaths = [ "/persist/keys/ssh_key" ]; age.secrets.nixGithubAccessToken.file = ../../../secrets/nixGithubAccessToken.age; age.secrets.wgTkarontoKey = { diff --git a/hosts/tkaronto/modules/wireguard.nix b/hosts/tkaronto/modules/wireguard.nix --- a/hosts/tkaronto/modules/wireguard.nix +++ b/hosts/tkaronto/modules/wireguard.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ systemd.network.enable = true; systemd.network.netdevs."wg0" = { enable = true; @@ -13,7 +14,7 @@ { wireguardPeerConfig = { PublicKey = builtins.readFile ./wgWolumondeKey.pub; - AllowedIPs = ["10.99.0.1/32"]; + AllowedIPs = [ "10.99.0.1/32" ]; Endpoint = "${builtins.readFile ./wgWolumondeIp}:51820"; PersistentKeepalive = 25; }; diff --git a/hosts/wolumonde/modules/arpa.nix b/hosts/wolumonde/modules/arpa.nix --- a/hosts/wolumonde/modules/arpa.nix +++ b/hosts/wolumonde/modules/arpa.nix @@ -1,4 +1,4 @@ -{pkgs, config, ...}: +{ pkgs, config, ... }: let index = pkgs.writeText "index.txt" '' hi there~ @@ -13,7 +13,7 @@ /dig +short TXT 9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa/ ''; - root = pkgs.runCommand "root" {} '' + root = pkgs.runCommand "root" { } '' mkdir -p $out ln -s ${index} $out/index.txt ''; diff --git a/hosts/wolumonde/modules/atproto.nix b/hosts/wolumonde/modules/atproto.nix --- a/hosts/wolumonde/modules/atproto.nix +++ b/hosts/wolumonde/modules/atproto.nix @@ -1,9 +1,12 @@ -{pkgs, lib, ...}: let +{ pkgs, lib, ... }: +let mkFileCopy = name: file: "cp ${file} $out/${name}"; - mkWellKnownDir = files: pkgs.runCommand "well-known" {} '' - mkdir -p $out - ${lib.concatStringsSep "\n" (lib.mapAttrsToList mkFileCopy files)} - ''; + mkWellKnownDir = + files: + pkgs.runCommand "well-known" { } '' + mkdir -p $out + ${lib.concatStringsSep "\n" (lib.mapAttrsToList mkFileCopy files)} + ''; mkWellKnownCfg = files: { locations."/.well-known/".extraConfig = '' add_header content-type text/plain; @@ -12,26 +15,33 @@ ''; }; mkDidWebCfg = domain: { - "${domain}" = (mkWellKnownCfg { - "did.json" = ../../../secrets/${domain}.did; - "atproto-did" = pkgs.writeText "server" "did:web:${domain}"; - }) // (lib.optionalAttrs (lib.hasSuffix "gaze.systems" domain) { - useACMEHost = "gaze.systems"; - forceSSL = true; - }); + "${domain}" = + (mkWellKnownCfg { + "did.json" = ../../../secrets/${domain}.did; + "atproto-did" = pkgs.writeText "server" "did:web:${domain}"; + }) + // (lib.optionalAttrs (lib.hasSuffix "gaze.systems" domain) { + useACMEHost = "gaze.systems"; + forceSSL = true; + }); }; -in { - services.nginx.virtualHosts = { - "gaze.systems" = (mkWellKnownCfg { - "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; - }) // { - useACMEHost = "gaze.systems"; - forceSSL = true; - }; - # "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa" = mkWellKnownCfg { - # "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; - # }; - } // (mkDidWebCfg "dawn.gaze.systems") - // (mkDidWebCfg "guestbook.gaze.systems"); +in +{ + services.nginx.virtualHosts = + { + "gaze.systems" = + (mkWellKnownCfg { + "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; + }) + // { + useACMEHost = "gaze.systems"; + forceSSL = true; + }; + # "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa" = mkWellKnownCfg { + # "atproto-did" = pkgs.writeText "server" "did:plc:dfl62fgb7wtjj3fcbb72naae"; + # }; + } + // (mkDidWebCfg "dawn.gaze.systems") + // (mkDidWebCfg "guestbook.gaze.systems"); # // (mkDidWebCfg "9.0.0.0.8.e.f.1.5.0.7.4.0.1.0.0.2.ip6.arpa"); } diff --git a/hosts/wolumonde/modules/bernbot.nix b/hosts/wolumonde/modules/bernbot.nix --- a/hosts/wolumonde/modules/bernbot.nix +++ b/hosts/wolumonde/modules/bernbot.nix @@ -4,13 +4,15 @@ pkgs, lib, ... -}: let +}: +let bernbotPkg = inputs.bernbot.packages.${pkgs.system}.bernbot-release; -in { +in +{ systemd.services.bernbot = { description = "bernbot"; - wantedBy = ["multi-user.target"]; - after = ["network.target"]; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; serviceConfig = lib.mkMerge [ { User = "bernbot"; @@ -26,5 +28,5 @@ isSystemUser = true; group = "bernbot"; }; - users.groups.bernbot = {}; + users.groups.bernbot = { }; } diff --git a/hosts/wolumonde/modules/blog.nix b/hosts/wolumonde/modules/blog.nix --- a/hosts/wolumonde/modules/blog.nix +++ b/hosts/wolumonde/modules/blog.nix @@ -3,23 +3,28 @@ pkgs, inputs, ... -}: let +}: +let PUBLIC_BASE_URL = "https://gaze.systems"; pkg = inputs.blog.packages.${pkgs.system}.default.overrideAttrs (old: { inherit PUBLIC_BASE_URL; }); port = 3003; -in { +in +{ users.users.website = { isSystemUser = true; group = "website"; }; - users.groups.website = {}; + users.groups.website = { }; systemd.services.website = { description = "website"; - wantedBy = ["multi-user.target"]; - after = ["network.target" "guestbook.service"]; + wantedBy = [ "multi-user.target" ]; + after = [ + "network.target" + "guestbook.service" + ]; environment = { HOME = "/var/lib/website"; ORIGIN = PUBLIC_BASE_URL; diff --git a/hosts/wolumonde/modules/forgejo.nix b/hosts/wolumonde/modules/forgejo.nix --- a/hosts/wolumonde/modules/forgejo.nix +++ b/hosts/wolumonde/modules/forgejo.nix @@ -1,4 +1,5 @@ -{pkgs, config, ...}: { +{ pkgs, config, ... }: +{ services.forgejo = { enable = true; package = pkgs.forgejo; diff --git a/hosts/wolumonde/modules/hardware-configuration.nix b/hosts/wolumonde/modules/hardware-configuration.nix --- a/hosts/wolumonde/modules/hardware-configuration.nix +++ b/hosts/wolumonde/modules/hardware-configuration.nix @@ -1,8 +1,13 @@ -{modulesPath, ...}: { - imports = [(modulesPath + "/profiles/qemu-guest.nix")]; +{ modulesPath, ... }: +{ + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; boot.loader.grub.device = "/dev/sda"; - boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront"]; - boot.initrd.kernelModules = ["nvme"]; + boot.initrd.availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "xen_blkfront" + ]; + boot.initrd.kernelModules = [ "nvme" ]; fileSystems."/" = { device = "/dev/sda1"; fsType = "ext4"; diff --git a/hosts/wolumonde/modules/hedgedoc.nix b/hosts/wolumonde/modules/hedgedoc.nix --- a/hosts/wolumonde/modules/hedgedoc.nix +++ b/hosts/wolumonde/modules/hedgedoc.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ services.hedgedoc = { enable = true; settings = { @@ -18,6 +19,7 @@ forceSSL = true; quic = true; kTLS = true; - locations."/".proxyPass = "http://${config.services.hedgedoc.settings.host}:${toString config.services.hedgedoc.settings.port}"; + locations."/".proxyPass = + "http://${config.services.hedgedoc.settings.host}:${toString config.services.hedgedoc.settings.port}"; }; } diff --git a/hosts/wolumonde/modules/limbusart.nix b/hosts/wolumonde/modules/limbusart.nix --- a/hosts/wolumonde/modules/limbusart.nix +++ b/hosts/wolumonde/modules/limbusart.nix @@ -3,13 +3,15 @@ pkgs, lib, ... -}: let +}: +let pkg = inputs.limbusart.packages.${pkgs.system}.default; -in { +in +{ systemd.services.limbusart = { description = "limbusart"; - wantedBy = ["multi-user.target"]; - after = ["network.target"]; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; serviceConfig = lib.mkMerge [ { User = "limbusart"; @@ -31,7 +33,7 @@ isSystemUser = true; group = "limbusart"; }; - users.groups.limbusart = {}; + users.groups.limbusart = { }; services.nginx.virtualHosts."pmart.gaze.systems" = { useACMEHost = "gaze.systems"; diff --git a/hosts/wolumonde/modules/nginx.nix b/hosts/wolumonde/modules/nginx.nix --- a/hosts/wolumonde/modules/nginx.nix +++ b/hosts/wolumonde/modules/nginx.nix @@ -1,4 +1,5 @@ -{inputs, pkgs, ...}: { +{ inputs, pkgs, ... }: +{ services.nginx = { enable = true; package = pkgs.nginxQuic; @@ -8,7 +9,7 @@ recommendedProxySettings = true; }; - users.users.nginx.extraGroups = ["acme"]; + users.users.nginx.extraGroups = [ "acme" ]; security.acme = { acceptTerms = true; diff --git a/hosts/wolumonde/modules/nixinate.nix b/hosts/wolumonde/modules/nixinate.nix --- a/hosts/wolumonde/modules/nixinate.nix +++ b/hosts/wolumonde/modules/nixinate.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ _module.args.nixinate = { host = "gaze.systems"; sshUser = "root"; diff --git a/hosts/wolumonde/modules/pds.nix b/hosts/wolumonde/modules/pds.nix --- a/hosts/wolumonde/modules/pds.nix +++ b/hosts/wolumonde/modules/pds.nix @@ -1,4 +1,5 @@ -{ config, ... }: { +{ config, ... }: +{ services.nginx.virtualHosts.${config.services.pds.settings.PDS_HOSTNAME} = { useACMEHost = "gaze.systems"; forceSSL = true; @@ -28,14 +29,14 @@ PDS_RATE_LIMITS_ENABLED = "true"; PDS_INVITE_REQUIRED = "true"; - PDS_DID_PLC_URL="https://plc.directory"; - PDS_BSKY_APP_VIEW_URL="https://api.bsky.app"; - PDS_BSKY_APP_VIEW_DID="did:web:api.bsky.app"; - PDS_REPORT_SERVICE_URL="https://mod.bsky.app"; - PDS_REPORT_SERVICE_DID="did:plc:ar7c4by46qjdydhdevvrndac"; - PDS_CRAWLERS="https://bsky.network"; + PDS_DID_PLC_URL = "https://plc.directory"; + PDS_BSKY_APP_VIEW_URL = "https://api.bsky.app"; + PDS_BSKY_APP_VIEW_DID = "did:web:api.bsky.app"; + PDS_REPORT_SERVICE_URL = "https://mod.bsky.app"; + PDS_REPORT_SERVICE_DID = "did:plc:ar7c4by46qjdydhdevvrndac"; + PDS_CRAWLERS = "https://bsky.network"; }; - environmentFiles = [config.age.secrets.pdsConfig.path]; + environmentFiles = [ config.age.secrets.pdsConfig.path ]; }; # virtualisation = { @@ -50,7 +51,7 @@ # autoStart = true; # environmentFiles = [ ./pds.env config.age.secrets.pdsConfig.path ]; # ports = [ "1334:1334" ]; - # volumes = [ + # volumes = [ # "/var/lib/pds:/pds" # ]; # extraOptions = [ diff --git a/hosts/wolumonde/modules/secrets.nix b/hosts/wolumonde/modules/secrets.nix --- a/hosts/wolumonde/modules/secrets.nix +++ b/hosts/wolumonde/modules/secrets.nix @@ -1,4 +1,5 @@ -{lib, ...}: { +{ lib, ... }: +{ age.secrets.bernbotToken.file = ../../../secrets/bernbotToken.age; age.secrets.websiteConfig.file = ../../../secrets/websiteConfig.age; age.secrets.pdsConfig.file = ../../../secrets/pdsConfig.age; diff --git a/hosts/wolumonde/modules/ssh.nix b/hosts/wolumonde/modules/ssh.nix --- a/hosts/wolumonde/modules/ssh.nix +++ b/hosts/wolumonde/modules/ssh.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ services.fail2ban.enable = true; services.openssh = { enable = true; diff --git a/hosts/wolumonde/modules/tailscale.nix b/hosts/wolumonde/modules/tailscale.nix --- a/hosts/wolumonde/modules/tailscale.nix +++ b/hosts/wolumonde/modules/tailscale.nix @@ -1,3 +1,3 @@ { services.tailscale.enable = true; -} \ No newline at end of file +} diff --git a/hosts/wolumonde/modules/webhook.nix b/hosts/wolumonde/modules/webhook.nix --- a/hosts/wolumonde/modules/webhook.nix +++ b/hosts/wolumonde/modules/webhook.nix @@ -1,4 +1,5 @@ -{config, tlib, ...}: { +{ config, tlib, ... }: +{ imports = tlib.importFolder ./webhooks; services.webhook = { diff --git a/hosts/wsl/modules/secrets.nix b/hosts/wsl/modules/secrets.nix --- a/hosts/wsl/modules/secrets.nix +++ b/hosts/wsl/modules/secrets.nix @@ -1,5 +1,5 @@ { - age.identityPaths = ["/home/firewatch/.ssh/id_rsa"]; + age.identityPaths = [ "/home/firewatch/.ssh/id_rsa" ]; age.secrets.nixGithubAccessToken.file = ../../../secrets/nixGithubAccessToken.age; } diff --git a/modules/de/budgie/default.nix b/modules/de/budgie/default.nix --- a/modules/de/budgie/default.nix +++ b/modules/de/budgie/default.nix @@ -2,7 +2,8 @@ pkgs, lib, ... -}: { +}: +{ services.xserver = { enable = true; desktopManager = { diff --git a/modules/de/gnome/default.nix b/modules/de/gnome/default.nix --- a/modules/de/gnome/default.nix +++ b/modules/de/gnome/default.nix @@ -2,7 +2,8 @@ pkgs, lib, ... -}: { +}: +{ services.gnome = { gnome-keyring.enable = true; core-shell.enable = true; diff --git a/modules/de/greetd/default.nix b/modules/de/greetd/default.nix --- a/modules/de/greetd/default.nix +++ b/modules/de/greetd/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.greetd = { enable = true; settings = { diff --git a/modules/develop/editor/default.nix b/modules/develop/editor/default.nix --- a/modules/develop/editor/default.nix +++ b/modules/develop/editor/default.nix @@ -1,4 +1,9 @@ -{pkgs, ...}: { - imports = [./helix.nix]; - environment.systemPackages = with pkgs; [treefmt nixd nixfmt-rfc-style]; +{ pkgs, ... }: +{ + imports = [ ./helix.nix ]; + environment.systemPackages = with pkgs; [ + treefmt + nixd + nixfmt-rfc-style + ]; } diff --git a/modules/develop/editor/helix.nix b/modules/develop/editor/helix.nix --- a/modules/develop/editor/helix.nix +++ b/modules/develop/editor/helix.nix @@ -1,11 +1,15 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let pkg = pkgs.helix; bin = "${pkg}/bin/hx"; -in { - environment.systemPackages = [pkg]; +in +{ + environment.systemPackages = [ pkg ]; environment.sessionVariables = { EDITOR = bin; VISUAL = bin; }; - environment.shellAliases = {e = bin;}; + environment.shellAliases = { + e = bin; + }; } diff --git a/modules/develop/editor/kakoune.nix b/modules/develop/editor/kakoune.nix --- a/modules/develop/editor/kakoune.nix +++ b/modules/develop/editor/kakoune.nix @@ -1,10 +1,14 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let pkg = pkgs.kakoune-unwrapped; -in { - environment.systemPackages = [pkg]; +in +{ + environment.systemPackages = [ pkg ]; environment.sessionVariables = { EDITOR = "${pkg}/bin/kak"; VISUAL = "${pkg}/bin/kak"; }; - environment.shellAliases = {k = "${pkg}/bin/kak";}; + environment.shellAliases = { + k = "${pkg}/bin/kak"; + }; } diff --git a/modules/develop/nixbuild/default.nix b/modules/develop/nixbuild/default.nix --- a/modules/develop/nixbuild/default.nix +++ b/modules/develop/nixbuild/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ programs.ssh.extraConfig = '' Host eu.nixbuild.net PubkeyAcceptedKeyTypes ssh-ed25519 @@ -7,7 +8,7 @@ programs.ssh.knownHosts = { nixbuild = { - hostNames = ["eu.nixbuild.net"]; + hostNames = [ "eu.nixbuild.net" ]; publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPIQCZc54poJ8vqawd8TraNryQeJnvH1eLpIDgbiqymM"; }; }; @@ -19,7 +20,10 @@ hostName = "eu.nixbuild.net"; system = "x86_64-linux"; maxJobs = 100; - supportedFeatures = ["benchmark" "big-parallel"]; + supportedFeatures = [ + "benchmark" + "big-parallel" + ]; } ]; }; diff --git a/modules/network/dns/cloudflare.nix b/modules/network/dns/cloudflare.nix --- a/modules/network/dns/cloudflare.nix +++ b/modules/network/dns/cloudflare.nix @@ -1,10 +1,14 @@ -{lib, ...}: { +{ lib, ... }: +{ networking.resolvconf.useLocalResolver = true; networking.networkmanager.dns = lib.mkForce "none"; services.dnscrypt-proxy2 = { enable = true; settings = { - server_names = ["cloudflare" "cloudflare-ipv6"]; + server_names = [ + "cloudflare" + "cloudflare-ipv6" + ]; }; }; } diff --git a/modules/network/dns/default.nix b/modules/network/dns/default.nix --- a/modules/network/dns/default.nix +++ b/modules/network/dns/default.nix @@ -1,3 +1,3 @@ { - imports = [./cloudflare.nix]; + imports = [ ./cloudflare.nix ]; } diff --git a/modules/network/dns/nextdns.nix b/modules/network/dns/nextdns.nix --- a/modules/network/dns/nextdns.nix +++ b/modules/network/dns/nextdns.nix @@ -2,6 +2,9 @@ networking.resolvconf.useLocalResolver = true; services.nextdns = { enable = true; - arguments = ["-config" "75e43d"]; + arguments = [ + "-config" + "75e43d" + ]; }; } diff --git a/modules/network/iwd/default.nix b/modules/network/iwd/default.nix --- a/modules/network/iwd/default.nix +++ b/modules/network/iwd/default.nix @@ -2,8 +2,12 @@ networking.wireless.iwd = { enable = true; settings = { - Network = {EnableIPv6 = true;}; - Settings = {AutoConnect = true;}; + Network = { + EnableIPv6 = true; + }; + Settings = { + AutoConnect = true; + }; }; }; networking.networkmanager.wifi.backend = "iwd"; diff --git a/modules/network/networkmanager/default.nix b/modules/network/networkmanager/default.nix --- a/modules/network/networkmanager/default.nix +++ b/modules/network/networkmanager/default.nix @@ -1,10 +1,14 @@ -{config, ...}: { - imports = [../dns ../iwd]; +{ config, ... }: +{ + imports = [ + ../dns + ../iwd + ]; networking.networkmanager = { enable = true; wifi.powersave = true; }; environment.persistence."${config.system.persistDir}" = { - directories = ["/etc/NetworkManager/system-connections"]; + directories = [ "/etc/NetworkManager/system-connections" ]; }; } diff --git a/users/modules/arrpc/default.nix b/users/modules/arrpc/default.nix --- a/users/modules/arrpc/default.nix +++ b/users/modules/arrpc/default.nix @@ -1,7 +1,8 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ systemd.user.services.arrpc = { Install = { - WantedBy = ["default.target"]; + WantedBy = [ "default.target" ]; }; Unit = { Description = "arrpc"; diff --git a/users/modules/chromium/default.nix b/users/modules/chromium/default.nix --- a/users/modules/chromium/default.nix +++ b/users/modules/chromium/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ ".config/chromium" ".local/share/applications" diff --git a/users/modules/code/default.nix b/users/modules/code/default.nix --- a/users/modules/code/default.nix +++ b/users/modules/code/default.nix @@ -2,7 +2,8 @@ pkgs, inputs, ... -}: { +}: +{ # stylix.targets.vscode.enable = false; programs.vscode = { enable = true; diff --git a/users/modules/discord/default.nix b/users/modules/discord/default.nix --- a/users/modules/discord/default.nix +++ b/users/modules/discord/default.nix @@ -4,33 +4,36 @@ pkgs, lib, ... -}: { +}: +{ home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ ".config/ArmCord" ]; - home.packages = let - flags = [ - # "--flag-switches-begin" - # "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer" - # "--flag-switches-end" - # "--ozone-platform=wayland" - # "--enable-webrtc-pipewire-capturer" - # "--disable-gpu-memory-buffer-video-frames" - # "--enable-accelerated-mjpeg-decode" - # "--enable-accelerated-video" - # "--enable-gpu-rasterization" - # "--enable-native-gpu-memory-buffers" - # "--enable-zero-copy" - # "--ignore-gpu-blocklist" - ]; - pkg = - (pkgs.armcord.override { - nss = pkgs.nss_latest; - }) - .overrideAttrs (old: { - # preInstall = '' - # gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}") - # ''; - }); - in [pkg]; + home.packages = + let + flags = [ + # "--flag-switches-begin" + # "--enable-features=UseOzonePlatform,WebRTCPipeWireCapturer" + # "--flag-switches-end" + # "--ozone-platform=wayland" + # "--enable-webrtc-pipewire-capturer" + # "--disable-gpu-memory-buffer-video-frames" + # "--enable-accelerated-mjpeg-decode" + # "--enable-accelerated-video" + # "--enable-gpu-rasterization" + # "--enable-native-gpu-memory-buffers" + # "--enable-zero-copy" + # "--ignore-gpu-blocklist" + ]; + pkg = + (pkgs.armcord.override { + nss = pkgs.nss_latest; + }).overrideAttrs + (old: { + # preInstall = '' + # gappsWrapperArgs+=("--add-flags" "${lib.concatStringsSep " " flags}") + # ''; + }); + in + [ pkg ]; } diff --git a/users/modules/discordrp-mpris/default.nix b/users/modules/discordrp-mpris/default.nix --- a/users/modules/discordrp-mpris/default.nix +++ b/users/modules/discordrp-mpris/default.nix @@ -2,10 +2,11 @@ inputs, pkgs, ... -}: { +}: +{ systemd.user.services.discordrp-mpris = { Install = { - WantedBy = ["default.target"]; + WantedBy = [ "default.target" ]; }; Unit = { Description = "discordrp-mpris"; diff --git a/users/modules/dunst/default.nix b/users/modules/dunst/default.nix --- a/users/modules/dunst/default.nix +++ b/users/modules/dunst/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ # notification daemon services.dunst = { enable = true; @@ -27,7 +28,9 @@ word_wrap = "yes"; }; - fullscreen_delay_everything = {fullscreen = "delay";}; + fullscreen_delay_everything = { + fullscreen = "delay"; + }; }; }; } diff --git a/users/modules/firefox/default.nix b/users/modules/firefox/default.nix --- a/users/modules/firefox/default.nix +++ b/users/modules/firefox/default.nix @@ -2,12 +2,13 @@ pkgs, config, ... -}: { +}: +{ home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ ".mozilla" ".floorp" ]; - home.packages = [(pkgs.lib.hiPrio pkgs.floorp)]; + home.packages = [ (pkgs.lib.hiPrio pkgs.floorp) ]; programs.firefox = { enable = true; package = pkgs.firefox.override { @@ -54,10 +55,11 @@ id = 1; isDefault = true; name = "personal"; - extensions = with pkgs.nur.repos.rycee.firefox-addons; let - myExtensions = - pkgs.callPackage ./extensions.nix {inherit buildFirefoxXpiAddon;}; - in + extensions = + with pkgs.nur.repos.rycee.firefox-addons; + let + myExtensions = pkgs.callPackage ./extensions.nix { inherit buildFirefoxXpiAddon; }; + in [ ublock-origin darkreader diff --git a/users/modules/firefox/extensions.nix b/users/modules/firefox/extensions.nix --- a/users/modules/firefox/extensions.nix +++ b/users/modules/firefox/extensions.nix @@ -3,7 +3,8 @@ fetchurl, lib, stdenv, -}: { +}: +{ "better-clean-twitter" = buildFirefoxXpiAddon { pname = "better-clean-twitter"; version = "1.3.2"; @@ -53,7 +54,7 @@ meta = with lib; { description = "Firefox theme based on https://github.com/catppuccin/catppuccin"; license = licenses.cc-by-30; - mozPermissions = []; + mozPermissions = [ ]; platforms = platforms.all; }; }; diff --git a/users/modules/fluxbox/default.nix b/users/modules/fluxbox/default.nix --- a/users/modules/fluxbox/default.nix +++ b/users/modules/fluxbox/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ xsession.enable = true; xsession.windowManager.fluxbox = { enable = true; diff --git a/users/modules/foot/default.nix b/users/modules/foot/default.nix --- a/users/modules/foot/default.nix +++ b/users/modules/foot/default.nix @@ -2,7 +2,8 @@ lib, pkgs, ... -}: { +}: +{ settings.terminal.name = "foot"; settings.terminal.binary = "${pkgs.foot}/bin/foot"; programs.foot = { diff --git a/users/modules/fzf/default.nix b/users/modules/fzf/default.nix --- a/users/modules/fzf/default.nix +++ b/users/modules/fzf/default.nix @@ -1,4 +1,5 @@ -{config, ...}: { +{ config, ... }: +{ programs.fzf.enable = true; # home.sessionVariables = { # FZF_DEFAULT_OPTS = "--color=spinner:#F8BD96,hl:#F28FAD --color=fg:#D9E0EE,header:#F28FAD,info:#DDB6F2,pointer:#F8BD96 --color=marker:#F8BD96,fg+:#F2CDCD,prompt:#DDB6F2,hl+:#F28FAD"; diff --git a/users/modules/git/default.nix b/users/modules/git/default.nix --- a/users/modules/git/default.nix +++ b/users/modules/git/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.git = { enable = true; extraConfig = { diff --git a/users/modules/godot/default.nix b/users/modules/godot/default.nix --- a/users/modules/godot/default.nix +++ b/users/modules/godot/default.nix @@ -1,3 +1,4 @@ -{pkgs, ...}: { - home.packages = with pkgs; [godot_4]; +{ pkgs, ... }: +{ + home.packages = with pkgs; [ godot_4 ]; } diff --git a/users/modules/helix/default.nix b/users/modules/helix/default.nix --- a/users/modules/helix/default.nix +++ b/users/modules/helix/default.nix @@ -2,15 +2,24 @@ inputs, pkgs, ... -}: { +}: +{ stylix.targets.helix.enable = false; programs.helix = { enable = true; languages.language = [ { name = "dockerfile"; - roots = ["Dockerfile" "Containerfile"]; - file-types = ["Dockerfile" "Containerfile" "dockerfile" "containerfile"]; + roots = [ + "Dockerfile" + "Containerfile" + ]; + file-types = [ + "Dockerfile" + "Containerfile" + "dockerfile" + "containerfile" + ]; } ]; settings = { @@ -38,9 +47,19 @@ "<" = ">"; }; statusline = { - left = ["mode" "spinner"]; - center = ["file-name" "file-encoding" "version-control"]; - right = ["diagnostics" "selections"]; + left = [ + "mode" + "spinner" + ]; + center = [ + "file-name" + "file-encoding" + "version-control" + ]; + right = [ + "diagnostics" + "selections" + ]; }; }; }; diff --git a/users/modules/hyprland/config.nix b/users/modules/hyprland/config.nix --- a/users/modules/hyprland/config.nix +++ b/users/modules/hyprland/config.nix @@ -2,8 +2,10 @@ config, pkgs, ... -}: let - run-as-service = slice: +}: +let + run-as-service = + slice: pkgs.writeShellScript "as-systemd-transient" '' exec ${pkgs.systemd}/bin/systemd-run \ --slice=app-${slice}.slice \ @@ -15,7 +17,8 @@ launcher = "rofi"; launcherCmd = "${launcher} -show drun"; term = config.settings.terminal.name; -in { +in +{ wayland.windowManager.hyprland.extraConfig = '' # should be configured per-profile monitor=eDP-1,preferred,0x0,1.6 @@ -130,18 +133,22 @@ bind=SUPERSHIFT,braceright,focusmonitor,r # workspaces - ${builtins.concatStringsSep "\n" (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in + ${builtins.concatStringsSep "\n" ( + builtins.genList ( + x: + let + ws = + let + c = (x + 1) / 10; + in builtins.toString (x + 1 - (c * 10)); - in '' + in + '' bind=SUPER,${ws},workspace,${toString (x + 1)} bind=SHIFTSUPER,${ws},movetoworkspacesilent,${toString (x + 1)} '' - ) - 10)} + ) 10 + )} # screenshot bind=,Print,exec,grimblast --notify copysave area diff --git a/users/modules/hyprland/default.nix b/users/modules/hyprland/default.nix --- a/users/modules/hyprland/default.nix +++ b/users/modules/hyprland/default.nix @@ -3,7 +3,8 @@ pkgs, inputs, ... -}: { +}: +{ imports = [ ../wayland ../swaylock diff --git a/users/modules/hyprland/swayidle.nix b/users/modules/hyprland/swayidle.nix --- a/users/modules/hyprland/swayidle.nix +++ b/users/modules/hyprland/swayidle.nix @@ -2,8 +2,12 @@ pkgs, lib, ... -}: { - home.packages = with pkgs; [wlopm swayidle]; +}: +{ + home.packages = with pkgs; [ + wlopm + swayidle + ]; services.swayidle = { enable = true; events = [ @@ -28,5 +32,5 @@ } ]; }; - systemd.user.services.swayidle.Install.WantedBy = lib.mkForce ["hyprland-session.target"]; + systemd.user.services.swayidle.Install.WantedBy = lib.mkForce [ "hyprland-session.target" ]; } diff --git a/users/modules/lollypop/default.nix b/users/modules/lollypop/default.nix --- a/users/modules/lollypop/default.nix +++ b/users/modules/lollypop/default.nix @@ -2,7 +2,10 @@ config, pkgs, ... -}: { - home.packages = [pkgs.lollypop]; - home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".local/share/lollypop"]; +}: +{ + home.packages = [ pkgs.lollypop ]; + home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ + ".local/share/lollypop" + ]; } diff --git a/users/modules/mako/default.nix b/users/modules/mako/default.nix --- a/users/modules/mako/default.nix +++ b/users/modules/mako/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.mako = { enable = true; anchor = "top-center"; diff --git a/users/modules/musikcube/default.nix b/users/modules/musikcube/default.nix --- a/users/modules/musikcube/default.nix +++ b/users/modules/musikcube/default.nix @@ -3,9 +3,11 @@ pkgs, lib, ... -}: let +}: +let cfg = config.programs.musikcube; -in { +in +{ options = { programs.musikcube = { enable = lib.mkEnableOption "whether to enable musikcube"; @@ -14,15 +16,17 @@ default = pkgs.musikcube; }; settings = lib.mkOption { - type = (pkgs.formats.json {}).type; + type = (pkgs.formats.json { }).type; default = builtins.fromJSON (builtins.readFile ./default-config.json); }; }; }; config = lib.mkIf cfg.enable { - home.packages = [cfg.package]; - home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".config/musikcube"]; + home.packages = [ cfg.package ]; + home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ + ".config/musikcube" + ]; xdg.configFile."musikcube/settings.json".text = builtins.toJSON cfg.settings; }; } diff --git a/users/modules/musikcubed/default.nix b/users/modules/musikcubed/default.nix --- a/users/modules/musikcubed/default.nix +++ b/users/modules/musikcubed/default.nix @@ -3,9 +3,11 @@ lib, pkgs, ... -}: let +}: +let cfg = config.services.musikcubed; -in { +in +{ options = { services.musikcubed = { enable = lib.mkEnableOption "whether to enable musikcubed"; @@ -14,7 +16,7 @@ default = pkgs.musikcube; }; settings = lib.mkOption { - type = (pkgs.formats.json {}).type; + type = (pkgs.formats.json { }).type; default = builtins.fromJSON (builtins.readFile ./default-config.json); }; }; @@ -22,7 +24,7 @@ config = lib.mkIf cfg.enable { systemd.user.services.musikcubed = { Install = { - WantedBy = ["default.target"]; + WantedBy = [ "default.target" ]; }; Unit = { Description = "musikcubed"; @@ -34,6 +36,7 @@ RestartSec = 5; }; }; - xdg.configFile."musikcube/plugin_musikcubeserver(wss,http).json".text = builtins.toJSON cfg.settings; + xdg.configFile."musikcube/plugin_musikcubeserver(wss,http).json".text = + builtins.toJSON cfg.settings; }; } diff --git a/users/modules/newsflash/default.nix b/users/modules/newsflash/default.nix --- a/users/modules/newsflash/default.nix +++ b/users/modules/newsflash/default.nix @@ -2,8 +2,9 @@ config, pkgs, ... -}: { - home.packages = [pkgs.newsflash]; +}: +{ + home.packages = [ pkgs.newsflash ]; home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ ".local/share/news-flash" ".config/news-flash" diff --git a/users/modules/obsidian/default.nix b/users/modules/obsidian/default.nix --- a/users/modules/obsidian/default.nix +++ b/users/modules/obsidian/default.nix @@ -3,7 +3,10 @@ config, lib, ... -}: { - home.packages = [pkgs.obsidian]; - home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [".config/obsidian"]; +}: +{ + home.packages = [ pkgs.obsidian ]; + home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ + ".config/obsidian" + ]; } diff --git a/users/modules/premid/default.nix b/users/modules/premid/default.nix --- a/users/modules/premid/default.nix +++ b/users/modules/premid/default.nix @@ -1,7 +1,8 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ systemd.user.services.premid = { Install = { - WantedBy = ["default.target"]; + WantedBy = [ "default.target" ]; }; Unit = { Description = "premid"; diff --git a/users/modules/psd/default.nix b/users/modules/psd/default.nix --- a/users/modules/psd/default.nix +++ b/users/modules/psd/default.nix @@ -1,13 +1,18 @@ -username: {pkgs, ...}: { +username: +{ pkgs, ... }: +{ services.psd.enable = true; security.sudo.extraRules = [ { - users = [username]; + users = [ username ]; commands = [ { command = "${pkgs.profile-sync-daemon}/bin/psd-overlay-helper"; - options = ["SETENV" "NOPASSWD"]; + options = [ + "SETENV" + "NOPASSWD" + ]; } ]; } diff --git a/users/modules/ripcord/default.nix b/users/modules/ripcord/default.nix --- a/users/modules/ripcord/default.nix +++ b/users/modules/ripcord/default.nix @@ -2,8 +2,9 @@ config, pkgs, ... -}: { - home.packages = [pkgs.ripcord]; +}: +{ + home.packages = [ pkgs.ripcord ]; home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ ".local/share/Ripcord" ]; diff --git a/users/modules/rofi-nm/default.nix b/users/modules/rofi-nm/default.nix --- a/users/modules/rofi-nm/default.nix +++ b/users/modules/rofi-nm/default.nix @@ -3,7 +3,8 @@ pkgs, lib, ... -}: let +}: +let rofi-nm = pkgs.fetchurl { url = "https://raw.githubusercontent.com/P3rf/rofi-network-manager/1daa69406c9b6539a4744eafb0d5bb8afdc80e9b/rofi-network-manager.sh"; hash = "sha256:1nlnjmk5b743j5826z2nzfvjwk0fmbf7gk38darby93kdr3nv5zx"; @@ -11,7 +12,8 @@ package = pkgs.writeShellScriptBin "rofi-nm" '' ${config.home.homeDirectory}/.config/rofi-nm/rofi-nm.sh ''; -in { +in +{ options = { programs.rofi-nm.package = lib.mkOption { type = lib.types.package; @@ -20,11 +22,11 @@ config = { programs.rofi-nm.package = package; - home.packages = [package]; + home.packages = [ package ]; xdg.configFile = { "rofi-nm/rofi-nm.sh" = { - source = pkgs.runCommandLocal "rofi-nm" {} '' + source = pkgs.runCommandLocal "rofi-nm" { } '' cp --no-preserve=mode,ownership ${rofi-nm} rofi-nm.sh substituteInPlace rofi-nm.sh \ --replace "#!/bin/bash" "#!${pkgs.stdenv.shell}" \ diff --git a/users/modules/rofi/default.nix b/users/modules/rofi/default.nix --- a/users/modules/rofi/default.nix +++ b/users/modules/rofi/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.rofi = { enable = true; package = pkgs.rofi-wayland; diff --git a/users/modules/s3s/default.nix b/users/modules/s3s/default.nix --- a/users/modules/s3s/default.nix +++ b/users/modules/s3s/default.nix @@ -2,7 +2,8 @@ config, inputs, ... -}: { - imports = [inputs.s3s.homeManagerModule]; +}: +{ + imports = [ inputs.s3s.homeManagerModule ]; services.s3s.enable = true; } diff --git a/users/modules/settings/default.nix b/users/modules/settings/default.nix --- a/users/modules/settings/default.nix +++ b/users/modules/settings/default.nix @@ -2,11 +2,13 @@ config, lib, ... -}: let +}: +let l = lib // builtins; t = l.types; cfg = config.settings; -in { +in +{ options = { settings.enable = l.mkOption { type = t.bool; diff --git a/users/modules/smos/default.nix b/users/modules/smos/default.nix --- a/users/modules/smos/default.nix +++ b/users/modules/smos/default.nix @@ -3,10 +3,12 @@ inputs, secrets, ... -}: let +}: +let smosDir = "${config.home.homeDirectory}/smos"; -in { - imports = ["${inputs.smos}/nix/home-manager-module.nix"]; +in +{ + imports = [ "${inputs.smos}/nix/home-manager-module.nix" ]; programs.smos = { enable = true; notify.enable = true; diff --git a/users/modules/spotify/default.nix b/users/modules/spotify/default.nix --- a/users/modules/spotify/default.nix +++ b/users/modules/spotify/default.nix @@ -2,14 +2,15 @@ config, pkgs, ... -}: { +}: +{ services.spotifyd = { enable = true; settings = { device_name = "nix"; }; }; - home.packages = [pkgs.spotify-tui]; + home.packages = [ pkgs.spotify-tui ]; home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = [ ".config/spotify-tui" ]; diff --git a/users/modules/ssh/default.nix b/users/modules/ssh/default.nix --- a/users/modules/ssh/default.nix +++ b/users/modules/ssh/default.nix @@ -1,4 +1,5 @@ -{nixosConfig, ...}: { +{ nixosConfig, ... }: +{ programs.ssh = { enable = true; compression = true; diff --git a/users/modules/starship/default.nix b/users/modules/starship/default.nix --- a/users/modules/starship/default.nix +++ b/users/modules/starship/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.starship = { enable = true; settings = { diff --git a/users/modules/sway/default.nix b/users/modules/sway/default.nix --- a/users/modules/sway/default.nix +++ b/users/modules/sway/default.nix @@ -5,7 +5,8 @@ lib, tlib, ... -}: { +}: +{ imports = [ ../wayland ../swaylock @@ -15,105 +16,110 @@ # ./swayidle.nix ]; wayland.windowManager = { - sway = let - mkRofiCmd = args: "${config.programs.rofi.package}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --"; - inherit (tlib) pkgBin; - in { - enable = true; - extraSessionCommands = '' - export QT_QPA_PLATFORM=wayland - ''; - wrapperFeatures.gtk = true; - extraConfig = '' - exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway - exec xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 - ''; - config = { - bars = []; - gaps.smartBorders = "on"; - menu = mkRofiCmd [ - "-show" - "drun" - ]; - modifier = "Mod4"; - terminal = config.settings.terminal.binary; - keybindings = let - mod = config.wayland.windowManager.sway.config.modifier; + sway = + let + mkRofiCmd = + args: + "${config.programs.rofi.package}/bin/rofi ${lib.concatStringsSep " " args} | ${pkgs.sway}/bin/swaymsg --"; + inherit (tlib) pkgBin; + in + { + enable = true; + extraSessionCommands = '' + export QT_QPA_PLATFORM=wayland + ''; + wrapperFeatures.gtk = true; + extraConfig = '' + exec dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP=sway + exec xprop -root -f _XWAYLAND_GLOBAL_OUTPUT_SCALE 32c -set _XWAYLAND_GLOBAL_OUTPUT_SCALE 2 + ''; + config = { + bars = [ ]; + gaps.smartBorders = "on"; + menu = mkRofiCmd [ + "-show" + "drun" + ]; + modifier = "Mod4"; + terminal = config.settings.terminal.binary; + keybindings = + let + mod = config.wayland.windowManager.sway.config.modifier; - cat = pkgs.coreutils + "/bin/cat"; - grim = pkgBin pkgs.grim; - slurp = pkgBin pkgs.slurp; - pactl = pkgs.pulseaudio + "/bin/pactl"; - playerctl = pkgBin pkgs.playerctl; - wf-recorder = pkgBin pkgs.wf-recorder; - wl-copy = pkgs.wl-clipboard + "/bin/wl-copy"; - wlogout = pkgBin pkgs.wlogout; - light = pkgBin pkgs.light; + cat = pkgs.coreutils + "/bin/cat"; + grim = pkgBin pkgs.grim; + slurp = pkgBin pkgs.slurp; + pactl = pkgs.pulseaudio + "/bin/pactl"; + playerctl = pkgBin pkgs.playerctl; + wf-recorder = pkgBin pkgs.wf-recorder; + wl-copy = pkgs.wl-clipboard + "/bin/wl-copy"; + wlogout = pkgBin pkgs.wlogout; + light = pkgBin pkgs.light; - shotFile = config.home.homeDirectory + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')"; - shotDir = config.home.homeDirectory + "/shots"; - in - lib.mkOptionDefault - { - "${mod}+Escape" = "exec ${wlogout} -p layer-shell"; - "${mod}+q" = "kill"; - "${mod}+Shift+e" = "exit"; - "${mod}+Shift+r" = "reload"; - # Screenshot and copy it to clipboard - "Mod1+s" = '' - exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png - ''; - # Save selected area as a picture and copy it to clipboard - "Mod1+Shift+s" = '' - exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png - ''; - # Record screen - "Mod1+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -f "${shotFile}.mp4"''; - # Record an area - "Mod1+Shift+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -g "$(${slurp})" -f "${shotFile}.mp4"''; - # Stop recording - "Mod1+c" = "exec pkill -INT wf-recorder"; - "XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume 0 +5%"; - "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume 0 -5%"; - "XF86AudioMute" = "exec ${pactl} set-sink-mute 0 toggle"; - "XF86AudioPlay" = "exec ${playerctl} play-pause"; - "XF86AudioPrev" = "exec ${playerctl} previous"; - "XF86AudioNext" = "exec ${playerctl} next"; - "XF86AudioStop" = "exec ${playerctl} stop"; - "XF86MonBrightnessUp" = "exec ${light} -T 1.4"; - "XF86MonBrightnessDown" = "exec ${light} -T 0.72"; + shotFile = config.home.homeDirectory + "/shots/shot_$(date '+%Y_%m_%d_%H_%M')"; + shotDir = config.home.homeDirectory + "/shots"; + in + lib.mkOptionDefault { + "${mod}+Escape" = "exec ${wlogout} -p layer-shell"; + "${mod}+q" = "kill"; + "${mod}+Shift+e" = "exit"; + "${mod}+Shift+r" = "reload"; + # Screenshot and copy it to clipboard + "Mod1+s" = '' + exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png + ''; + # Save selected area as a picture and copy it to clipboard + "Mod1+Shift+s" = '' + exec export SFILE="${shotFile}.png" && mkdir -p ${shotDir} && ${grim} -g "$(${slurp})" "$SFILE" && ${cat} "$SFILE" | ${wl-copy} -t image/png + ''; + # Record screen + "Mod1+r" = ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -f "${shotFile}.mp4"''; + # Record an area + "Mod1+Shift+r" = + ''exec mkdir -p ${shotDir} && ${wf-recorder} -x yuv420p -g "$(${slurp})" -f "${shotFile}.mp4"''; + # Stop recording + "Mod1+c" = "exec pkill -INT wf-recorder"; + "XF86AudioRaiseVolume" = "exec ${pactl} set-sink-volume 0 +5%"; + "XF86AudioLowerVolume" = "exec ${pactl} set-sink-volume 0 -5%"; + "XF86AudioMute" = "exec ${pactl} set-sink-mute 0 toggle"; + "XF86AudioPlay" = "exec ${playerctl} play-pause"; + "XF86AudioPrev" = "exec ${playerctl} previous"; + "XF86AudioNext" = "exec ${playerctl} next"; + "XF86AudioStop" = "exec ${playerctl} stop"; + "XF86MonBrightnessUp" = "exec ${light} -T 1.4"; + "XF86MonBrightnessDown" = "exec ${light} -T 0.72"; + }; + input = { + "13364:832:Keychron_Keychron_V4_Keyboard" = { + xkb_layout = nixosConfig.services.xserver.layout; + }; + "1:1:AT_Translated_Set_2_keyboard" = { + xkb_layout = "tr"; + }; + "type:pointer" = { + accel_profile = "flat"; + }; + "type:touchpad" = { + accel_profile = "adaptive"; + tap = "enabled"; + scroll_method = "two_finger"; + dwt = "enabled"; + events = "disabled_on_external_mouse"; + }; }; - input = { - "13364:832:Keychron_Keychron_V4_Keyboard" = { - xkb_layout = nixosConfig.services.xserver.layout; - }; - "1:1:AT_Translated_Set_2_keyboard" = { - xkb_layout = "tr"; - }; - "type:pointer" = { - accel_profile = "flat"; - }; - "type:touchpad" = { - accel_profile = "adaptive"; - tap = "enabled"; - scroll_method = "two_finger"; - dwt = "enabled"; - events = "disabled_on_external_mouse"; - }; - }; - output = { - "*" = { - bg = "${config.stylix.image} fill"; - }; - "eDP-1" = { - scale = "2"; - adaptive_sync = "on"; - }; - "HDMI-A-1" = { - mode = "1920x1080@74.973Hz"; + output = { + "*" = { + bg = "${config.stylix.image} fill"; + }; + "eDP-1" = { + scale = "2"; + adaptive_sync = "on"; + }; + "HDMI-A-1" = { + mode = "1920x1080@74.973Hz"; + }; }; }; }; - }; }; } diff --git a/users/modules/swaylock/default.nix b/users/modules/swaylock/default.nix --- a/users/modules/swaylock/default.nix +++ b/users/modules/swaylock/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.swaylock = { package = pkgs.swaylock-effects; settings = { diff --git a/users/modules/urxvt/default.nix b/users/modules/urxvt/default.nix --- a/users/modules/urxvt/default.nix +++ b/users/modules/urxvt/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.urxvt = { enable = true; keybindings = { diff --git a/users/modules/vesktop/default.nix b/users/modules/vesktop/default.nix --- a/users/modules/vesktop/default.nix +++ b/users/modules/vesktop/default.nix @@ -1,3 +1,4 @@ -{pkgs, ...}: { - home.packages = [pkgs.vesktop]; +{ pkgs, ... }: +{ + home.packages = [ pkgs.vesktop ]; } diff --git a/users/modules/wayland/default.nix b/users/modules/wayland/default.nix --- a/users/modules/wayland/default.nix +++ b/users/modules/wayland/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ wl-clipboard ]; diff --git a/users/modules/wezterm/default.nix b/users/modules/wezterm/default.nix --- a/users/modules/wezterm/default.nix +++ b/users/modules/wezterm/default.nix @@ -2,9 +2,10 @@ pkgs, config, ... -}: { +}: +{ settings.terminal.name = "wezterm"; - home.packages = [pkgs.wezterm]; + home.packages = [ pkgs.wezterm ]; xdg.enable = true; xdg.configFile = { "wezterm/wezterm.lua".text = '' diff --git a/users/modules/wlsunset/default.nix b/users/modules/wlsunset/default.nix --- a/users/modules/wlsunset/default.nix +++ b/users/modules/wlsunset/default.nix @@ -1,6 +1,8 @@ -{inputs, ...}: let +{ inputs, ... }: +let geo = import "${inputs.self}/locale/geo.nix"; -in { +in +{ services.wlsunset = { enable = true; latitude = geo.lat; diff --git a/users/modules/wtf/default.nix b/users/modules/wtf/default.nix --- a/users/modules/wtf/default.nix +++ b/users/modules/wtf/default.nix @@ -1,1 +1,4 @@ -{pkgs, ...}: {home.packages = [pkgs.wtf];} +{ pkgs, ... }: +{ + home.packages = [ pkgs.wtf ]; +} diff --git a/users/modules/zoxide/default.nix b/users/modules/zoxide/default.nix --- a/users/modules/zoxide/default.nix +++ b/users/modules/zoxide/default.nix @@ -3,8 +3,9 @@ config, lib, ... -}: { - home.packages = [pkgs.zoxide]; +}: +{ + home.packages = [ pkgs.zoxide ]; home.persistence."${config.system.persistDir}${config.home.homeDirectory}".directories = lib.singleton ".local/share/zoxide"; programs.zsh.initExtra = '' diff --git a/users/modules/zsh/default.nix b/users/modules/zsh/default.nix --- a/users/modules/zsh/default.nix +++ b/users/modules/zsh/default.nix @@ -4,9 +4,11 @@ lib, pkgs, ... -}: let +}: +let pkgBin = tlib.pkgBin; -in { +in +{ programs.zsh = { enable = true; autocd = true; @@ -27,7 +29,15 @@ # configure history history = { extended = true; - ignorePatterns = ["rm *" "mv *" "l" "ls" "ll" "g s" "git status"]; + ignorePatterns = [ + "rm *" + "mv *" + "l" + "ls" + "ll" + "g s" + "git status" + ]; save = 1000000; size = 1000000; }; @@ -36,11 +46,9 @@ history.path = "${config.home.homeDirectory}/.local/share/zsh/history"; # extra stuff for fixing gpg-agent ssh and some random commands initExtra = '' - ${ - lib.optionalString - (config.programs.ssh.enable && config.services.gpg-agent.enable) - "export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)" - } + ${lib.optionalString ( + config.programs.ssh.enable && config.services.gpg-agent.enable + ) "export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)"} function tomp4 () { ${pkgBin pkgs.ffmpeg} -i $1 -c:v libx264 -preset slow -crf 30 -c:a aac -b:a 128k "$1.mp4" diff --git a/hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix b/hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix --- a/hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix +++ b/hosts/wolumonde/modules/webhooks/deploy-wolumonde.nix @@ -1,6 +1,10 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.webhook.hooks."deploy-wolumonde" = { execute-command = "${pkgs.curl}/bin/curl"; - pass-arguments-to-command = builtins.map (n: {source = "string"; name = n;}) ["http://higashi:9000/hooks/deploy-wolumonde"]; + pass-arguments-to-command = builtins.map (n: { + source = "string"; + name = n; + }) [ "http://higashi:9000/hooks/deploy-wolumonde" ]; }; -} \ No newline at end of file +} diff --git a/modules/network/dns/stubby/default.nix b/modules/network/dns/stubby/default.nix --- a/modules/network/dns/stubby/default.nix +++ b/modules/network/dns/stubby/default.nix @@ -1,5 +1,5 @@ { - imports = [./nextdns.nix]; + imports = [ ./nextdns.nix ]; networking.networkmanager.dns = "none"; services.stubby.enable = true; } diff --git a/modules/network/dns/stubby/nextdns.nix b/modules/network/dns/stubby/nextdns.nix --- a/modules/network/dns/stubby/nextdns.nix +++ b/modules/network/dns/stubby/nextdns.nix @@ -1,17 +1,19 @@ { services.stubby = { roundRobinUpstreams = false; - upstreamServers = let - nextDnsId = "75e43d"; - in '' - - address_data: 45.90.28.0 - tls_auth_name: "${nextDnsId}.dns1.nextdns.io" - - address_data: 2a07:a8c0::0 - tls_auth_name: "${nextDnsId}.dns1.nextdns.io" - - address_data: 45.90.30.0 - tls_auth_name: "${nextDnsId}.dns2.nextdns.io" - - address_data: 2a07:a8c1::0 - tls_auth_name: "${nextDnsId}.dns2.nextdns.io" - ''; + upstreamServers = + let + nextDnsId = "75e43d"; + in + '' + - address_data: 45.90.28.0 + tls_auth_name: "${nextDnsId}.dns1.nextdns.io" + - address_data: 2a07:a8c0::0 + tls_auth_name: "${nextDnsId}.dns1.nextdns.io" + - address_data: 45.90.30.0 + tls_auth_name: "${nextDnsId}.dns2.nextdns.io" + - address_data: 2a07:a8c1::0 + tls_auth_name: "${nextDnsId}.dns2.nextdns.io" + ''; }; } -- tangled.sh