diff --git a/flake.nix b/flake.nix index 7c709434..d4923dcd 100644 --- a/flake.nix +++ b/flake.nix @@ -81,152 +81,149 @@ }; }; - outputs = - { - self, - nixpkgs, - home-manager, - ... - }@inputs: - let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - systems = [ - "x86_64-linux" - "aarch64-linux" - ]; - forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs systems ( - system: + outputs = { + self, + nixpkgs, + home-manager, + ... + } @ inputs: let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + systems = [ + "x86_64-linux" + "aarch64-linux" + ]; + forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs systems ( + system: import nixpkgs { inherit system; config.allowUnfree = true; } - ); - in - { - inherit lib; - nixosModules = import ./modules/nixos; - homeManagerModules = import ./modules/home-manager; - templates = import ./templates; + ); + in { + inherit lib; + nixosModules = import ./modules/nixos; + homeManagerModules = import ./modules/home-manager; + templates = import ./templates; - overlays = import ./overlays { inherit inputs outputs; }; - hydraJobs = import ./hydra.nix { inherit inputs outputs; }; + overlays = import ./overlays {inherit inputs outputs;}; + hydraJobs = import ./hydra.nix {inherit inputs outputs;}; - packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; }); - devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; }); - formatter = forEachSystem (pkgs: pkgs.nixfmt-rfc-style); + packages = forEachSystem (pkgs: import ./pkgs {inherit pkgs;}); + devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;}); + formatter = forEachSystem (pkgs: pkgs.alejandra); - nixosConfigurations = { - # Main desktop - atlas = lib.nixosSystem { - modules = [ ./hosts/atlas ]; - specialArgs = { - inherit inputs outputs; - }; - }; - # Secondary desktop - maia = lib.nixosSystem { - modules = [ ./hosts/maia ]; - specialArgs = { - inherit inputs outputs; - }; - }; - # Personal laptop - pleione = lib.nixosSystem { - modules = [ ./hosts/pleione ]; - specialArgs = { - inherit inputs outputs; - }; - }; - # Work laptop - electra = lib.nixosSystem { - modules = [ ./hosts/electra ]; - specialArgs = { - inherit inputs outputs; - }; - }; - # Core server (Vultr) - alcyone = lib.nixosSystem { - modules = [ ./hosts/alcyone ]; - specialArgs = { - inherit inputs outputs; - }; - }; - # Build and game server (Oracle) - celaeno = lib.nixosSystem { - modules = [ ./hosts/celaeno ]; - specialArgs = { - inherit inputs outputs; - }; - }; - # Media server (RPi) - merope = lib.nixosSystem { - modules = [ ./hosts/merope ]; - specialArgs = { - inherit inputs outputs; - }; + nixosConfigurations = { + # Main desktop + atlas = lib.nixosSystem { + modules = [./hosts/atlas]; + specialArgs = { + inherit inputs outputs; }; }; - - homeConfigurations = { - # Desktops - "misterio@atlas" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/atlas.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; + # Secondary desktop + maia = lib.nixosSystem { + modules = [./hosts/maia]; + specialArgs = { + inherit inputs outputs; }; - "misterio@maia" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/maia.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; + }; + # Personal laptop + pleione = lib.nixosSystem { + modules = [./hosts/pleione]; + specialArgs = { + inherit inputs outputs; }; - "misterio@pleione" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/pleione.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; + }; + # Work laptop + electra = lib.nixosSystem { + modules = [./hosts/electra]; + specialArgs = { + inherit inputs outputs; }; - "misterio@electra" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/electra.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; + }; + # Core server (Vultr) + alcyone = lib.nixosSystem { + modules = [./hosts/alcyone]; + specialArgs = { + inherit inputs outputs; }; - "misterio@alcyone" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/alcyone.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; + }; + # Build and game server (Oracle) + celaeno = lib.nixosSystem { + modules = [./hosts/celaeno]; + specialArgs = { + inherit inputs outputs; }; - "misterio@merope" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/merope.nix ]; - pkgs = pkgsFor.aarch64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; - }; - "misterio@celaeno" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/celaeno.nix ]; - pkgs = pkgsFor.aarch64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; - }; - "misterio@generic" = lib.homeManagerConfiguration { - modules = [ ./home/misterio/generic.nix ]; - pkgs = pkgsFor.x86_64-linux; - extraSpecialArgs = { - inherit inputs outputs; - }; + }; + # Media server (RPi) + merope = lib.nixosSystem { + modules = [./hosts/merope]; + specialArgs = { + inherit inputs outputs; }; }; }; + + homeConfigurations = { + # Desktops + "misterio@atlas" = lib.homeManagerConfiguration { + modules = [./home/misterio/atlas.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@maia" = lib.homeManagerConfiguration { + modules = [./home/misterio/maia.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@pleione" = lib.homeManagerConfiguration { + modules = [./home/misterio/pleione.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@electra" = lib.homeManagerConfiguration { + modules = [./home/misterio/electra.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@alcyone" = lib.homeManagerConfiguration { + modules = [./home/misterio/alcyone.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@merope" = lib.homeManagerConfiguration { + modules = [./home/misterio/merope.nix]; + pkgs = pkgsFor.aarch64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@celaeno" = lib.homeManagerConfiguration { + modules = [./home/misterio/celaeno.nix]; + pkgs = pkgsFor.aarch64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + "misterio@generic" = lib.homeManagerConfiguration { + modules = [./home/misterio/generic.nix]; + pkgs = pkgsFor.x86_64-linux; + extraSpecialArgs = { + inherit inputs outputs; + }; + }; + }; + }; } diff --git a/home/misterio/alcyone.nix b/home/misterio/alcyone.nix index 454a4fda..f2340595 100644 --- a/home/misterio/alcyone.nix +++ b/home/misterio/alcyone.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ - imports = [ ./global ]; +{inputs, ...}: { + imports = [./global]; colorscheme = inputs.nix-colors.colorSchemes.equilibrium-dark; } diff --git a/home/misterio/atlas.nix b/home/misterio/atlas.nix index 52ac448a..60296153 100644 --- a/home/misterio/atlas.nix +++ b/home/misterio/atlas.nix @@ -3,11 +3,9 @@ lib, pkgs, ... -}: -let +}: let inherit (inputs.nix-colors) colorSchemes; -in -{ +in { imports = [ ./global ./features/desktop/hyprland diff --git a/home/misterio/celaeno.nix b/home/misterio/celaeno.nix index 1ca9b185..91220dce 100644 --- a/home/misterio/celaeno.nix +++ b/home/misterio/celaeno.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ - imports = [ ./global ]; +{inputs, ...}: { + imports = [./global]; colorscheme = inputs.nix-colors.colorSchemes.unikitty-dark; } diff --git a/home/misterio/electra.nix b/home/misterio/electra.nix index 08983701..f4903135 100644 --- a/home/misterio/electra.nix +++ b/home/misterio/electra.nix @@ -4,11 +4,9 @@ lib, pkgs, ... -}: -let +}: let inherit (inputs.nix-colors) colorSchemes; -in -{ +in { imports = [ ./global ./features/desktop/wireless diff --git a/home/misterio/features/cli/default.nix b/home/misterio/features/cli/default.nix index d9b03579..edfbf97f 100644 --- a/home/misterio/features/cli/default.nix +++ b/home/misterio/features/cli/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { imports = [ ./bash.nix ./bat.nix diff --git a/home/misterio/features/cli/fish.nix b/home/misterio/features/cli/fish.nix index 44d5c3af..615e996a 100644 --- a/home/misterio/features/cli/fish.nix +++ b/home/misterio/features/cli/fish.nix @@ -3,8 +3,7 @@ lib, config, ... -}: -let +}: let inherit (lib) mkIf; packageNames = map (p: p.pname or p.name or null) config.home.packages; hasPackage = name: lib.any (x: x == name) packageNames; @@ -18,8 +17,7 @@ let hasShellColor = config.programs.shellcolor.enable; hasKitty = config.programs.kitty.enable; shellcolor = "${pkgs.shellcolord}/bin/shellcolor"; -in -{ +in { programs.fish = { enable = true; plugins = [ @@ -33,7 +31,9 @@ in hash = "sha256-l17v/aJ4PkjYM8kJDA0zUo87UTsfFqq+Prei/Qq0DRA="; }; patches = [ - (builtins.toFile "fix-complete.diff" # diff + ( + builtins.toFile "fix-complete.diff" # diff + '' diff --git a/completions/aws.fish b/completions/aws.fish index fc75188..1e8d931 100644 @@ -104,7 +104,10 @@ in nvimrg = mkIf (hasNeovim && hasRipgrep) "nvim -q (rg --vimgrep $argv | psub)"; # Merge history upon doing up-or-search # This lets multiple fish instances share history - up-or-search = /* fish */ + up-or-search = + /* + fish + */ '' if commandline --search-mode commandline -f history-search-backward @@ -126,19 +129,23 @@ in # Integrate ssh with shellcolord ssh = mkIf hasShellColor # fish - '' - ${shellcolor} disable $fish_pid - # Check if kitty is available - if set -q KITTY_PID && set -q KITTY_WINDOW_ID && type -q -f kitty - kitty +kitten ssh $argv - else - command ssh $argv - end - ${shellcolor} enable $fish_pid - ${shellcolor} apply $fish_pid - ''; + + '' + ${shellcolor} disable $fish_pid + # Check if kitty is available + if set -q KITTY_PID && set -q KITTY_WINDOW_ID && type -q -f kitty + kitty +kitten ssh $argv + else + command ssh $argv + end + ${shellcolor} enable $fish_pid + ${shellcolor} apply $fish_pid + ''; }; - interactiveShellInit = /* fish */ + interactiveShellInit = + /* + fish + */ '' # Open command buffer in vim when alt+e is pressed bind \ee edit_command_buffer diff --git a/home/misterio/features/cli/fzf.nix b/home/misterio/features/cli/fzf.nix index b8809156..47615fb0 100644 --- a/home/misterio/features/cli/fzf.nix +++ b/home/misterio/features/cli/fzf.nix @@ -1,6 +1,6 @@ { programs.fzf = { enable = true; - defaultOptions = [ "--color 16" ]; + defaultOptions = ["--color 16"]; }; } diff --git a/home/misterio/features/cli/gh.nix b/home/misterio/features/cli/gh.nix index b2ed64c2..9b6e96e3 100644 --- a/home/misterio/features/cli/gh.nix +++ b/home/misterio/features/cli/gh.nix @@ -1,8 +1,7 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.gh = { enable = true; - extensions = with pkgs; [ gh-markdown-preview ]; + extensions = with pkgs; [gh-markdown-preview]; settings = { version = "1"; git_protocol = "ssh"; @@ -10,6 +9,6 @@ }; }; home.persistence = { - "/persist/home/misterio".directories = [ ".config/gh" ]; + "/persist/home/misterio".directories = [".config/gh"]; }; } diff --git a/home/misterio/features/cli/git.nix b/home/misterio/features/cli/git.nix index bd0a8a0c..ff0a10c4 100644 --- a/home/misterio/features/cli/git.nix +++ b/home/misterio/features/cli/git.nix @@ -3,8 +3,7 @@ lib, config, ... -}: -let +}: let ssh = "${pkgs.openssh}/bin/ssh"; git-m7 = pkgs.writeShellScriptBin "git-m7" '' @@ -33,8 +32,7 @@ let git commit --fixup "$@" GIT_SEQUENCE_EDITOR=true git rebase -i --autostash --autosquash $rev^ ''; -in -{ +in { home.packages = [ git-m7 git-fixup diff --git a/home/misterio/features/cli/gpg-commands.nix b/home/misterio/features/cli/gpg-commands.nix index 65d9df65..2c5f34d4 100644 --- a/home/misterio/features/cli/gpg-commands.nix +++ b/home/misterio/features/cli/gpg-commands.nix @@ -1,10 +1,7 @@ -{ pkgs, ... }: - -let +{pkgs, ...}: let ssh = "${pkgs.openssh}/bin/ssh"; gpg-connect-agent = "${pkgs.gnupg}/bin/gpg-connect-agent"; -in -{ +in { isUnlocked = "${pkgs.procps}/bin/pgrep 'gpg-agent' &> /dev/null && ${gpg-connect-agent} 'scd getinfo card_list' /bye | ${pkgs.gnugrep}/bin/grep SERIALNO -q"; unlock = "${ssh} -T localhost -o StrictHostKeyChecking=no exit"; } diff --git a/home/misterio/features/cli/gpg.nix b/home/misterio/features/cli/gpg.nix index 9216d6e0..bbe77618 100644 --- a/home/misterio/features/cli/gpg.nix +++ b/home/misterio/features/cli/gpg.nix @@ -3,46 +3,49 @@ config, lib, ... -}: -{ +}: { services.gpg-agent = { enable = true; enableSshSupport = true; - sshKeys = [ "149F16412997785363112F3DBD713BC91D51B831" ]; + sshKeys = ["149F16412997785363112F3DBD713BC91D51B831"]; enableExtraSocket = true; - pinentryPackage = if config.gtk.enable then pkgs.pinentry-gnome3 else pkgs.pinentry-tty; + pinentryPackage = + if config.gtk.enable + then pkgs.pinentry-gnome3 + else pkgs.pinentry-tty; }; home.packages = lib.optional config.gtk.enable pkgs.gcr; - programs = - let - fixGpg = /* bash */ - '' - gpgconf --launch gpg-agent - ''; - in - { - # Start gpg-agent if it's not running or tunneled in - # SSH does not start it automatically, so this is needed to avoid having to use a gpg command at startup - # https://www.gnupg.org/faq/whats-new-in-2.1.html#autostart - bash.profileExtra = fixGpg; - fish.loginShellInit = fixGpg; - zsh.loginExtra = fixGpg; + programs = let + fixGpg = + /* + bash + */ + '' + gpgconf --launch gpg-agent + ''; + in { + # Start gpg-agent if it's not running or tunneled in + # SSH does not start it automatically, so this is needed to avoid having to use a gpg command at startup + # https://www.gnupg.org/faq/whats-new-in-2.1.html#autostart + bash.profileExtra = fixGpg; + fish.loginShellInit = fixGpg; + zsh.loginExtra = fixGpg; - gpg = { - enable = true; - settings = { - trust-model = "tofu+pgp"; - }; - publicKeys = [ - { - source = ../../pgp.asc; - trust = 5; - } - ]; + gpg = { + enable = true; + settings = { + trust-model = "tofu+pgp"; }; + publicKeys = [ + { + source = ../../pgp.asc; + trust = 5; + } + ]; }; + }; systemd.user.services = { # Link /run/user/$UID/gnupg to ~/.gnupg-sockets @@ -57,8 +60,9 @@ ExecStop = "${pkgs.coreutils}/bin/rm $HOME/.gnupg-sockets"; RemainAfterExit = true; }; - Install.WantedBy = [ "default.target" ]; + Install.WantedBy = ["default.target"]; }; }; } # vim: filetype=nix + diff --git a/home/misterio/features/cli/jujutsu.nix b/home/misterio/features/cli/jujutsu.nix index ff6bc50c..b851bedd 100644 --- a/home/misterio/features/cli/jujutsu.nix +++ b/home/misterio/features/cli/jujutsu.nix @@ -1,5 +1,4 @@ -{ config, ... }: -{ +{config, ...}: { programs.jujutsu = { enable = true; settings = { diff --git a/home/misterio/features/cli/lyrics.nix b/home/misterio/features/cli/lyrics.nix index 5aa81300..4876e5c3 100644 --- a/home/misterio/features/cli/lyrics.nix +++ b/home/misterio/features/cli/lyrics.nix @@ -1,7 +1,9 @@ -{ pkgs, ... }: -{ - home.packages = [ pkgs.lyrics ]; - xdg.configFile."lyrics-in-terminal/lyrics.cfg".text = /* ini */ +{pkgs, ...}: { + home.packages = [pkgs.lyrics]; + xdg.configFile."lyrics-in-terminal/lyrics.cfg".text = + /* + ini + */ '' [OPTIONS] alignment=left diff --git a/home/misterio/features/cli/nix-index.nix b/home/misterio/features/cli/nix-index.nix index c73b9100..f4ccf471 100644 --- a/home/misterio/features/cli/nix-index.nix +++ b/home/misterio/features/cli/nix-index.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { programs.nix-index.enable = true; systemd.user.services.nix-index-database-sync = { @@ -32,6 +35,6 @@ OnBootSec = "10m"; OnUnitActiveSec = "24h"; }; - Install.WantedBy = [ "timers.target" ]; + Install.WantedBy = ["timers.target"]; }; } diff --git a/home/misterio/features/cli/pfetch.nix b/home/misterio/features/cli/pfetch.nix index 104c308a..391de39d 100644 --- a/home/misterio/features/cli/pfetch.nix +++ b/home/misterio/features/cli/pfetch.nix @@ -1,7 +1,6 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { home = { - packages = with pkgs; [ pfetch ]; + packages = with pkgs; [pfetch]; sessionVariables.PF_INFO = "ascii title os kernel uptime shell term desktop scheme palette"; }; } diff --git a/home/misterio/features/cli/ranger.nix b/home/misterio/features/cli/ranger.nix index 8df9096b..b6c960a8 100644 --- a/home/misterio/features/cli/ranger.nix +++ b/home/misterio/features/cli/ranger.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ ranger ]; +{pkgs, ...}: { + home.packages = with pkgs; [ranger]; } diff --git a/home/misterio/features/cli/screen.nix b/home/misterio/features/cli/screen.nix index 7c2592aa..a8255f92 100644 --- a/home/misterio/features/cli/screen.nix +++ b/home/misterio/features/cli/screen.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: -{ - home.packages = [ pkgs.screen ]; +{pkgs, ...}: { + home.packages = [pkgs.screen]; home.file.".screenrc".text = '' startup_message off defbce on diff --git a/home/misterio/features/cli/shellcolor.nix b/home/misterio/features/cli/shellcolor.nix index 0506f8fa..225ca5b7 100644 --- a/home/misterio/features/cli/shellcolor.nix +++ b/home/misterio/features/cli/shellcolor.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let inherit (config.colorscheme) colors; -in -{ +in { programs.shellcolor = { enable = true; settings = { diff --git a/home/misterio/features/cli/ssh.nix b/home/misterio/features/cli/ssh.nix index c4c7e0af..3cfe62aa 100644 --- a/home/misterio/features/cli/ssh.nix +++ b/home/misterio/features/cli/ssh.nix @@ -1,8 +1,10 @@ -{ outputs, lib, ... }: -let - hostnames = builtins.attrNames outputs.nixosConfigurations; -in { + outputs, + lib, + ... +}: let + hostnames = builtins.attrNames outputs.nixosConfigurations; +in { programs.ssh = { enable = true; matchBlocks = { @@ -16,7 +18,7 @@ in } ]; }; - trusted = lib.hm.dag.entryBefore [ "net" ] { + trusted = lib.hm.dag.entryBefore ["net"] { host = "m7.rs *.m7.rs *.ts.m7.rs"; forwardAgent = true; }; @@ -24,6 +26,6 @@ in }; home.persistence = { - "/persist/home/misterio".directories = [ ".ssh" ]; + "/persist/home/misterio".directories = [".ssh"]; }; } diff --git a/home/misterio/features/cli/starship.nix b/home/misterio/features/cli/starship.nix index d08b6638..a3d2c47e 100644 --- a/home/misterio/features/cli/starship.nix +++ b/home/misterio/features/cli/starship.nix @@ -1,18 +1,19 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { programs.starship = { enable = true; settings = { - format = - let - git = "$git_branch$git_commit$git_state$git_status"; - cloud = "$aws$gcloud$openstack"; - in - '' - $username$hostname($shlvl)($cmd_duration) $fill ($nix_shell)$custom - $directory(${git})(${cloud}) $fill $time - $jobs$character - ''; + format = let + git = "$git_branch$git_commit$git_state$git_status"; + cloud = "$aws$gcloud$openstack"; + in '' + $username$hostname($shlvl)($cmd_duration) $fill ($nix_shell)$custom + $directory(${git})(${cloud}) $fill $time + $jobs$character + ''; fill = { symbol = " "; @@ -50,23 +51,21 @@ style = "bold red"; }; custom = { - nix_inspect = - let - excluded = [ - "kitty" - "imagemagick" - "ncurses" - "user-environment" - ]; - in - { - disabled = false; - when = "test -z $IN_NIX_SHELL"; - command = "${(lib.getExe pkgs.nix-inspect)} ${(lib.concatStringsSep " " excluded)}"; - format = "[($output <- )$symbol]($style) "; - symbol = " "; - style = "bold blue"; - }; + nix_inspect = let + excluded = [ + "kitty" + "imagemagick" + "ncurses" + "user-environment" + ]; + in { + disabled = false; + when = "test -z $IN_NIX_SHELL"; + command = "${(lib.getExe pkgs.nix-inspect)} ${(lib.concatStringsSep " " excluded)}"; + format = "[($output <- )$symbol]($style) "; + symbol = " "; + style = "bold blue"; + }; }; character = { diff --git a/home/misterio/features/desktop/common/default.nix b/home/misterio/features/desktop/common/default.nix index 9d4ee188..b0f680fd 100644 --- a/home/misterio/features/desktop/common/default.nix +++ b/home/misterio/features/desktop/common/default.nix @@ -3,8 +3,7 @@ pkgs, config, ... -}: -{ +}: { imports = [ ./deluge.nix ./discord.nix @@ -22,12 +21,11 @@ # Also sets org.freedesktop.appearance color-scheme dconf.settings."org/gnome/desktop/interface".color-scheme = - if config.colorscheme.variant == "dark" then - "prefer-dark" - else if config.colorscheme.variant == "light" then - "prefer-light" - else - "default"; + if config.colorscheme.variant == "dark" + then "prefer-dark" + else if config.colorscheme.variant == "light" + then "prefer-light" + else "default"; xdg.portal.enable = true; } diff --git a/home/misterio/features/desktop/common/deluge.nix b/home/misterio/features/desktop/common/deluge.nix index a4d6f35a..0514f145 100644 --- a/home/misterio/features/desktop/common/deluge.nix +++ b/home/misterio/features/desktop/common/deluge.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ deluge ]; +{pkgs, ...}: { + home.packages = with pkgs; [deluge]; } diff --git a/home/misterio/features/desktop/common/discord.nix b/home/misterio/features/desktop/common/discord.nix index 65d1df6f..ffde0666 100644 --- a/home/misterio/features/desktop/common/discord.nix +++ b/home/misterio/features/desktop/common/discord.nix @@ -1,16 +1,20 @@ -{ config, pkgs, ... }: - -let - c = config.colorscheme.palette; -in { - home.packages = with pkgs; [ vesktop ]; + config, + pkgs, + ... +}: let + c = config.colorscheme.palette; +in { + home.packages = with pkgs; [vesktop]; home.persistence = { - "/persist/home/misterio".directories = [ ".config/vesktop" ]; + "/persist/home/misterio".directories = [".config/vesktop"]; }; - xdg.configFile."vesktop/themes/base16.css".text = /* css */ + xdg.configFile."vesktop/themes/base16.css".text = + /* + css + */ '' @import url("https://slowstab.github.io/dracula/BetterDiscord/source.css"); @import url("https://mulverinex.github.io/legacy-settings-icons/dist-native.css"); diff --git a/home/misterio/features/desktop/common/dragon.nix b/home/misterio/features/desktop/common/dragon.nix index 01da5b6d..96e3b7f1 100644 --- a/home/misterio/features/desktop/common/dragon.nix +++ b/home/misterio/features/desktop/common/dragon.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ xdragon ]; +{pkgs, ...}: { + home.packages = with pkgs; [xdragon]; } diff --git a/home/misterio/features/desktop/common/firefox.nix b/home/misterio/features/desktop/common/firefox.nix index 37d8c594..37f3b8e4 100644 --- a/home/misterio/features/desktop/common/firefox.nix +++ b/home/misterio/features/desktop/common/firefox.nix @@ -1,16 +1,14 @@ -{ pkgs, ... }: - -{ +{pkgs, ...}: { programs.browserpass.enable = true; programs.firefox = { enable = true; profiles.misterio = { - bookmarks = { }; + bookmarks = {}; extensions = with pkgs.inputs.firefox-addons; [ ublock-origin browserpass ]; - bookmarks = { }; + bookmarks = {}; settings = { "browser.disableResetPrompt" = true; "browser.download.panel.shown" = true; @@ -36,9 +34,9 @@ }; xdg.mimeApps.defaultApplications = { - "text/html" = [ "firefox.desktop" ]; - "text/xml" = [ "firefox.desktop" ]; - "x-scheme-handler/http" = [ "firefox.desktop" ]; - "x-scheme-handler/https" = [ "firefox.desktop" ]; + "text/html" = ["firefox.desktop"]; + "text/xml" = ["firefox.desktop"]; + "x-scheme-handler/http" = ["firefox.desktop"]; + "x-scheme-handler/https" = ["firefox.desktop"]; }; } diff --git a/home/misterio/features/desktop/common/font.nix b/home/misterio/features/desktop/common/font.nix index d5be1e78..6693c330 100644 --- a/home/misterio/features/desktop/common/font.nix +++ b/home/misterio/features/desktop/common/font.nix @@ -1,10 +1,9 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { fontProfiles = { enable = true; monospace = { family = "FiraCode Nerd Font"; - package = pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; }; + package = pkgs.nerdfonts.override {fonts = ["FiraCode"];}; }; regular = { family = "Fira Sans"; diff --git a/home/misterio/features/desktop/common/gtk.nix b/home/misterio/features/desktop/common/gtk.nix index 900afea0..91f06e49 100644 --- a/home/misterio/features/desktop/common/gtk.nix +++ b/home/misterio/features/desktop/common/gtk.nix @@ -3,12 +3,9 @@ pkgs, inputs, ... -}: - -let - inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) gtkThemeFromScheme; -in -rec { +}: let + inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) gtkThemeFromScheme; +in rec { gtk = { enable = true; font = { @@ -17,7 +14,7 @@ rec { }; theme = { name = "${config.colorscheme.slug}"; - package = gtkThemeFromScheme { scheme = config.colorscheme; }; + package = gtkThemeFromScheme {scheme = config.colorscheme;}; }; iconTheme = { name = "Papirus"; @@ -33,5 +30,5 @@ rec { }; }; - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-gtk ]; + xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-gtk]; } diff --git a/home/misterio/features/desktop/common/kdeconnect.nix b/home/misterio/features/desktop/common/kdeconnect.nix index 7626eca9..88759757 100644 --- a/home/misterio/features/desktop/common/kdeconnect.nix +++ b/home/misterio/features/desktop/common/kdeconnect.nix @@ -1,15 +1,15 @@ -{ pkgs, lib, ... }: - -let - +{ + pkgs, + lib, + ... +}: let kdeconnect-cli = "${pkgs.plasma5Packages.kdeconnect-kde}/bin/kdeconnect-cli"; fortune = "${pkgs.fortune}/bin/fortune"; script-fortune = pkgs.writeShellScriptBin "fortune" '' ${kdeconnect-cli} -d $(${kdeconnect-cli} --list-available --id-only) --ping-msg "$(${fortune})" ''; -in -{ +in { # Hide all .desktop, except for org.kde.kdeconnect.settings xdg.desktopEntries = { "org.kde.kdeconnect.sms" = { @@ -39,6 +39,6 @@ in }; home.persistence = { - "/persist/home/misterio".directories = [ ".config/kdeconnect" ]; + "/persist/home/misterio".directories = [".config/kdeconnect"]; }; } diff --git a/home/misterio/features/desktop/common/pavucontrol.nix b/home/misterio/features/desktop/common/pavucontrol.nix index 9d93bce6..5a0a33da 100644 --- a/home/misterio/features/desktop/common/pavucontrol.nix +++ b/home/misterio/features/desktop/common/pavucontrol.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ pavucontrol ]; +{pkgs, ...}: { + home.packages = with pkgs; [pavucontrol]; } diff --git a/home/misterio/features/desktop/common/playerctl.nix b/home/misterio/features/desktop/common/playerctl.nix index 81265260..97cd5e17 100644 --- a/home/misterio/features/desktop/common/playerctl.nix +++ b/home/misterio/features/desktop/common/playerctl.nix @@ -1,6 +1,5 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ playerctl ]; +{pkgs, ...}: { + home.packages = with pkgs; [playerctl]; services.playerctld = { enable = true; }; diff --git a/home/misterio/features/desktop/common/qt.nix b/home/misterio/features/desktop/common/qt.nix index 811e0881..da1db092 100644 --- a/home/misterio/features/desktop/common/qt.nix +++ b/home/misterio/features/desktop/common/qt.nix @@ -1,5 +1,8 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { qt = { enable = true; platformTheme = "gtk"; diff --git a/home/misterio/features/desktop/common/slack.nix b/home/misterio/features/desktop/common/slack.nix index 264ee90b..62a32ddc 100644 --- a/home/misterio/features/desktop/common/slack.nix +++ b/home/misterio/features/desktop/common/slack.nix @@ -1,7 +1,6 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { xdg.mimeApps.defaultApplications = { "x-scheme-handler/slack" = "slack.desktop"; }; - home.packages = [ pkgs.slack ]; + home.packages = [pkgs.slack]; } diff --git a/home/misterio/features/desktop/common/sublime-music.nix b/home/misterio/features/desktop/common/sublime-music.nix index 69976a29..34d23c73 100644 --- a/home/misterio/features/desktop/common/sublime-music.nix +++ b/home/misterio/features/desktop/common/sublime-music.nix @@ -1,7 +1,10 @@ -{ pkgs, lib, ... }: { - home.packages = [ pkgs.sublime-music ]; + pkgs, + lib, + ... +}: { + home.packages = [pkgs.sublime-music]; home.persistence = { - "/persist/home/misterio".directories = [ ".config/sublime-music" ]; + "/persist/home/misterio".directories = [".config/sublime-music"]; }; } diff --git a/home/misterio/features/desktop/common/wayland-wm/default.nix b/home/misterio/features/desktop/common/wayland-wm/default.nix index 5d94f98f..648ba30e 100644 --- a/home/misterio/features/desktop/common/wayland-wm/default.nix +++ b/home/misterio/features/desktop/common/wayland-wm/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { imports = [ ./hyprland-vnc.nix ./gammastep.nix @@ -37,5 +36,5 @@ LIBSEAT_BACKEND = "logind"; }; - xdg.portal.extraPortals = [ pkgs.xdg-desktop-portal-wlr ]; + xdg.portal.extraPortals = [pkgs.xdg-desktop-portal-wlr]; } diff --git a/home/misterio/features/desktop/common/wayland-wm/hyprland-vnc.nix b/home/misterio/features/desktop/common/wayland-wm/hyprland-vnc.nix index ff62270c..45267f79 100644 --- a/home/misterio/features/desktop/common/wayland-wm/hyprland-vnc.nix +++ b/home/misterio/features/desktop/common/wayland-wm/hyprland-vnc.nix @@ -3,8 +3,7 @@ lib, config, ... -}: -let +}: let enabledMonitors = lib.filter (m: m.enabled) config.monitors; # A nice VNC script for remotes running hyprland vncsh = pkgs.writeShellScriptBin "vnc.sh" '' @@ -16,16 +15,16 @@ let xpos="$(hyprctl monitors -j | jq -r 'sort_by(.x)[-1] | .x + .width')" ${ - lib.concatLines ( - lib.forEach enabledMonitors (m: '' - hyprctl output create headless - monitor="$(hyprctl monitors -j | jq -r 'map(.name)[-1]')" - hyprctl keyword monitor $monitor,${toString m.width}x${toString m.height}@${toString m.refreshRate},$(($xpos + ${toString m.x}))x${toString m.y},1 - screen -d -m wayvnc -k br -S /tmp/vnc-${m.workspace} -f 60 -o $monitor $ip 590${m.workspace} - sudo iptables -I INPUT -j ACCEPT -p tcp --dport 590${m.workspace} - '') - ) - } + lib.concatLines ( + lib.forEach enabledMonitors (m: '' + hyprctl output create headless + monitor="$(hyprctl monitors -j | jq -r 'map(.name)[-1]')" + hyprctl keyword monitor $monitor,${toString m.width}x${toString m.height}@${toString m.refreshRate},$(($xpos + ${toString m.x}))x${toString m.y},1 + screen -d -m wayvnc -k br -S /tmp/vnc-${m.workspace} -f 60 -o $monitor $ip 590${m.workspace} + sudo iptables -I INPUT -j ACCEPT -p tcp --dport 590${m.workspace} + '') + ) + } EOF ${lib.concatLines ( @@ -36,8 +35,7 @@ let wait ''; -in -{ +in { home.packages = with pkgs; [ vncsh wayvnc diff --git a/home/misterio/features/desktop/common/wayland-wm/kitty.nix b/home/misterio/features/desktop/common/wayland-wm/kitty.nix index ac5d1086..946b0c23 100644 --- a/home/misterio/features/desktop/common/wayland-wm/kitty.nix +++ b/home/misterio/features/desktop/common/wayland-wm/kitty.nix @@ -1,14 +1,15 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let inherit (config.colorscheme) colors; kitty-xterm = pkgs.writeShellScriptBin "xterm" '' ${config.programs.kitty.package}/bin/kitty "$@" ''; -in -{ +in { home = { - packages = [ kitty-xterm ]; + packages = [kitty-xterm]; sessionVariables = { TERMINAL = "kitty -1"; }; diff --git a/home/misterio/features/desktop/common/wayland-wm/mako.nix b/home/misterio/features/desktop/common/wayland-wm/mako.nix index b3568dfa..fecc3057 100644 --- a/home/misterio/features/desktop/common/wayland-wm/mako.nix +++ b/home/misterio/features/desktop/common/wayland-wm/mako.nix @@ -1,15 +1,12 @@ -{ config, ... }: -let +{config, ...}: let inherit (config.colorscheme) colors kind; -in -{ +in { services.mako = { enable = true; iconPath = - if kind == "dark" then - "${config.gtk.iconTheme.package}/share/icons/Papirus-Dark" - else - "${config.gtk.iconTheme.package}/share/icons/Papirus-Light"; + if kind == "dark" + then "${config.gtk.iconTheme.package}/share/icons/Papirus-Dark" + else "${config.gtk.iconTheme.package}/share/icons/Papirus-Light"; font = "${config.fontProfiles.regular.family} 12"; padding = "10,20"; anchor = "top-center"; diff --git a/home/misterio/features/desktop/common/wayland-wm/qutebrowser.nix b/home/misterio/features/desktop/common/wayland-wm/qutebrowser.nix index b1626471..4f211d2e 100644 --- a/home/misterio/features/desktop/common/wayland-wm/qutebrowser.nix +++ b/home/misterio/features/desktop/common/wayland-wm/qutebrowser.nix @@ -1,9 +1,10 @@ -{ config, pkgs, ... }: - -let - inherit (config.colorscheme) colors kind; -in { + config, + pkgs, + ... +}: let + inherit (config.colorscheme) colors kind; +in { home.persistence = { "/persist/home/misterio".directories = [ ".config/qutebrowser/bookmarks" @@ -13,11 +14,11 @@ in }; xdg.mimeApps.defaultApplications = { - "text/html" = [ "org.qutebrowser.qutebrowser.desktop" ]; - "text/xml" = [ "org.qutebrowser.qutebrowser.desktop" ]; - "x-scheme-handler/http" = [ "org.qutebrowser.qutebrowser.desktop" ]; - "x-scheme-handler/https" = [ "org.qutebrowser.qutebrowser.desktop" ]; - "x-scheme-handler/qute" = [ "org.qutebrowser.qutebrowser.desktop" ]; + "text/html" = ["org.qutebrowser.qutebrowser.desktop"]; + "text/xml" = ["org.qutebrowser.qutebrowser.desktop"]; + "x-scheme-handler/http" = ["org.qutebrowser.qutebrowser.desktop"]; + "x-scheme-handler/https" = ["org.qutebrowser.qutebrowser.desktop"]; + "x-scheme-handler/qute" = ["org.qutebrowser.qutebrowser.desktop"]; }; programs.qutebrowser = { diff --git a/home/misterio/features/desktop/common/wayland-wm/swayidle.nix b/home/misterio/features/desktop/common/wayland-wm/swayidle.nix index 27b0b6ab..829320e1 100644 --- a/home/misterio/features/desktop/common/wayland-wm/swayidle.nix +++ b/home/misterio/features/desktop/common/wayland-wm/swayidle.nix @@ -3,9 +3,7 @@ lib, config, ... -}: - -let +}: let swaylock = "${config.programs.swaylock.package}/bin/swaylock"; pgrep = "${pkgs.procps}/bin/pgrep"; pactl = "${pkgs.pulseaudio}/bin/pactl"; @@ -16,24 +14,21 @@ let lockTime = 4 * 60; # TODO: configurable desktop (10 min)/laptop (4 min) # Makes two timeouts: one for when the screen is not locked (lockTime+timeout) and one for when it is. - afterLockTimeout = + afterLockTimeout = { + timeout, + command, + resumeCommand ? null, + }: [ { - timeout, - command, - resumeCommand ? null, - }: - [ - { - timeout = lockTime + timeout; - inherit command resumeCommand; - } - { - command = "${isLocked} && ${command}"; - inherit resumeCommand timeout; - } - ]; -in -{ + timeout = lockTime + timeout; + inherit command resumeCommand; + } + { + command = "${isLocked} && ${command}"; + inherit resumeCommand timeout; + } + ]; +in { services.swayidle = { enable = true; systemdTarget = "graphical-session.target"; @@ -53,25 +48,25 @@ in resumeCommand = "${pactl} set-source-mute @DEFAULT_SOURCE@ no"; }) ++ - # Turn off RGB - (lib.optionals config.services.rgbdaemon.enable (afterLockTimeout { - timeout = 20; - command = "systemctl --user stop rgbdaemon"; - resumeCommand = "systemctl --user start rgbdaemon"; - })) + # Turn off RGB + (lib.optionals config.services.rgbdaemon.enable (afterLockTimeout { + timeout = 20; + command = "systemctl --user stop rgbdaemon"; + resumeCommand = "systemctl --user start rgbdaemon"; + })) ++ - # Turn off displays (hyprland) - (lib.optionals config.wayland.windowManager.hyprland.enable (afterLockTimeout { - timeout = 40; - command = "${hyprctl} dispatch dpms off"; - resumeCommand = "${hyprctl} dispatch dpms on"; - })) + # Turn off displays (hyprland) + (lib.optionals config.wayland.windowManager.hyprland.enable (afterLockTimeout { + timeout = 40; + command = "${hyprctl} dispatch dpms off"; + resumeCommand = "${hyprctl} dispatch dpms on"; + })) ++ - # Turn off displays (sway) - (lib.optionals config.wayland.windowManager.sway.enable (afterLockTimeout { - timeout = 40; - command = "${swaymsg} 'output * dpms off'"; - resumeCommand = "${swaymsg} 'output * dpms on'"; - })); + # Turn off displays (sway) + (lib.optionals config.wayland.windowManager.sway.enable (afterLockTimeout { + timeout = 40; + command = "${swaymsg} 'output * dpms off'"; + resumeCommand = "${swaymsg} 'output * dpms on'"; + })); }; } diff --git a/home/misterio/features/desktop/common/wayland-wm/swaylock.nix b/home/misterio/features/desktop/common/wayland-wm/swaylock.nix index e721840e..d339abda 100644 --- a/home/misterio/features/desktop/common/wayland-wm/swaylock.nix +++ b/home/misterio/features/desktop/common/wayland-wm/swaylock.nix @@ -1,9 +1,10 @@ -{ config, pkgs, ... }: - -let - inherit (config.colorscheme) colors; -in { + config, + pkgs, + ... +}: let + inherit (config.colorscheme) colors; +in { programs.swaylock = { enable = true; package = pkgs.swaylock-effects; diff --git a/home/misterio/features/desktop/common/wayland-wm/waybar.nix b/home/misterio/features/desktop/common/wayland-wm/waybar.nix index b4c6ee93..4d45936a 100644 --- a/home/misterio/features/desktop/common/wayland-wm/waybar.nix +++ b/home/misterio/features/desktop/common/wayland-wm/waybar.nix @@ -5,9 +5,7 @@ pkgs, inputs, ... -}: - -let +}: let # Dependencies cat = "${pkgs.coreutils}/bin/cat"; cut = "${pkgs.coreutils}/bin/cut"; @@ -29,34 +27,30 @@ let wofi = "${pkgs.wofi}/bin/wofi"; # Function to simplify making waybar outputs - jsonOutput = - name: - { - pre ? "", - text ? "", - tooltip ? "", - alt ? "", - class ? "", - percentage ? "", - }: - "${pkgs.writeShellScriptBin "waybar-${name}" '' - set -euo pipefail - ${pre} - ${jq} -cn \ - --arg text "${text}" \ - --arg tooltip "${tooltip}" \ - --arg alt "${alt}" \ - --arg class "${class}" \ - --arg percentage "${percentage}" \ - '{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}' - ''}/bin/waybar-${name}"; + jsonOutput = name: { + pre ? "", + text ? "", + tooltip ? "", + alt ? "", + class ? "", + percentage ? "", + }: "${pkgs.writeShellScriptBin "waybar-${name}" '' + set -euo pipefail + ${pre} + ${jq} -cn \ + --arg text "${text}" \ + --arg tooltip "${tooltip}" \ + --arg alt "${alt}" \ + --arg class "${class}" \ + --arg percentage "${percentage}" \ + '{text:$text,tooltip:$tooltip,alt:$alt,class:$class,percentage:$percentage}' + ''}/bin/waybar-${name}"; hasSway = config.wayland.windowManager.sway.enable; sway = config.wayland.windowManager.sway.package; hasHyprland = config.wayland.windowManager.hyprland.enable; hyprland = config.wayland.windowManager.hyprland.package; -in -{ +in { # Let it try to start a few more times systemd.user.services.waybar = { Unit.StartLimitBurst = 30; @@ -64,7 +58,7 @@ in programs.waybar = { enable = true; package = pkgs.waybar.overrideAttrs (oa: { - mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ]; + mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"]; }); systemd.enable = true; settings = { @@ -75,7 +69,7 @@ in margin = "6"; position = "top"; modules-left = - [ "custom/menu" ] + ["custom/menu"] ++ (lib.optionals hasSway [ "sway/workspaces" "sway/mode" @@ -190,13 +184,12 @@ in "custom/tailscale-ping" = { interval = 10; return-type = "json"; - exec = - let - inherit (builtins) concatStringsSep attrNames; - hosts = attrNames outputs.nixosConfigurations; - homeMachine = "merope"; - remoteMachine = "alcyone"; - in + exec = let + inherit (builtins) concatStringsSep attrNames; + hosts = attrNames outputs.nixosConfigurations; + homeMachine = "merope"; + remoteMachine = "alcyone"; + in jsonOutput "tailscale-ping" { # Build variables for each host pre = '' @@ -204,7 +197,8 @@ in ${concatStringsSep "\n" ( map (host: '' ping_${host}="$(${timeout} 2 ${ping} -c 1 -q ${host} 2>/dev/null | ${tail} -1 | ${cut} -d '/' -f5 | ${cut} -d '.' -f1)ms" || ping_${host}="Disconnected" - '') hosts + '') + hosts )} ''; # Access a remote machine's and a home machine's ping @@ -215,28 +209,25 @@ in format = "{}"; on-click = ""; }; - "custom/menu" = - let - isFullScreen = - if hasHyprland then - "${hyprland}/bin/hyprctl activewindow -j | ${jq} -e '.fullscreen' &>/dev/null" - else - "false"; - in - { - interval = 1; - return-type = "json"; - exec = jsonOutput "menu" { - text = ""; - tooltip = ''$(${cat} /etc/os-release | ${grep} PRETTY_NAME | ${cut} -d '"' -f2)''; - class = "$(if ${isFullScreen}; then echo fullscreen; fi)"; - }; - on-click-left = "${wofi} -S drun -x 10 -y 10 -W 25% -H 60%"; - on-click-right = lib.concatStringsSep ";" ( - (lib.optional hasHyprland "${hyprland}/bin/hyprctl dispatch togglespecialworkspace") - ++ (lib.optional hasSway "${sway}/bin/swaymsg scratchpad show") - ); + "custom/menu" = let + isFullScreen = + if hasHyprland + then "${hyprland}/bin/hyprctl activewindow -j | ${jq} -e '.fullscreen' &>/dev/null" + else "false"; + in { + interval = 1; + return-type = "json"; + exec = jsonOutput "menu" { + text = ""; + tooltip = ''$(${cat} /etc/os-release | ${grep} PRETTY_NAME | ${cut} -d '"' -f2)''; + class = "$(if ${isFullScreen}; then echo fullscreen; fi)"; }; + on-click-left = "${wofi} -S drun -x 10 -y 10 -W 25% -H 60%"; + on-click-right = lib.concatStringsSep ";" ( + (lib.optional hasHyprland "${hyprland}/bin/hyprctl dispatch togglespecialworkspace") + ++ (lib.optional hasSway "${sway}/bin/swaymsg scratchpad show") + ); + }; "custom/hostname" = { exec = "echo $USER@$HOSTNAME"; on-click = "${systemctl} --user restart waybar"; @@ -269,10 +260,9 @@ in "custom/gpg-agent" = { interval = 2; return-type = "json"; - exec = - let - gpgCmds = import ../../../cli/gpg-commands.nix { inherit pkgs; }; - in + exec = let + gpgCmds = import ../../../cli/gpg-commands.nix {inherit pkgs;}; + in jsonOutput "gpg-agent" { pre = ''status=$(${gpgCmds.isUnlocked} && echo "unlocked" || echo "locked")''; alt = "$status"; @@ -369,13 +359,14 @@ in # x y -> vertical, horizontal # x y z -> top, horizontal, bottom # w x y z -> top, right, bottom, left - style = - let - inherit (inputs.nix-colors.lib.conversions) hexToRGBString; - inherit (config.colorscheme) colors; - toRGBA = color: opacity: "rgba(${hexToRGBString "," color},${opacity})"; - in - # css + style = let + inherit (inputs.nix-colors.lib.conversions) hexToRGBString; + inherit (config.colorscheme) colors; + toRGBA = color: opacity: "rgba(${hexToRGBString "," color},${opacity})"; + in + /* + css + */ '' * { font-family: ${config.fontProfiles.regular.family}, ${config.fontProfiles.monospace.family}; diff --git a/home/misterio/features/desktop/common/wayland-wm/wezterm.nix b/home/misterio/features/desktop/common/wayland-wm/wezterm.nix index 4dab8017..33faeb9a 100644 --- a/home/misterio/features/desktop/common/wayland-wm/wezterm.nix +++ b/home/misterio/features/desktop/common/wayland-wm/wezterm.nix @@ -1,10 +1,11 @@ -{ config, pkgs, ... }: - -let +{ + config, + pkgs, + ... +}: let inherit (config) colorscheme; inherit (colorscheme) colors; -in -{ +in { programs.wezterm = { enable = true; colorSchemes = { @@ -38,7 +39,10 @@ in selection_bg = "#${colors.base05}"; }; }; - extraConfig = /* lua */ + extraConfig = + /* + lua + */ '' return { font = wezterm.font("${config.fontProfiles.monospace.family}"), diff --git a/home/misterio/features/desktop/common/wayland-wm/wofi.nix b/home/misterio/features/desktop/common/wayland-wm/wofi.nix index 9f5206ad..956d9056 100644 --- a/home/misterio/features/desktop/common/wayland-wm/wofi.nix +++ b/home/misterio/features/desktop/common/wayland-wm/wofi.nix @@ -3,14 +3,15 @@ lib, pkgs, ... -}: -{ +}: { programs.wofi = { enable = true; package = pkgs.wofi.overrideAttrs (oa: { - patches = (oa.patches or [ ]) ++ [ - ./wofi-run-shell.patch # Fix for https://todo.sr.ht/~scoopta/wofi/174 - ]; + patches = + (oa.patches or []) + ++ [ + ./wofi-run-shell.patch # Fix for https://todo.sr.ht/~scoopta/wofi/174 + ]; }); settings = { image_size = 48; @@ -23,9 +24,8 @@ }; }; - home.packages = - let - inherit (config.programs.password-store) package enable; - in - lib.optional enable (pkgs.pass-wofi.override { pass = package; }); + home.packages = let + inherit (config.programs.password-store) package enable; + in + lib.optional enable (pkgs.pass-wofi.override {pass = package;}); } diff --git a/home/misterio/features/desktop/common/wayland-wm/zathura.nix b/home/misterio/features/desktop/common/wayland-wm/zathura.nix index da13e325..37840b49 100644 --- a/home/misterio/features/desktop/common/wayland-wm/zathura.nix +++ b/home/misterio/features/desktop/common/wayland-wm/zathura.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let inherit (config.colorscheme) colors; -in -{ +in { programs.zathura = { enable = true; options = { diff --git a/home/misterio/features/desktop/gnome/default.nix b/home/misterio/features/desktop/gnome/default.nix index 257d4f66..65b3071a 100644 --- a/home/misterio/features/desktop/gnome/default.nix +++ b/home/misterio/features/desktop/gnome/default.nix @@ -1 +1 @@ -{ imports = [ ../common ]; } +{imports = [../common];} diff --git a/home/misterio/features/desktop/hyprland/basic-binds.nix b/home/misterio/features/desktop/hyprland/basic-binds.nix index 1dea7ac0..6ab154af 100644 --- a/home/misterio/features/desktop/hyprland/basic-binds.nix +++ b/home/misterio/features/desktop/hyprland/basic-binds.nix @@ -1,49 +1,47 @@ -{ lib, ... }: -{ +{lib, ...}: { wayland.windowManager.hyprland.settings = { bindm = [ "SUPER,mouse:272,movewindow" "SUPER,mouse:273,resizewindow" ]; - bind = - let - workspaces = [ - "0" - "1" - "2" - "3" - "4" - "5" - "6" - "7" - "8" - "9" - "F1" - "F2" - "F3" - "F4" - "F5" - "F6" - "F7" - "F8" - "F9" - "F10" - "F11" - "F12" - ]; - # Map keys (arrows and hjkl) to hyprland directions (l, r, u, d) - directions = rec { - left = "l"; - right = "r"; - up = "u"; - down = "d"; - h = left; - l = right; - k = up; - j = down; - }; - in + bind = let + workspaces = [ + "0" + "1" + "2" + "3" + "4" + "5" + "6" + "7" + "8" + "9" + "F1" + "F2" + "F3" + "F4" + "F5" + "F6" + "F7" + "F8" + "F9" + "F10" + "F11" + "F12" + ]; + # Map keys (arrows and hjkl) to hyprland directions (l, r, u, d) + directions = rec { + left = "l"; + right = "r"; + up = "u"; + down = "d"; + h = left; + l = right; + k = up; + j = down; + }; + in [ "SUPERSHIFT,q,killactive" "SUPERSHIFT,e,exit" @@ -71,29 +69,31 @@ "SUPER,i,pseudo" ] ++ - # Change workspace - (map (n: "SUPER,${n},workspace,name:${n}") workspaces) + # Change workspace + (map (n: "SUPER,${n},workspace,name:${n}") workspaces) ++ - # Move window to workspace - (map (n: "SUPERSHIFT,${n},movetoworkspacesilent,name:${n}") workspaces) + # Move window to workspace + (map (n: "SUPERSHIFT,${n},movetoworkspacesilent,name:${n}") workspaces) ++ - # Move focus - (lib.mapAttrsToList (key: direction: "SUPER,${key},movefocus,${direction}") directions) + # Move focus + (lib.mapAttrsToList (key: direction: "SUPER,${key},movefocus,${direction}") directions) ++ - # Swap windows - (lib.mapAttrsToList (key: direction: "SUPERSHIFT,${key},swapwindow,${direction}") directions) + # Swap windows + (lib.mapAttrsToList (key: direction: "SUPERSHIFT,${key},swapwindow,${direction}") directions) ++ - # Move windows - (lib.mapAttrsToList ( + # Move windows + (lib.mapAttrsToList ( key: direction: "SUPERCONTROL,${key},movewindoworgroup,${direction}" - ) directions) + ) + directions) ++ - # Move monitor focus - (lib.mapAttrsToList (key: direction: "SUPERALT,${key},focusmonitor,${direction}") directions) + # Move monitor focus + (lib.mapAttrsToList (key: direction: "SUPERALT,${key},focusmonitor,${direction}") directions) ++ - # Move workspace to other monitor - (lib.mapAttrsToList ( + # Move workspace to other monitor + (lib.mapAttrsToList ( key: direction: "SUPERALTSHIFT,${key},movecurrentworkspacetomonitor,${direction}" - ) directions); + ) + directions); }; } diff --git a/home/misterio/features/desktop/hyprland/default.nix b/home/misterio/features/desktop/hyprland/default.nix index fc74d6af..9db0abd5 100644 --- a/home/misterio/features/desktop/hyprland/default.nix +++ b/home/misterio/features/desktop/hyprland/default.nix @@ -3,12 +3,10 @@ config, pkgs, ... -}: -let - hyprland = pkgs.inputs.hyprland.hyprland.override { wrapRuntimeDeps = false; }; - xdph = pkgs.inputs.hyprland.xdg-desktop-portal-hyprland.override { inherit hyprland; }; -in -{ +}: let + hyprland = pkgs.inputs.hyprland.hyprland.override {wrapRuntimeDeps = false;}; + xdph = pkgs.inputs.hyprland.xdg-desktop-portal-hyprland.override {inherit hyprland;}; +in { imports = [ ../common ../common/wayland-wm @@ -18,8 +16,8 @@ in ]; xdg.portal = { - extraPortals = [ xdph ]; - configPackages = [ hyprland ]; + extraPortals = [xdph]; + configPackages = [hyprland]; }; home.packages = with pkgs; [ @@ -40,228 +38,220 @@ in ]; }; - settings = - let - active = "0xaa${config.colorscheme.colors.base0C}"; - inactive = "0xaa${config.colorscheme.colors.base02}"; - in - { - general = { - cursor_inactive_timeout = 4; - gaps_in = 15; - gaps_out = 20; - border_size = 2; - "col.active_border" = active; - "col.inactive_border" = inactive; + settings = let + active = "0xaa${config.colorscheme.colors.base0C}"; + inactive = "0xaa${config.colorscheme.colors.base02}"; + in { + general = { + cursor_inactive_timeout = 4; + gaps_in = 15; + gaps_out = 20; + border_size = 2; + "col.active_border" = active; + "col.inactive_border" = inactive; + }; + group = { + "col.border_active" = active; + "col.border_inactive" = inactive; + groupbar.font_size = 11; + }; + binds = { + movefocus_cycles_fullscreen = false; + }; + input = { + kb_layout = "br,us"; + touchpad.disable_while_typing = false; + }; + dwindle = { + split_width_multiplier = 1.35; + pseudotile = true; + }; + misc = { + vfr = true; + close_special_on_empty = true; + focus_on_activate = true; + # Unfullscreen when opening something + new_window_takes_over_fullscreen = 2; + }; + windowrulev2 = let + sweethome3d-tooltips = "title:^(win[0-9])$,class:^(com-eteks-sweethome3d-SweetHome3DBootstrap)$"; + steam = "title:^()$,class:^(steam)$"; + in [ + "nofocus, ${sweethome3d-tooltips}" + "stayfocused, ${steam}" + "minsize 1 1, ${steam}" + ]; + layerrule = [ + "blur,waybar" + "ignorezero,waybar" + "blur,notifications" + "ignorezero,notifications" + "blur,wofi" + "ignorezero,wofi" + ]; + + decoration = { + active_opacity = 0.97; + inactive_opacity = 0.77; + fullscreen_opacity = 1.0; + rounding = 7; + blur = { + enabled = true; + size = 5; + passes = 3; + new_optimizations = true; + ignore_opacity = true; + popups = true; }; - group = { - "col.border_active" = active; - "col.border_inactive" = inactive; - groupbar.font_size = 11; - }; - binds = { - movefocus_cycles_fullscreen = false; - }; - input = { - kb_layout = "br,us"; - touchpad.disable_while_typing = false; - }; - dwindle = { - split_width_multiplier = 1.35; - pseudotile = true; - }; - misc = { - vfr = true; - close_special_on_empty = true; - focus_on_activate = true; - # Unfullscreen when opening something - new_window_takes_over_fullscreen = 2; - }; - windowrulev2 = - let - sweethome3d-tooltips = "title:^(win[0-9])$,class:^(com-eteks-sweethome3d-SweetHome3DBootstrap)$"; - steam = "title:^()$,class:^(steam)$"; - in - [ - "nofocus, ${sweethome3d-tooltips}" - "stayfocused, ${steam}" - "minsize 1 1, ${steam}" - ]; - layerrule = [ - "blur,waybar" - "ignorezero,waybar" - "blur,notifications" - "ignorezero,notifications" - "blur,wofi" - "ignorezero,wofi" + drop_shadow = true; + shadow_range = 12; + shadow_offset = "3 3"; + "col.shadow" = "0x44000000"; + "col.shadow_inactive" = "0x66000000"; + }; + animations = { + enabled = true; + bezier = [ + "easein,0.11, 0, 0.5, 0" + "easeout,0.5, 1, 0.89, 1" + "easeinout,0.45, 0, 0.55, 1" + "easeinback,0.36, 0, 0.66, -0.56" + "easeoutback,0.34, 1.56, 0.64, 1" + "easeinoutback,0.68, -0.6, 0.32, 1.6" ]; - decoration = { - active_opacity = 0.97; - inactive_opacity = 0.77; - fullscreen_opacity = 1.0; - rounding = 7; - blur = { - enabled = true; - size = 5; - passes = 3; - new_optimizations = true; - ignore_opacity = true; - popups = true; - }; - drop_shadow = true; - shadow_range = 12; - shadow_offset = "3 3"; - "col.shadow" = "0x44000000"; - "col.shadow_inactive" = "0x66000000"; - }; - animations = { - enabled = true; - bezier = [ - "easein,0.11, 0, 0.5, 0" - "easeout,0.5, 1, 0.89, 1" - "easeinout,0.45, 0, 0.55, 1" - "easeinback,0.36, 0, 0.66, -0.56" - "easeoutback,0.34, 1.56, 0.64, 1" - "easeinoutback,0.68, -0.6, 0.32, 1.6" - ]; + animation = [ + "border,1,3,easeout" + "workspaces,1,2,easeoutback,slide" + "windowsIn,1,3,easeoutback,slide" + "windowsOut,1,3,easeinback,slide" + "windowsMove,1,3,easeoutback" + "fadeIn,1,3,easeout" + "fadeOut,1,3,easein" + "fadeSwitch,1,3,easeinout" + "fadeShadow,1,3,easeinout" + "fadeDim,1,3,easeinout" + "fadeLayersIn,1,3,easeoutback" + "fadeLayersOut,1,3,easeinback" + "layersIn,1,3,easeoutback,slide" + "layersOut,1,3,easeinback,slide" + ]; + }; - animation = [ - "border,1,3,easeout" - "workspaces,1,2,easeoutback,slide" - "windowsIn,1,3,easeoutback,slide" - "windowsOut,1,3,easeinback,slide" - "windowsMove,1,3,easeoutback" - "fadeIn,1,3,easeout" - "fadeOut,1,3,easein" - "fadeSwitch,1,3,easeinout" - "fadeShadow,1,3,easeinout" - "fadeDim,1,3,easeinout" - "fadeLayersIn,1,3,easeoutback" - "fadeLayersOut,1,3,easeinback" - "layersIn,1,3,easeoutback,slide" - "layersOut,1,3,easeinback,slide" - ]; - }; + exec = ["${pkgs.swaybg}/bin/swaybg -i ${config.wallpaper} --mode fill"]; - exec = [ "${pkgs.swaybg}/bin/swaybg -i ${config.wallpaper} --mode fill" ]; + bind = let + grimblast = lib.getExe pkgs.inputs.hyprwm-contrib.grimblast; + tesseract = lib.getExe pkgs.tesseract; + pactl = lib.getExe' pkgs.pulseaudio "pactl"; + tly = lib.getExe pkgs.tly; + gtk-play = lib.getExe' pkgs.libcanberra-gtk3 "canberra-gtk-play"; + notify-send = lib.getExe' pkgs.libnotify "notify-send"; - bind = + terminal = config.home.sessionVariables.TERMINAL; + defaultApp = type: "${lib.getExe' pkgs.gtk3 "gtk-launch"} $(${lib.getExe' pkgs.xdg-utils "xdg-mime"} query default ${type})"; + browser = defaultApp "x-scheme-handler/https"; + editor = defaultApp "text/plain"; + in + [ + # Program bindings + "SUPER,Return,exec,${terminal}" + "SUPER,e,exec,${editor}" + "SUPER,v,exec,${editor}" + "SUPER,b,exec,${browser}" + # Brightness control (only works if the system has lightd) + ",XF86MonBrightnessUp,exec,light -A 10" + ",XF86MonBrightnessDown,exec,light -U 10" + # Volume + ",XF86AudioRaiseVolume,exec,${pactl} set-sink-volume @DEFAULT_SINK@ +5%" + ",XF86AudioLowerVolume,exec,${pactl} set-sink-volume @DEFAULT_SINK@ -5%" + ",XF86AudioMute,exec,${pactl} set-sink-mute @DEFAULT_SINK@ toggle" + "SHIFT,XF86AudioMute,exec,${pactl} set-source-mute @DEFAULT_SOURCE@ toggle" + ",XF86AudioMicMute,exec,${pactl} set-source-mute @DEFAULT_SOURCE@ toggle" + # Screenshotting + ",Print,exec,${grimblast} --notify --freeze copy output" + "SUPER,Print,exec,${grimblast} --notify --freeze copy area" + # To OCR + "ALT,Print,exec,${grimblast} --freeze save area - | ${tesseract} - - | wl-copy && ${notify-send} -t 3000 'OCR result copied to buffer'" + # Tally counter + "SUPER,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} add && ${gtk-play} -i dialog-information" # Add new entry + "SUPERCONTROL,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} undo && ${gtk-play} -i dialog-warning" # Undo last entry + "SUPERCONTROLSHIFT,z,exec,${tly} reset && ${gtk-play} -i complete" # Reset + "SUPERSHIFT,z,exec,${notify-send} -t 1000 $(${tly} time)" # Show current time + ] + ++ ( let - grimblast = lib.getExe pkgs.inputs.hyprwm-contrib.grimblast; - tesseract = lib.getExe pkgs.tesseract; - pactl = lib.getExe' pkgs.pulseaudio "pactl"; - tly = lib.getExe pkgs.tly; - gtk-play = lib.getExe' pkgs.libcanberra-gtk3 "canberra-gtk-play"; - notify-send = lib.getExe' pkgs.libnotify "notify-send"; - - terminal = config.home.sessionVariables.TERMINAL; - defaultApp = - type: - "${lib.getExe' pkgs.gtk3 "gtk-launch"} $(${lib.getExe' pkgs.xdg-utils "xdg-mime"} query default ${type})"; - browser = defaultApp "x-scheme-handler/https"; - editor = defaultApp "text/plain"; + playerctl = lib.getExe' config.services.playerctld.package "playerctl"; + playerctld = lib.getExe' config.services.playerctld.package "playerctld"; in - [ - # Program bindings - "SUPER,Return,exec,${terminal}" - "SUPER,e,exec,${editor}" - "SUPER,v,exec,${editor}" - "SUPER,b,exec,${browser}" - # Brightness control (only works if the system has lightd) - ",XF86MonBrightnessUp,exec,light -A 10" - ",XF86MonBrightnessDown,exec,light -U 10" - # Volume - ",XF86AudioRaiseVolume,exec,${pactl} set-sink-volume @DEFAULT_SINK@ +5%" - ",XF86AudioLowerVolume,exec,${pactl} set-sink-volume @DEFAULT_SINK@ -5%" - ",XF86AudioMute,exec,${pactl} set-sink-mute @DEFAULT_SINK@ toggle" - "SHIFT,XF86AudioMute,exec,${pactl} set-source-mute @DEFAULT_SOURCE@ toggle" - ",XF86AudioMicMute,exec,${pactl} set-source-mute @DEFAULT_SOURCE@ toggle" - # Screenshotting - ",Print,exec,${grimblast} --notify --freeze copy output" - "SUPER,Print,exec,${grimblast} --notify --freeze copy area" - # To OCR - "ALT,Print,exec,${grimblast} --freeze save area - | ${tesseract} - - | wl-copy && ${notify-send} -t 3000 'OCR result copied to buffer'" - # Tally counter - "SUPER,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} add && ${gtk-play} -i dialog-information" # Add new entry - "SUPERCONTROL,z,exec,${notify-send} -t 1000 $(${tly} time) && ${tly} undo && ${gtk-play} -i dialog-warning" # Undo last entry - "SUPERCONTROLSHIFT,z,exec,${tly} reset && ${gtk-play} -i complete" # Reset - "SUPERSHIFT,z,exec,${notify-send} -t 1000 $(${tly} time)" # Show current time - ] - ++ - - ( + lib.optionals config.services.playerctld.enable [ + # Media control + ",XF86AudioNext,exec,${playerctl} next" + ",XF86AudioPrev,exec,${playerctl} previous" + ",XF86AudioPlay,exec,${playerctl} play-pause" + ",XF86AudioStop,exec,${playerctl} stop" + "ALT,XF86AudioNext,exec,${playerctld} shift" + "ALT,XF86AudioPrev,exec,${playerctld} unshift" + "ALT,XF86AudioPlay,exec,systemctl --user restart playerctld" + ] + ) + ++ + # Screen lock + ( + let + swaylock = lib.getExe config.programs.swaylock.package; + in + lib.optionals config.programs.swaylock.enable [ + ",XF86Launch5,exec,${swaylock} -S --grace 2" + ",XF86Launch4,exec,${swaylock} -S --grace 2" + "SUPER,backspace,exec,${swaylock} -S --grace 2" + ] + ) + ++ + # Notification manager + ( + let + makoctl = lib.getExe' config.services.mako.package "makoctl"; + in + lib.optionals config.services.mako.enable ["SUPER,w,exec,${makoctl} dismiss"] + ) + ++ + # Launcher + ( + let + wofi = lib.getExe config.programs.wofi.package; + in + lib.optionals config.programs.wofi.enable [ + "SUPER,x,exec,${wofi} -S drun -x 10 -y 10 -W 25% -H 60%" + "SUPER,d,exec,${wofi} -S run" + ] + ++ ( let - playerctl = lib.getExe' config.services.playerctld.package "playerctl"; - playerctld = lib.getExe' config.services.playerctld.package "playerctld"; + pass-wofi = lib.getExe (pkgs.pass-wofi.override {pass = config.programs.password-store.package;}); in - lib.optionals config.services.playerctld.enable [ - # Media control - ",XF86AudioNext,exec,${playerctl} next" - ",XF86AudioPrev,exec,${playerctl} previous" - ",XF86AudioPlay,exec,${playerctl} play-pause" - ",XF86AudioStop,exec,${playerctl} stop" - "ALT,XF86AudioNext,exec,${playerctld} shift" - "ALT,XF86AudioPrev,exec,${playerctld} unshift" - "ALT,XF86AudioPlay,exec,systemctl --user restart playerctld" - ] - ) - ++ - # Screen lock - ( - let - swaylock = lib.getExe config.programs.swaylock.package; - in - lib.optionals config.programs.swaylock.enable [ - ",XF86Launch5,exec,${swaylock} -S --grace 2" - ",XF86Launch4,exec,${swaylock} -S --grace 2" - "SUPER,backspace,exec,${swaylock} -S --grace 2" - ] - ) - ++ - # Notification manager - ( - let - makoctl = lib.getExe' config.services.mako.package "makoctl"; - in - lib.optionals config.services.mako.enable [ "SUPER,w,exec,${makoctl} dismiss" ] - ) - ++ - - # Launcher - ( - let - wofi = lib.getExe config.programs.wofi.package; - in - lib.optionals config.programs.wofi.enable [ - "SUPER,x,exec,${wofi} -S drun -x 10 -y 10 -W 25% -H 60%" - "SUPER,d,exec,${wofi} -S run" - ] - ++ ( - let - pass-wofi = lib.getExe (pkgs.pass-wofi.override { pass = config.programs.password-store.package; }); - in lib.optionals config.programs.password-store.enable [ ",Scroll_Lock,exec,${pass-wofi}" # fn+k ",XF86Calculator,exec,${pass-wofi}" # fn+f12 "SUPER,semicolon,exec,pass-wofi" ] - ) - ); - - monitor = map ( - m: - let - resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}"; - position = "${toString m.x}x${toString m.y}"; - in - "${m.name},${if m.enabled then "${resolution},${position},1" else "disable"}" - ) (config.monitors); - - workspace = map (m: "${m.name},${m.workspace}") ( - lib.filter (m: m.enabled && m.workspace != null) config.monitors + ) ); - }; + + monitor = map ( + m: let + resolution = "${toString m.width}x${toString m.height}@${toString m.refreshRate}"; + position = "${toString m.x}x${toString m.y}"; + in "${m.name},${ + if m.enabled + then "${resolution},${position},1" + else "disable" + }" + ) (config.monitors); + + workspace = map (m: "${m.name},${m.workspace}") ( + lib.filter (m: m.enabled && m.workspace != null) config.monitors + ); + }; # This is order sensitive, so it has to come here. extraConfig = '' # Passthrough mode (e.g. for VNC) diff --git a/home/misterio/features/desktop/hyprland/hyprbars.nix b/home/misterio/features/desktop/hyprland/hyprbars.nix index 03998a5e..2e138da9 100644 --- a/home/misterio/features/desktop/hyprland/hyprbars.nix +++ b/home/misterio/features/desktop/hyprland/hyprbars.nix @@ -3,25 +3,24 @@ pkgs, lib, ... -}: -let +}: let hyprbars = (pkgs.inputs.hyprland-plugins.hyprbars.override { # Make sure it's using the same hyprland package as we are hyprland = config.wayland.windowManager.hyprland.package; - }).overrideAttrs - (old: { - # Yeet the initialization notification (I hate it) - postPatch = - (old.postPatch or "") - + '' - ${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp - ''; - }); -in -{ + }) + .overrideAttrs + (old: { + # Yeet the initialization notification (I hate it) + postPatch = + (old.postPatch or "") + + '' + ${lib.getExe pkgs.gnused} -i '/Initialized successfully/d' main.cpp + ''; + }); +in { wayland.windowManager.hyprland = { - plugins = [ hyprbars ]; + plugins = [hyprbars]; settings = { "plugin:hyprbars" = { bar_height = 25; @@ -30,34 +29,30 @@ in bar_text_font = config.fontProfiles.regular.family; bar_text_size = 12; bar_part_of_window = true; - hyprbars-button = - let - closeAction = "hyprctl dispatch killactive"; + hyprbars-button = let + closeAction = "hyprctl dispatch killactive"; - isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null''; - moveToSpecial = "hyprctl dispatch movetoworkspacesilent special"; - moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')"; - minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}"; + isOnSpecial = ''hyprctl activewindow -j | jq -re 'select(.workspace.name == "special")' >/dev/null''; + moveToSpecial = "hyprctl dispatch movetoworkspacesilent special"; + moveToActive = "hyprctl dispatch movetoworkspacesilent name:$(hyprctl -j activeworkspace | jq -re '.name')"; + minimizeAction = "${isOnSpecial} && ${moveToActive} || ${moveToSpecial}"; - maximizeAction = "hyprctl dispatch togglefloating"; - in - [ - # Red close button - "rgb(${config.colorscheme.colors.base08}),12,,${closeAction}" - # Yellow "minimize" (send to special workspace) button - "rgb(${config.colorscheme.colors.base0A}),12,,${minimizeAction}" - # Green "maximize" (togglefloating) button - "rgb(${config.colorscheme.colors.base0B}),12,,${maximizeAction}" - ]; + maximizeAction = "hyprctl dispatch togglefloating"; + in [ + # Red close button + "rgb(${config.colorscheme.colors.base08}),12,,${closeAction}" + # Yellow "minimize" (send to special workspace) button + "rgb(${config.colorscheme.colors.base0A}),12,,${minimizeAction}" + # Green "maximize" (togglefloating) button + "rgb(${config.colorscheme.colors.base0B}),12,,${maximizeAction}" + ]; }; - bind = - let - barsEnabled = "hyprctl -j getoption plugin:hyprbars:bar_height | ${lib.getExe pkgs.jq} -re '.int != 0'"; - setBarHeight = height: "hyprctl keyword plugin:hyprbars:bar_height ${toString height}"; - toggleOn = setBarHeight config.wayland.windowManager.hyprland.settings."plugin:hyprbars".bar_height; - toggleOff = setBarHeight 0; - in - [ "SUPER,m,exec,${barsEnabled} && ${toggleOff} || ${toggleOn}" ]; + bind = let + barsEnabled = "hyprctl -j getoption plugin:hyprbars:bar_height | ${lib.getExe pkgs.jq} -re '.int != 0'"; + setBarHeight = height: "hyprctl keyword plugin:hyprbars:bar_height ${toString height}"; + toggleOn = setBarHeight config.wayland.windowManager.hyprland.settings."plugin:hyprbars".bar_height; + toggleOff = setBarHeight 0; + in ["SUPER,m,exec,${barsEnabled} && ${toggleOff} || ${toggleOn}"]; }; }; } diff --git a/home/misterio/features/desktop/wireless/default.nix b/home/misterio/features/desktop/wireless/default.nix index 2ba37053..0694c7bd 100644 --- a/home/misterio/features/desktop/wireless/default.nix +++ b/home/misterio/features/desktop/wireless/default.nix @@ -1 +1 @@ -{ imports = [ ./wpa-gui.nix ]; } +{imports = [./wpa-gui.nix];} diff --git a/home/misterio/features/desktop/wireless/wpa-gui.nix b/home/misterio/features/desktop/wireless/wpa-gui.nix index c9822aca..bf0bde4e 100644 --- a/home/misterio/features/desktop/wireless/wpa-gui.nix +++ b/home/misterio/features/desktop/wireless/wpa-gui.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = [ pkgs.wpa_supplicant_gui ]; +{pkgs, ...}: { + home.packages = [pkgs.wpa_supplicant_gui]; } diff --git a/home/misterio/features/emacs/default.nix b/home/misterio/features/emacs/default.nix index 149586fa..7cd00ab6 100644 --- a/home/misterio/features/emacs/default.nix +++ b/home/misterio/features/emacs/default.nix @@ -1,12 +1,15 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { programs.emacs = { enable = true; package = pkgs.emacs-gtk; - overrides = final: _prev: { nix-theme = final.callPackage ./theme.nix { inherit config; }; }; - extraPackages = - epkgs: with epkgs; [ + overrides = final: _prev: {nix-theme = final.callPackage ./theme.nix {inherit config;};}; + extraPackages = epkgs: + with epkgs; [ nix-theme nix-mode diff --git a/home/misterio/features/emacs/theme.nix b/home/misterio/features/emacs/theme.nix index 42ead1f7..058952c2 100644 --- a/home/misterio/features/emacs/theme.nix +++ b/home/misterio/features/emacs/theme.nix @@ -3,15 +3,15 @@ writeText, config, ... -}: -let +}: let emacsPackages = emacsPackagesFor config.programs.emacs.package; scheme = config.colorscheme; in -emacsPackages.trivialBuild { - pname = "theme"; - src = - writeText "nix-${scheme.slug}.el" # commonlisp + emacsPackages.trivialBuild { + pname = "theme"; + src = + writeText "nix-${scheme.slug}.el" # commonlisp + '' (require 'base16-theme) @@ -45,5 +45,5 @@ emacsPackages.trivialBuild { (provide 'base16-${scheme.slug}-theme) ''; - packageRequires = [ emacsPackages.base16-theme ]; -} + packageRequires = [emacsPackages.base16-theme]; + } diff --git a/home/misterio/features/games/default.nix b/home/misterio/features/games/default.nix index 3a9e4b96..bb54650e 100644 --- a/home/misterio/features/games/default.nix +++ b/home/misterio/features/games/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { imports = [ ./lutris.nix ./steam.nix @@ -7,7 +6,7 @@ ./runescape.nix ]; home = { - packages = with pkgs; [ gamescope ]; + packages = with pkgs; [gamescope]; persistence = { "/persist/home/misterio" = { allowOther = true; diff --git a/home/misterio/features/games/factorio.nix b/home/misterio/features/games/factorio.nix index 9ee8ae06..45bc772e 100644 --- a/home/misterio/features/games/factorio.nix +++ b/home/misterio/features/games/factorio.nix @@ -1,11 +1,14 @@ -{ lib, pkgs, ... }: { + lib, + pkgs, + ... +}: { home = { - packages = [ pkgs.factorio ]; + packages = [pkgs.factorio]; persistence = { "/persist/home/misterio" = { allowOther = true; - directories = [ ".factorio" ]; + directories = [".factorio"]; }; }; }; diff --git a/home/misterio/features/games/lutris.nix b/home/misterio/features/games/lutris.nix index f0618196..ebeb1b16 100644 --- a/home/misterio/features/games/lutris.nix +++ b/home/misterio/features/games/lutris.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { home.packages = [ (pkgs.lutris.override { extraPkgs = p: [ diff --git a/home/misterio/features/games/osu.nix b/home/misterio/features/games/osu.nix index c1355cd1..712f6f0c 100644 --- a/home/misterio/features/games/osu.nix +++ b/home/misterio/features/games/osu.nix @@ -1,8 +1,11 @@ -{ pkgs, lib, ... }: { - home.packages = [ pkgs.osu-lazer ]; + pkgs, + lib, + ... +}: { + home.packages = [pkgs.osu-lazer]; home.persistence = { - "/persist/home/misterio".directories = [ ".local/share/osu" ]; + "/persist/home/misterio".directories = [".local/share/osu"]; }; } diff --git a/home/misterio/features/games/prism-launcher.nix b/home/misterio/features/games/prism-launcher.nix index 43bb8f71..e474607f 100644 --- a/home/misterio/features/games/prism-launcher.nix +++ b/home/misterio/features/games/prism-launcher.nix @@ -1,8 +1,11 @@ -{ pkgs, lib, ... }: { - home.packages = [ pkgs.prismlauncher-qt5 ]; + pkgs, + lib, + ... +}: { + home.packages = [pkgs.prismlauncher-qt5]; home.persistence = { - "/persist/home/misterio".directories = [ ".local/share/PrismLauncher" ]; + "/persist/home/misterio".directories = [".local/share/PrismLauncher"]; }; } diff --git a/home/misterio/features/games/runescape.nix b/home/misterio/features/games/runescape.nix index c5bbd950..175c3399 100644 --- a/home/misterio/features/games/runescape.nix +++ b/home/misterio/features/games/runescape.nix @@ -1,33 +1,38 @@ -{ pkgs, lib, ... }: -let +{ + pkgs, + lib, + ... +}: let # Add PULSE_LATENCY_MSEC to .desktop file pulse_latency = 100; runescape = pkgs.runescape.overrideAttrs (oa: { - nativeBuildInputs = (oa.nativeBuildInputs or [ ]) ++ [ pkgs.makeWrapper ]; + nativeBuildInputs = (oa.nativeBuildInputs or []) ++ [pkgs.makeWrapper]; buildCommand = (oa.buildCommand or "") - # bash - + '' + + + /* + bash + */ + '' wrapProgram "$out/bin/RuneScape" \ --set PULSE_LATENCY_MSEC ${toString pulse_latency} \ --run 'echo $PULSE_LATENCY_MSEC' ''; }); openssl = lib.head (lib.filter (p: p.pname == "openssl") runescape.fhsenv.targetPaths); -in -{ +in { home.packages = [ runescape # TODO: Broken # pkgs.runelite ]; - nixpkgs.config.permittedInsecurePackages = [ openssl.name ]; + nixpkgs.config.permittedInsecurePackages = [openssl.name]; home.persistence = { "/persist/home/misterio" = { allowOther = true; - directories = [ "Jagex" ]; + directories = ["Jagex"]; }; }; } diff --git a/home/misterio/features/games/star-citizen.nix b/home/misterio/features/games/star-citizen.nix index 4528e040..fd5c5f6a 100644 --- a/home/misterio/features/games/star-citizen.nix +++ b/home/misterio/features/games/star-citizen.nix @@ -1,4 +1,3 @@ -{ pkgs, ... }: -{ - home.packages = [ pkgs.inputs.nix-gaming.star-citizen ]; +{pkgs, ...}: { + home.packages = [pkgs.inputs.nix-gaming.star-citizen]; } diff --git a/home/misterio/features/games/steam.nix b/home/misterio/features/games/steam.nix index d4cc3ecb..6415c543 100644 --- a/home/misterio/features/games/steam.nix +++ b/home/misterio/features/games/steam.nix @@ -3,11 +3,10 @@ lib, config, ... -}: -let +}: let steam-with-pkgs = pkgs.steam.override { - extraPkgs = - pkgs: with pkgs; [ + extraPkgs = pkgs: + with pkgs; [ xorg.libXcursor xorg.libXi xorg.libXinerama @@ -24,33 +23,32 @@ let }; monitor = lib.head (lib.filter (m: m.primary) config.monitors); - steam-session = - let - gamescope = lib.concatStringsSep " " [ - (lib.getExe pkgs.gamescope) - "--output-width ${toString monitor.width}" - "--output-height ${toString monitor.height}" - "--framerate-limit ${toString monitor.refreshRate}" - "--prefer-output ${monitor.name}" - "--adaptive-sync" - "--expose-wayland" - "--hdr-enabled" - "--steam" - ]; - steam = lib.concatStringsSep " " [ - "steam" - "steam://open/bigpicture" - ]; - in + steam-session = let + gamescope = lib.concatStringsSep " " [ + (lib.getExe pkgs.gamescope) + "--output-width ${toString monitor.width}" + "--output-height ${toString monitor.height}" + "--framerate-limit ${toString monitor.refreshRate}" + "--prefer-output ${monitor.name}" + "--adaptive-sync" + "--expose-wayland" + "--hdr-enabled" + "--steam" + ]; + steam = lib.concatStringsSep " " [ + "steam" + "steam://open/bigpicture" + ]; + in pkgs.writeTextDir "share/wayland-sessions/steam-sesson.desktop" # ini - '' - [Desktop Entry] - Name=Steam Session - Exec=${gamescope} -- ${steam} - Type=Application - ''; -in -{ + + '' + [Desktop Entry] + Name=Steam Session + Exec=${gamescope} -- ${steam} + Type=Application + ''; +in { home.packages = with pkgs; [ steam-with-pkgs steam-session diff --git a/home/misterio/features/games/yuzu.nix b/home/misterio/features/games/yuzu.nix index f5529eef..d506b822 100644 --- a/home/misterio/features/games/yuzu.nix +++ b/home/misterio/features/games/yuzu.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { # Temporarily disabled while I wait for nixpkgs to package a fork (e.g. suyu) # home.packages = [ pkgs.yuzu-mainline ]; diff --git a/home/misterio/features/helix/default.nix b/home/misterio/features/helix/default.nix index f08583b9..2325b62a 100644 --- a/home/misterio/features/helix/default.nix +++ b/home/misterio/features/helix/default.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let inherit (config) colorscheme; -in -{ +in { home.sessionVariables.COLORTERM = "truecolor"; programs.helix = { enable = true; @@ -19,6 +17,6 @@ in }; }; }; - themes = import ./theme.nix { inherit colorscheme; }; + themes = import ./theme.nix {inherit colorscheme;}; }; } diff --git a/home/misterio/features/helix/theme.nix b/home/misterio/features/helix/theme.nix index ea9d766c..f9d6a041 100644 --- a/home/misterio/features/helix/theme.nix +++ b/home/misterio/features/helix/theme.nix @@ -1,11 +1,10 @@ -{ colorscheme }: -{ +{colorscheme}: { "${colorscheme.slug}" = { palette = builtins.mapAttrs (name: value: "#${value}") colorscheme.colors; # Add leading '#' "attributes" = "base09"; "comment" = { fg = "base03"; - modifiers = [ "italic" ]; + modifiers = ["italic"]; }; "constant" = "base09"; "constant.character.escape" = "base0C"; @@ -13,7 +12,7 @@ "constructor" = "base0D"; "debug" = "base03"; "diagnostic" = { - modifiers = [ "underlined" ]; + modifiers = ["underlined"]; }; "diagnostic.error" = { underline = { @@ -46,23 +45,23 @@ "label" = "base0E"; "markup.bold" = { fg = "base0A"; - modifiers = [ "bold" ]; + modifiers = ["bold"]; }; "markup.heading" = "base0D"; "markup.italic" = { fg = "base0E"; - modifiers = [ "italic" ]; + modifiers = ["italic"]; }; "markup.link.text" = "base08"; "markup.link.url" = { fg = "base09"; - modifiers = [ "underlined" ]; + modifiers = ["underlined"]; }; "markup.list" = "base08"; "markup.quote" = "base0C"; "markup.raw" = "base0B"; "markup.strikethrough" = { - modifiers = [ "crossed_out" ]; + modifiers = ["crossed_out"]; }; "namespace" = "base0E"; "operator" = "base05"; @@ -79,23 +78,23 @@ "ui.bufferline.active" = { fg = "base00"; bg = "base03"; - modifiers = [ "bold" ]; + modifiers = ["bold"]; }; "ui.cursor" = { fg = "base04"; - modifiers = [ "reversed" ]; + modifiers = ["reversed"]; }; "ui.cursor.insert" = { fg = "base0A"; - modifiers = [ "underlined" ]; + modifiers = ["underlined"]; }; "ui.cursor.match" = { fg = "base0A"; - modifiers = [ "underlined" ]; + modifiers = ["underlined"]; }; "ui.cursor.select" = { fg = "base0A"; - modifiers = [ "underlined" ]; + modifiers = ["underlined"]; }; "ui.cursorline.primary" = { fg = "base05"; @@ -115,7 +114,7 @@ "ui.linenr.selected" = { fg = "base04"; bg = "base01"; - modifiers = [ "bold" ]; + modifiers = ["bold"]; }; "ui.menu" = { fg = "base05"; diff --git a/home/misterio/features/music/default.nix b/home/misterio/features/music/default.nix index 6c2d418b..4493b266 100644 --- a/home/misterio/features/music/default.nix +++ b/home/misterio/features/music/default.nix @@ -1,9 +1,8 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ alsa-utils ]; +{pkgs, ...}: { + home.packages = with pkgs; [alsa-utils]; services.fluidsynth = { enable = true; soundService = "pipewire-pulse"; - extraOptions = [ "-g 2" ]; + extraOptions = ["-g 2"]; }; } diff --git a/home/misterio/features/nvim/default.nix b/home/misterio/features/nvim/default.nix index c2f2c2e3..3ffcc7b1 100644 --- a/home/misterio/features/nvim/default.nix +++ b/home/misterio/features/nvim/default.nix @@ -1,8 +1,10 @@ -{ config, pkgs, ... }: -let - color = pkgs.writeText "color.vim" (import ./theme.nix config.colorscheme); -in { + config, + pkgs, + ... +}: let + color = pkgs.writeText "color.vim" (import ./theme.nix config.colorscheme); +in { imports = [ ./lsp.nix ./syntaxes.nix @@ -13,7 +15,10 @@ in programs.neovim = { enable = true; - extraConfig = /* vim */ + extraConfig = + /* + vim + */ '' "Use system clipboard set clipboard=unnamedplus @@ -112,7 +117,10 @@ in "Sudo save cmap w!! w !sudo tee > /dev/null % ''; - extraLuaConfig = /* lua */ + extraLuaConfig = + /* + lua + */ '' vim.keymap.set("n", "gD", vim.lsp.buf.declaration, { desc = "Go to declaration" }) vim.keymap.set("n", "gd", vim.lsp.buf.definition, { desc = "Go to definition" }) @@ -145,7 +153,10 @@ in { plugin = nvim-autopairs; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('nvim-autopairs').setup{} ''; @@ -153,7 +164,10 @@ in ]; }; - xdg.configFile."nvim/init.lua".onChange = /* bash */ + xdg.configFile."nvim/init.lua".onChange = + /* + bash + */ '' XDG_RUNTIME_DIR=''${XDG_RUNTIME_DIR:-/run/user/$(id -u)} for server in $XDG_RUNTIME_DIR/nvim.*; do diff --git a/home/misterio/features/nvim/lsp.nix b/home/misterio/features/nvim/lsp.nix index 9c30f2b1..45540391 100644 --- a/home/misterio/features/nvim/lsp.nix +++ b/home/misterio/features/nvim/lsp.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { programs.neovim.plugins = with pkgs.vimPlugins; [ # LSP and completions for injected langs otter-nvim @@ -8,7 +7,10 @@ { plugin = nvim-lspconfig; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' local lspconfig = require('lspconfig') function add_lsp(server, options) @@ -51,7 +53,10 @@ { plugin = ltex_extra-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' local ltex_extra = require('ltex_extra') add_lsp(lspconfig.ltex, { @@ -66,7 +71,10 @@ { plugin = rust-tools-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' local rust_tools = require('rust-tools') add_lsp(rust_tools, { @@ -89,7 +97,10 @@ { plugin = cmp-git; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require("cmp_git").setup({}) ''; @@ -99,7 +110,10 @@ { plugin = nvim-cmp; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' local cmp = require('cmp') diff --git a/home/misterio/features/nvim/syntaxes.nix b/home/misterio/features/nvim/syntaxes.nix index a7e845aa..f354e465 100644 --- a/home/misterio/features/nvim/syntaxes.nix +++ b/home/misterio/features/nvim/syntaxes.nix @@ -3,21 +3,21 @@ config, lib, ... -}: -{ +}: { programs.neovim = { extraConfig = lib.mkAfter # vim - '' - function! SetCustomKeywords() - syn match Todo /TODO/ - syn match Done /DONE/ - syn match Start /START/ - syn match End /END/ - endfunction + + '' + function! SetCustomKeywords() + syn match Todo /TODO/ + syn match Done /DONE/ + syn match Start /START/ + syn match End /END/ + endfunction - autocmd Syntax * call SetCustomKeywords() - ''; + autocmd Syntax * call SetCustomKeywords() + ''; plugins = with pkgs.vimPlugins; [ rust-vim dart-vim-plugin @@ -37,9 +37,16 @@ { plugin = vimtex; - config = /* vim */ + config = + /* + vim + */ '' - let g:vimtex_view_method = '${if config.programs.zathura.enable then "zathura" else "general"}' + let g:vimtex_view_method = '${ + if config.programs.zathura.enable + then "zathura" + else "general" + }' ''; } @@ -47,7 +54,10 @@ { plugin = nvim-treesitter.withAllGrammars; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('nvim-treesitter.configs').setup{ highlight = { diff --git a/home/misterio/features/nvim/theme.nix b/home/misterio/features/nvim/theme.nix index 1170fec9..15f623dc 100644 --- a/home/misterio/features/nvim/theme.nix +++ b/home/misterio/features/nvim/theme.nix @@ -1,332 +1,333 @@ -scheme: -let +scheme: let c = scheme.colors; in -# vim -'' - let g:colors_name="nix-${scheme.slug}" + /* + vim + */ + '' + let g:colors_name="nix-${scheme.slug}" - set termguicolors + set termguicolors - if exists("syntax_on") - syntax reset - endif + if exists("syntax_on") + syntax reset + endif - hi clear + hi clear - hi Normal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE - hi Bold guifg=NONE guibg=NONE gui=bold guisp=NONE - hi Debug guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi Directory guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi Error guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE - hi ErrorMsg guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE - hi Exception guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi FoldColumn guifg=#${c.base0C} guibg=#${c.base00} gui=NONE guisp=NONE - hi Folded guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE - hi IncSearch guifg=#${c.base01} guibg=#${c.base09} gui=NONE guisp=NONE - hi Italic guifg=NONE guibg=NONE gui=NONE guisp=NONE - hi Macro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi MatchParen guifg=NONE guibg=#${c.base03} gui=NONE guisp=NONE - hi ModeMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE - hi MoreMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE - hi Question guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi Search guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE - hi Substitute guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE - hi SpecialKey guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi TooLong guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi Underlined guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi Visual guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE - hi VisualNOS guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi WarningMsg guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi WildMenu guifg=#${c.base08} guibg=#${c.base0A} gui=NONE guisp=NONE - hi Title guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi Conceal guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE - hi Cursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE - hi NonText guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi LineNr guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE - hi SignColumn guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE - hi StatusLine guifg=#${c.base0B} guibg=#${c.base02} gui=NONE guisp=NONE - hi StatusLineNC guifg=#${c.base04} guibg=#${c.base01} gui=NONE guisp=NONE - hi VertSplit guifg=#${c.base01} guibg=#${c.base00} gui=NONE guisp=NONE - hi ColorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE - hi CursorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE - hi CursorLine guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE - hi CursorLineNr guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE - hi QuickFixLine guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE - hi PMenu guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE - hi PMenuSel guifg=#${c.base01} guibg=#${c.base05} gui=NONE guisp=NONE - hi TabLine guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE - hi TabLineFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE - hi TabLineSel guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE - hi EndOfBuffer guifg=#${c.base00} guibg=NONE gui=NONE guisp=NONE + hi Normal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE + hi Bold guifg=NONE guibg=NONE gui=bold guisp=NONE + hi Debug guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi Directory guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi Error guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE + hi ErrorMsg guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE + hi Exception guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi FoldColumn guifg=#${c.base0C} guibg=#${c.base00} gui=NONE guisp=NONE + hi Folded guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE + hi IncSearch guifg=#${c.base01} guibg=#${c.base09} gui=NONE guisp=NONE + hi Italic guifg=NONE guibg=NONE gui=NONE guisp=NONE + hi Macro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi MatchParen guifg=NONE guibg=#${c.base03} gui=NONE guisp=NONE + hi ModeMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE + hi MoreMsg guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE + hi Question guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi Search guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE + hi Substitute guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE + hi SpecialKey guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi TooLong guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi Underlined guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi Visual guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE + hi VisualNOS guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi WarningMsg guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi WildMenu guifg=#${c.base08} guibg=#${c.base0A} gui=NONE guisp=NONE + hi Title guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi Conceal guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE + hi Cursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE + hi NonText guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi LineNr guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE + hi SignColumn guifg=#${c.base04} guibg=#${c.base00} gui=NONE guisp=NONE + hi StatusLine guifg=#${c.base0B} guibg=#${c.base02} gui=NONE guisp=NONE + hi StatusLineNC guifg=#${c.base04} guibg=#${c.base01} gui=NONE guisp=NONE + hi VertSplit guifg=#${c.base01} guibg=#${c.base00} gui=NONE guisp=NONE + hi ColorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE + hi CursorColumn guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE + hi CursorLine guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE + hi CursorLineNr guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE + hi QuickFixLine guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE + hi PMenu guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE + hi PMenuSel guifg=#${c.base01} guibg=#${c.base05} gui=NONE guisp=NONE + hi TabLine guifg=#${c.base03} guibg=#${c.base01} gui=NONE guisp=NONE + hi TabLineFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE + hi TabLineSel guifg=#${c.base0B} guibg=#${c.base01} gui=NONE guisp=NONE + hi EndOfBuffer guifg=#${c.base00} guibg=NONE gui=NONE guisp=NONE - hi Boolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi Character guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi Comment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi Conditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi Constant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi Define guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi Delimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE - hi Float guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi Function guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi Identifier guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi Include guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi Keyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi Label guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi Number guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi Operator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi PreProc guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi Repeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi Special guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE - hi SpecialChar guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE - hi Statement guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi StorageClass guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi String guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE - hi Structure guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi Tag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi Type guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi Typedef guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi Boolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi Character guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi Comment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi Conditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi Constant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi Define guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi Delimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE + hi Float guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi Function guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi Identifier guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi Include guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi Keyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi Label guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi Number guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi Operator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi PreProc guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi Repeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi Special guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE + hi SpecialChar guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE + hi Statement guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi StorageClass guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi String guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE + hi Structure guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi Tag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi Type guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi Typedef guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi Todo guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE - hi Done guifg=#${c.base01} guibg=#${c.base0B} gui=NONE guisp=NONE - hi Start guifg=#${c.base01} guibg=#${c.base0D} gui=NONE guisp=NONE - hi End guifg=#${c.base01} guibg=#${c.base0E} gui=NONE guisp=NONE + hi Todo guifg=#${c.base01} guibg=#${c.base0A} gui=NONE guisp=NONE + hi Done guifg=#${c.base01} guibg=#${c.base0B} gui=NONE guisp=NONE + hi Start guifg=#${c.base01} guibg=#${c.base0D} gui=NONE guisp=NONE + hi End guifg=#${c.base01} guibg=#${c.base0E} gui=NONE guisp=NONE - hi DiffAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffChange guifg=#${c.base03} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffText guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffAdded guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffFile guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffNewFile guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffLine guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE - hi DiffRemoved guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffChange guifg=#${c.base03} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffText guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffAdded guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffFile guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffNewFile guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffLine guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE + hi DiffRemoved guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE - hi gitcommitOverflow guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi gitcommitSummary guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE - hi gitcommitComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi gitcommitUntracked guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi gitcommitDiscarded guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi gitcommitSelected guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi gitcommitHeader guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi gitcommitSelectedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi gitcommitUnmergedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi gitcommitDiscardedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi gitcommitBranch guifg=#${c.base09} guibg=NONE gui=bold guisp=NONE - hi gitcommitUntrackedFile guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi gitcommitUnmergedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE - hi gitcommitDiscardedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE - hi gitcommitSelectedFile guifg=#${c.base0B} guibg=NONE gui=bold guisp=NONE + hi gitcommitOverflow guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi gitcommitSummary guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE + hi gitcommitComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi gitcommitUntracked guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi gitcommitDiscarded guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi gitcommitSelected guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi gitcommitHeader guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi gitcommitSelectedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi gitcommitUnmergedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi gitcommitDiscardedType guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi gitcommitBranch guifg=#${c.base09} guibg=NONE gui=bold guisp=NONE + hi gitcommitUntrackedFile guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi gitcommitUnmergedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE + hi gitcommitDiscardedFile guifg=#${c.base08} guibg=NONE gui=bold guisp=NONE + hi gitcommitSelectedFile guifg=#${c.base0B} guibg=NONE gui=bold guisp=NONE - hi GitGutterAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi GitGutterChange guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE - hi GitGutterDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE - hi GitGutterChangeDelete guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE + hi GitGutterAdd guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi GitGutterChange guifg=#${c.base0D} guibg=#${c.base00} gui=NONE guisp=NONE + hi GitGutterDelete guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE + hi GitGutterChangeDelete guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE - hi SpellBad guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08} - hi SpellLocal guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C} - hi SpellCap guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0D} - hi SpellRare guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E} + hi SpellBad guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08} + hi SpellLocal guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C} + hi SpellCap guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0D} + hi SpellRare guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E} - hi DiagnosticError guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE - hi DiagnosticWarn guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE - hi DiagnosticInfo guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE - hi DiagnosticHint guifg=#${c.base0C} guibg=#${c.base01} gui=NONE guisp=NONE - hi DiagnosticUnderlineError guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08} - hi DiagnosticUnderlineWarning guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E} - hi DiagnosticUnderlineWarn guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E} - hi DiagnosticUnderlineInformation guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0F} - hi DiagnosticUnderlineHint guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C} + hi DiagnosticError guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE + hi DiagnosticWarn guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE + hi DiagnosticInfo guifg=#${c.base05} guibg=#${c.base01} gui=NONE guisp=NONE + hi DiagnosticHint guifg=#${c.base0C} guibg=#${c.base01} gui=NONE guisp=NONE + hi DiagnosticUnderlineError guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base08} + hi DiagnosticUnderlineWarning guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E} + hi DiagnosticUnderlineWarn guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0E} + hi DiagnosticUnderlineInformation guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0F} + hi DiagnosticUnderlineHint guifg=NONE guibg=NONE gui=undercurl guisp=#${c.base0C} - hi LspReferenceText guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} - hi LspReferenceRead guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} - hi LspReferenceWrite guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} + hi LspReferenceText guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} + hi LspReferenceRead guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} + hi LspReferenceWrite guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} - hi link LspDiagnosticsDefaultError DiagnosticError - hi link LspDiagnosticsDefaultWarning DiagnosticWarn - hi link LspDiagnosticsDefaultInformation DiagnosticInfo - hi link LspDiagnosticsDefaultHint DiagnosticHint - hi link LspDiagnosticsUnderlineError DiagnosticUnderlineError - hi link LspDiagnosticsUnderlineWarning DiagnosticUnderlineWarning - hi link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInformation - hi link LspDiagnosticsUnderlineHint DiagnosticUnderlineHint + hi link LspDiagnosticsDefaultError DiagnosticError + hi link LspDiagnosticsDefaultWarning DiagnosticWarn + hi link LspDiagnosticsDefaultInformation DiagnosticInfo + hi link LspDiagnosticsDefaultHint DiagnosticHint + hi link LspDiagnosticsUnderlineError DiagnosticUnderlineError + hi link LspDiagnosticsUnderlineWarning DiagnosticUnderlineWarning + hi link LspDiagnosticsUnderlineInformation DiagnosticUnderlineInformation + hi link LspDiagnosticsUnderlineHint DiagnosticUnderlineHint - hi TSAnnotation guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE - hi TSAttribute guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi TSBoolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi TSCharacter guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE "was italic - hi TSConstructor guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi TSConditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi TSConstant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi TSConstBuiltin guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic - hi TSConstMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSError guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSException guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSField guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSFloat guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi TSFunction guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi TSFuncBuiltin guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE "was italic - hi TSFuncMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSInclude guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi TSKeyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi TSKeywordFunction guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi TSKeywordOperator guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE - hi TSLabel guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi TSMethod guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi TSNamespace guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSNone guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSNumber guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi TSOperator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSParameter guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSParameterReference guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSProperty guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSPunctDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE - hi TSPunctBracket guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSPunctSpecial guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSRepeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi TSString guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE - hi TSStringRegex guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE - hi TSStringEscape guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE - hi TSSymbol guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE - hi TSTag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi TSTagDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE - hi TSText guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi TSStrong guifg=NONE guibg=NONE gui=bold guisp=NONE - hi TSEmphasis guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic - hi TSUnderline guifg=#${c.base00} guibg=NONE gui=underline guisp=NONE - hi TSStrike guifg=#${c.base00} guibg=NONE gui=strikethrough guisp=NONE - hi TSTitle guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE - hi TSLiteral guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE - hi TSURI guifg=#${c.base09} guibg=NONE gui=underline guisp=NONE - hi TSType guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE - hi TSTypeBuiltin guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE "was italic - hi TSVariable guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE - hi TSVariableBuiltin guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE "was italic + hi TSAnnotation guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE + hi TSAttribute guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi TSBoolean guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi TSCharacter guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSComment guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE "was italic + hi TSConstructor guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi TSConditional guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi TSConstant guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi TSConstBuiltin guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic + hi TSConstMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSError guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSException guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSField guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSFloat guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi TSFunction guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi TSFuncBuiltin guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE "was italic + hi TSFuncMacro guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSInclude guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi TSKeyword guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi TSKeywordFunction guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi TSKeywordOperator guifg=#${c.base0E} guibg=NONE gui=NONE guisp=NONE + hi TSLabel guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi TSMethod guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi TSNamespace guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSNone guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSNumber guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi TSOperator guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSParameter guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSParameterReference guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSProperty guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSPunctDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE + hi TSPunctBracket guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSPunctSpecial guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSRepeat guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi TSString guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE + hi TSStringRegex guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE + hi TSStringEscape guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE + hi TSSymbol guifg=#${c.base0B} guibg=NONE gui=NONE guisp=NONE + hi TSTag guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi TSTagDelimiter guifg=#${c.base0F} guibg=NONE gui=NONE guisp=NONE + hi TSText guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi TSStrong guifg=NONE guibg=NONE gui=bold guisp=NONE + hi TSEmphasis guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE "was italic + hi TSUnderline guifg=#${c.base00} guibg=NONE gui=underline guisp=NONE + hi TSStrike guifg=#${c.base00} guibg=NONE gui=strikethrough guisp=NONE + hi TSTitle guifg=#${c.base0D} guibg=NONE gui=NONE guisp=NONE + hi TSLiteral guifg=#${c.base09} guibg=NONE gui=NONE guisp=NONE + hi TSURI guifg=#${c.base09} guibg=NONE gui=underline guisp=NONE + hi TSType guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE + hi TSTypeBuiltin guifg=#${c.base0A} guibg=NONE gui=NONE guisp=NONE "was italic + hi TSVariable guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE + hi TSVariableBuiltin guifg=#${c.base08} guibg=NONE gui=NONE guisp=NONE "was italic - hi TSDefinition guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} - hi TSDefinitionUsage guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} - hi TSCurrentScope guifg=NONE guibg=NONE gui=bold guisp=NONE - if has('nvim-0.8.0') - highlight! link @annotation TSAnnotation - highlight! link @attribute TSAttribute - highlight! link @boolean TSBoolean - highlight! link @character TSCharacter - highlight! link @comment TSComment - highlight! link @conditional TSConditional - highlight! link @constant TSConstant - highlight! link @constant.builtin TSConstBuiltin - highlight! link @constant.macro TSConstMacro - highlight! link @constructor TSConstructor - highlight! link @exception TSException - highlight! link @field TSField - highlight! link @float TSFloat - highlight! link @function TSFunction - highlight! link @function.builtin TSFuncBuiltin - highlight! link @function.macro TSFuncMacro - highlight! link @include TSInclude - highlight! link @keyword TSKeyword - highlight! link @keyword.function TSKeywordFunction - highlight! link @keyword.operator TSKeywordOperator - highlight! link @label TSLabel - highlight! link @method TSMethod - highlight! link @namespace TSNamespace - highlight! link @none TSNone - highlight! link @number TSNumber - highlight! link @operator TSOperator - highlight! link @parameter TSParameter - highlight! link @parameter.reference TSParameterReference - highlight! link @property TSProperty - highlight! link @punctuation.bracket TSPunctBracket - highlight! link @punctuation.delimiter TSPunctDelimiter - highlight! link @punctuation.special TSPunctSpecial - highlight! link @repeat TSRepeat - highlight! link @storageclass TSStorageClass - highlight! link @string TSString - highlight! link @string.escape TSStringEscape - highlight! link @string.regex TSStringRegex - highlight! link @symbol TSSymbol - highlight! link @tag TSTag - highlight! link @tag.delimiter TSTagDelimiter - highlight! link @text TSText - highlight! link @strike TSStrike - highlight! link @math TSMath - highlight! link @type TSType - highlight! link @type.builtin TSTypeBuiltin - highlight! link @uri TSURI - highlight! link @variable TSVariable - highlight! link @variable.builtin TSVariableBuiltin - endif + hi TSDefinition guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} + hi TSDefinitionUsage guifg=NONE guibg=NONE gui=underline guisp=#${c.base04} + hi TSCurrentScope guifg=NONE guibg=NONE gui=bold guisp=NONE + if has('nvim-0.8.0') + highlight! link @annotation TSAnnotation + highlight! link @attribute TSAttribute + highlight! link @boolean TSBoolean + highlight! link @character TSCharacter + highlight! link @comment TSComment + highlight! link @conditional TSConditional + highlight! link @constant TSConstant + highlight! link @constant.builtin TSConstBuiltin + highlight! link @constant.macro TSConstMacro + highlight! link @constructor TSConstructor + highlight! link @exception TSException + highlight! link @field TSField + highlight! link @float TSFloat + highlight! link @function TSFunction + highlight! link @function.builtin TSFuncBuiltin + highlight! link @function.macro TSFuncMacro + highlight! link @include TSInclude + highlight! link @keyword TSKeyword + highlight! link @keyword.function TSKeywordFunction + highlight! link @keyword.operator TSKeywordOperator + highlight! link @label TSLabel + highlight! link @method TSMethod + highlight! link @namespace TSNamespace + highlight! link @none TSNone + highlight! link @number TSNumber + highlight! link @operator TSOperator + highlight! link @parameter TSParameter + highlight! link @parameter.reference TSParameterReference + highlight! link @property TSProperty + highlight! link @punctuation.bracket TSPunctBracket + highlight! link @punctuation.delimiter TSPunctDelimiter + highlight! link @punctuation.special TSPunctSpecial + highlight! link @repeat TSRepeat + highlight! link @storageclass TSStorageClass + highlight! link @string TSString + highlight! link @string.escape TSStringEscape + highlight! link @string.regex TSStringRegex + highlight! link @symbol TSSymbol + highlight! link @tag TSTag + highlight! link @tag.delimiter TSTagDelimiter + highlight! link @text TSText + highlight! link @strike TSStrike + highlight! link @math TSMath + highlight! link @type TSType + highlight! link @type.builtin TSTypeBuiltin + highlight! link @uri TSURI + highlight! link @variable TSVariable + highlight! link @variable.builtin TSVariableBuiltin + endif - hi IndentBlankLine guifg=#${c.base01} guibg=NONE gui=NONE guisp=NONE + hi IndentBlankLine guifg=#${c.base01} guibg=NONE gui=NONE guisp=NONE - hi NvimTreeNormal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE + hi NvimTreeNormal guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE - hi CmpItemAbbr guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi CmpItemAbbrDeprecated guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE - hi CmpItemAbbrMatch guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi CmpItemAbbrMatchFuzzy guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi CmpItemKind guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE - hi CmpItemMenu guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi CmpItemAbbr guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi CmpItemAbbrDeprecated guifg=#${c.base03} guibg=NONE gui=NONE guisp=NONE + hi CmpItemAbbrMatch guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi CmpItemAbbrMatchFuzzy guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE + hi CmpItemKind guifg=#${c.base0C} guibg=NONE gui=NONE guisp=NONE + hi CmpItemMenu guifg=#${c.base05} guibg=NONE gui=NONE guisp=NONE - hi BufferCurrent guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi BufferCurrentIndex guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi BufferCurrentMod guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE - hi BufferCurrentSign guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE - hi BufferCurrentTarget guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE - hi BufferCurrentIcon guifg=NONE guibg=#${c.base00} gui=NONE guisp=NONE - hi BufferVisible guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE - hi BufferVisibleIndex guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE - hi BufferVisibleMod guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE - hi BufferVisibleSign guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE - hi BufferVisibleTarget guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE - hi BufferVisibleIcon guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE - hi BufferInactive guifg=#${c.base04} guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferInactiveIndex guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferInactiveMod guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferInactiveSign guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferInactiveTarget guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferInactiveIcon guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferTabpages guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE - hi BufferTabpageFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferCurrent guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi BufferCurrentIndex guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi BufferCurrentMod guifg=#${c.base0E} guibg=#${c.base00} gui=NONE guisp=NONE + hi BufferCurrentSign guifg=#${c.base0B} guibg=#${c.base00} gui=NONE guisp=NONE + hi BufferCurrentTarget guifg=#${c.base08} guibg=#${c.base00} gui=NONE guisp=NONE + hi BufferCurrentIcon guifg=NONE guibg=#${c.base00} gui=NONE guisp=NONE + hi BufferVisible guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE + hi BufferVisibleIndex guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE + hi BufferVisibleMod guifg=#${c.base0E} guibg=#${c.base01} gui=NONE guisp=NONE + hi BufferVisibleSign guifg=#${c.base0A} guibg=#${c.base01} gui=NONE guisp=NONE + hi BufferVisibleTarget guifg=#${c.base08} guibg=#${c.base01} gui=NONE guisp=NONE + hi BufferVisibleIcon guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE + hi BufferInactive guifg=#${c.base04} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferInactiveIndex guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferInactiveMod guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferInactiveSign guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferInactiveTarget guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferInactiveIcon guifg=NONE guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferTabpages guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE + hi BufferTabpageFill guifg=#${c.base03} guibg=#${c.base02} gui=NONE guisp=NONE - hi NvimInternalError guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE + hi NvimInternalError guifg=#${c.base00} guibg=#${c.base08} gui=NONE guisp=NONE - hi NormalFloat guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE - hi FloatBorder guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE - hi NormalNC guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE - hi TermCursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE - hi TermCursorNC guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE + hi NormalFloat guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE + hi FloatBorder guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE + hi NormalNC guifg=#${c.base05} guibg=#${c.base00} gui=NONE guisp=NONE + hi TermCursor guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE + hi TermCursorNC guifg=#${c.base00} guibg=#${c.base05} gui=NONE guisp=NONE - hi User1 guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE - hi User2 guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE - hi User3 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE - hi User4 guifg=#${c.base0C} guibg=#${c.base02} gui=NONE guisp=NONE - hi User5 guifg=#${c.base01} guibg=#${c.base02} gui=NONE guisp=NONE - hi User6 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE - hi User7 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE - hi User8 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE - hi User9 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE + hi User1 guifg=#${c.base08} guibg=#${c.base02} gui=NONE guisp=NONE + hi User2 guifg=#${c.base0E} guibg=#${c.base02} gui=NONE guisp=NONE + hi User3 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE + hi User4 guifg=#${c.base0C} guibg=#${c.base02} gui=NONE guisp=NONE + hi User5 guifg=#${c.base01} guibg=#${c.base02} gui=NONE guisp=NONE + hi User6 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE + hi User7 guifg=#${c.base05} guibg=#${c.base02} gui=NONE guisp=NONE + hi User8 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE + hi User9 guifg=#${c.base00} guibg=#${c.base02} gui=NONE guisp=NONE - hi TreesitterContext guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE "was italic + hi TreesitterContext guifg=NONE guibg=#${c.base01} gui=NONE guisp=NONE "was italic - let g:terminal_color_background = "#${c.base00}" - let g:terminal_color_foreground = "#${c.base05}" + let g:terminal_color_background = "#${c.base00}" + let g:terminal_color_foreground = "#${c.base05}" - let g:terminal_color_0 = "#${c.base00}" - let g:terminal_color_1 = "#${c.base08}" - let g:terminal_color_2 = "#${c.base0B}" - let g:terminal_color_3 = "#${c.base0A}" - let g:terminal_color_4 = "#${c.base0D}" - let g:terminal_color_5 = "#${c.base0E}" - let g:terminal_color_6 = "#${c.base0C}" - let g:terminal_color_7 = "#${c.base05}" - let g:terminal_color_8 = "#${c.base03}" - let g:terminal_color_9 = "#${c.base08}" - let g:terminal_color_10 = "#${c.base0B}" - let g:terminal_color_11 = "#${c.base0A}" - let g:terminal_color_12 = "#${c.base0D}" - let g:terminal_color_13 = "#${c.base0E}" - let g:terminal_color_14 = "#${c.base0C}" - let g:terminal_color_15 = "#${c.base07}" -'' + let g:terminal_color_0 = "#${c.base00}" + let g:terminal_color_1 = "#${c.base08}" + let g:terminal_color_2 = "#${c.base0B}" + let g:terminal_color_3 = "#${c.base0A}" + let g:terminal_color_4 = "#${c.base0D}" + let g:terminal_color_5 = "#${c.base0E}" + let g:terminal_color_6 = "#${c.base0C}" + let g:terminal_color_7 = "#${c.base05}" + let g:terminal_color_8 = "#${c.base03}" + let g:terminal_color_9 = "#${c.base08}" + let g:terminal_color_10 = "#${c.base0B}" + let g:terminal_color_11 = "#${c.base0A}" + let g:terminal_color_12 = "#${c.base0D}" + let g:terminal_color_13 = "#${c.base0E}" + let g:terminal_color_14 = "#${c.base0C}" + let g:terminal_color_15 = "#${c.base07}" + '' diff --git a/home/misterio/features/nvim/ui.nix b/home/misterio/features/nvim/ui.nix index 0035aad1..c670fa33 100644 --- a/home/misterio/features/nvim/ui.nix +++ b/home/misterio/features/nvim/ui.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let gx-nvim = pkgs.vimUtils.buildVimPlugin { name = "gx-nvim"; src = pkgs.fetchFromGitHub { @@ -9,13 +8,15 @@ let hash = "sha256-QWJ/cPvSyMTJoWLg51BNFf9+/9i7G+nzennpHP/eQ4g="; }; }; -in -{ +in { programs.neovim.plugins = with pkgs.vimPlugins; [ { plugin = gx-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('gx').setup{} vim.keymap.set({"n", "x"}, "gx", ":Browse", { @@ -30,7 +31,10 @@ in { plugin = vim-fugitive; type = "viml"; - config = /* vim */ + config = + /* + vim + */ '' nmap G :Git ''; @@ -38,7 +42,10 @@ in { plugin = nvim-bqf; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('bqf').setup{} ''; @@ -46,7 +53,10 @@ in { plugin = alpha-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' local alpha = require("alpha") local dashboard = require("alpha.themes.dashboard") @@ -78,7 +88,10 @@ in { plugin = bufferline-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('bufferline').setup{} ''; @@ -86,7 +99,10 @@ in { plugin = scope-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('scope').setup{} ''; @@ -94,7 +110,10 @@ in { plugin = which-key-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('which-key').setup{} ''; @@ -102,7 +121,10 @@ in { plugin = range-highlight-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('range-highlight').setup{} ''; @@ -110,7 +132,10 @@ in { plugin = indent-blankline-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('ibl').setup{ scope = { highlight = {"IndentBlankLine"} }, @@ -121,7 +146,10 @@ in { plugin = nvim-web-devicons; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('nvim-web-devicons').setup{} ''; @@ -129,7 +157,10 @@ in { plugin = gitsigns-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('gitsigns').setup{ signs = { @@ -145,7 +176,10 @@ in { plugin = nvim-colorizer-lua; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('colorizer').setup{} ''; @@ -153,7 +187,10 @@ in { plugin = fidget-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('fidget').setup{ text = { @@ -165,7 +202,10 @@ in { plugin = oil-nvim; type = "lua"; - config = /* lua */ + config = + /* + lua + */ '' require('oil').setup{ buf_options = { diff --git a/home/misterio/features/pass/default.nix b/home/misterio/features/pass/default.nix index 7a2c2c0e..ad9d18ba 100644 --- a/home/misterio/features/pass/default.nix +++ b/home/misterio/features/pass/default.nix @@ -1,20 +1,23 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { programs.password-store = { enable = true; settings = { PASSWORD_STORE_DIR = "$HOME/.password-store"; }; - package = pkgs.pass.withExtensions (p: [ p.pass-otp ]); + package = pkgs.pass.withExtensions (p: [p.pass-otp]); }; services.pass-secret-service = { enable = true; storePath = "${config.home.homeDirectory}/.password-store"; - extraArgs = [ "-e${config.programs.password-store.package}/bin/pass" ]; + extraArgs = ["-e${config.programs.password-store.package}/bin/pass"]; }; home.persistence = { - "/persist/home/misterio".directories = [ ".password-store" ]; + "/persist/home/misterio".directories = [".password-store"]; }; } diff --git a/home/misterio/features/productivity/khal.nix b/home/misterio/features/productivity/khal.nix index 6ce1c462..b1b7ab9e 100644 --- a/home/misterio/features/productivity/khal.nix +++ b/home/misterio/features/productivity/khal.nix @@ -1,7 +1,9 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ khal ]; - xdg.configFile."khal/config".text = /* toml */ +{pkgs, ...}: { + home.packages = with pkgs; [khal]; + xdg.configFile."khal/config".text = + /* + toml + */ '' [calendars] diff --git a/home/misterio/features/productivity/khard.nix b/home/misterio/features/productivity/khard.nix index 04ebeb02..976757df 100644 --- a/home/misterio/features/productivity/khard.nix +++ b/home/misterio/features/productivity/khard.nix @@ -1,7 +1,9 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ khard ]; - xdg.configFile."khard/khard.conf".text = /* toml */ +{pkgs, ...}: { + home.packages = with pkgs; [khard]; + xdg.configFile."khard/khard.conf".text = + /* + toml + */ '' [addressbooks] [[contacts]] diff --git a/home/misterio/features/productivity/mail.nix b/home/misterio/features/productivity/mail.nix index e342772f..b19c5a48 100644 --- a/home/misterio/features/productivity/mail.nix +++ b/home/misterio/features/productivity/mail.nix @@ -3,9 +3,7 @@ lib, config, ... -}: - -let +}: let mbsync = "${config.programs.mbsync.package}/bin/mbsync"; pass = "${config.programs.password-store.package}/bin/pass"; @@ -25,66 +23,70 @@ let ''; }; }; -in -{ +in { home.persistence = { - "/persist/home/misterio".directories = [ "Mail" ]; + "/persist/home/misterio".directories = ["Mail"]; }; accounts.email = { maildirBasePath = "Mail"; accounts = { - personal = rec { - primary = true; - address = "hi@m7.rs"; - aliases = [ - "gabriel@gsfontes.com" - "eu@misterio.me" - ]; - passwordCommand = "${pass} ${smtp.host}/${address}"; - - imap.host = "mail.m7.rs"; - mbsync = { - enable = true; - create = "maildir"; - expunge = "both"; - }; - folders = { - inbox = "Inbox"; - drafts = "Drafts"; - sent = "Sent"; - trash = "Trash"; - }; - neomutt = { - enable = true; - extraMailboxes = [ - "Archive" - "Drafts" - "Junk" - "Sent" - "Trash" + personal = + rec { + primary = true; + address = "hi@m7.rs"; + aliases = [ + "gabriel@gsfontes.com" + "eu@misterio.me" ]; - }; + passwordCommand = "${pass} ${smtp.host}/${address}"; - msmtp.enable = true; - smtp.host = "mail.m7.rs"; - userName = address; - } // common; + imap.host = "mail.m7.rs"; + mbsync = { + enable = true; + create = "maildir"; + expunge = "both"; + }; + folders = { + inbox = "Inbox"; + drafts = "Drafts"; + sent = "Sent"; + trash = "Trash"; + }; + neomutt = { + enable = true; + extraMailboxes = [ + "Archive" + "Drafts" + "Junk" + "Sent" + "Trash" + ]; + }; - college = rec { - address = "g.fontes@usp.br"; - passwordCommand = "${pass} ${smtp.host}/${address}"; + msmtp.enable = true; + smtp.host = "mail.m7.rs"; + userName = address; + } + // common; - msmtp.enable = true; - smtp.host = "smtp.gmail.com"; - userName = address; - } // common; + college = + rec { + address = "g.fontes@usp.br"; + passwordCommand = "${pass} ${smtp.host}/${address}"; - zoocha = rec { - address = "gabriel@zoocha.com"; - passwordCommand = "${pass} ${smtp.host}/${address}"; + msmtp.enable = true; + smtp.host = "smtp.gmail.com"; + userName = address; + } + // common; - /* + zoocha = + rec { + address = "gabriel@zoocha.com"; + passwordCommand = "${pass} ${smtp.host}/${address}"; + + /* TODO: add imap (conditionally) imap.host = "imap.gmail.com"; mbsync = { @@ -99,12 +101,13 @@ in neomutt = { enable = true; }; - */ + */ - msmtp.enable = true; - smtp.host = "smtp.gmail.com"; - userName = address; - } // common; + msmtp.enable = true; + smtp.host = "smtp.gmail.com"; + userName = address; + } + // common; }; }; @@ -115,17 +118,15 @@ in Unit = { Description = "mbsync synchronization"; }; - Service = - let - gpgCmds = import ../cli/gpg-commands.nix { inherit pkgs; }; - in - { - Type = "oneshot"; - ExecCondition = '' - /bin/sh -c "${gpgCmds.isUnlocked}" - ''; - ExecStart = "${mbsync} -a"; - }; + Service = let + gpgCmds = import ../cli/gpg-commands.nix {inherit pkgs;}; + in { + Type = "oneshot"; + ExecCondition = '' + /bin/sh -c "${gpgCmds.isUnlocked}" + ''; + ExecStart = "${mbsync} -a"; + }; }; systemd.user.timers.mbsync = { Unit = { @@ -136,7 +137,7 @@ in OnUnitActiveSec = "5m"; }; Install = { - WantedBy = [ "timers.target" ]; + WantedBy = ["timers.target"]; }; }; } diff --git a/home/misterio/features/productivity/neomutt.nix b/home/misterio/features/productivity/neomutt.nix index 22661f4e..12a11381 100644 --- a/home/misterio/features/productivity/neomutt.nix +++ b/home/misterio/features/productivity/neomutt.nix @@ -3,8 +3,7 @@ pkgs, lib, ... -}: -{ +}: { xdg = { desktopEntries = { neomutt = { @@ -20,7 +19,7 @@ "ConsoleOnly" ]; type = "Application"; - mimeType = [ "x-scheme-handler/mailto" ]; + mimeType = ["x-scheme-handler/mailto"]; }; }; mimeApps.defaultApplications = { @@ -62,64 +61,61 @@ { action = "toggle-new"; key = "B"; - map = [ "index" ]; + map = ["index"]; } ]; - macros = - let - browserpipe = "cat /dev/stdin > /tmp/muttmail.html && xdg-open /tmp/muttmail.html"; - in - [ - { - action = ""; - key = "J"; - map = [ - "index" - "pager" - ]; - } - { - action = ""; - key = "K"; - map = [ - "index" - "pager" - ]; - } - { - action = "+Archive"; - key = "A"; - map = [ - "index" - "pager" - ]; - } - { - action = "${browserpipe}"; - key = "V"; - map = [ "attach" ]; - } - { - action = "${pkgs.urlscan}/bin/urlscan"; - key = "F"; - map = [ "pager" ]; - } - { - action = "html${browserpipe}"; - key = "V"; - map = [ - "index" - "pager" - ]; - } - ]; - extraConfig = - let - # Collect all addresses and aliases - addresses = lib.flatten ( - lib.mapAttrsToList (n: v: [ v.address ] ++ v.aliases) config.accounts.email.accounts - ); - in + macros = let + browserpipe = "cat /dev/stdin > /tmp/muttmail.html && xdg-open /tmp/muttmail.html"; + in [ + { + action = ""; + key = "J"; + map = [ + "index" + "pager" + ]; + } + { + action = ""; + key = "K"; + map = [ + "index" + "pager" + ]; + } + { + action = "+Archive"; + key = "A"; + map = [ + "index" + "pager" + ]; + } + { + action = "${browserpipe}"; + key = "V"; + map = ["attach"]; + } + { + action = "${pkgs.urlscan}/bin/urlscan"; + key = "F"; + map = ["pager"]; + } + { + action = "html${browserpipe}"; + key = "V"; + map = [ + "index" + "pager" + ]; + } + ]; + extraConfig = let + # Collect all addresses and aliases + addresses = lib.flatten ( + lib.mapAttrsToList (n: v: [v.address] ++ v.aliases) config.accounts.email.accounts + ); + in '' alternates "${lib.concatStringsSep "|" addresses}" '' diff --git a/home/misterio/features/productivity/todoman.nix b/home/misterio/features/productivity/todoman.nix index e70d0b20..52557ed6 100644 --- a/home/misterio/features/productivity/todoman.nix +++ b/home/misterio/features/productivity/todoman.nix @@ -1,7 +1,9 @@ -{ pkgs, ... }: -{ - home.packages = with pkgs; [ todoman ]; - xdg.configFile."todoman/config.py".text = /* python */ +{pkgs, ...}: { + home.packages = with pkgs; [todoman]; + xdg.configFile."todoman/config.py".text = + /* + python + */ '' path = "~/Calendars/*" default_list = "Personal" diff --git a/home/misterio/features/productivity/vdirsyncer.nix b/home/misterio/features/productivity/vdirsyncer.nix index ddd27c28..84537f5b 100644 --- a/home/misterio/features/productivity/vdirsyncer.nix +++ b/home/misterio/features/productivity/vdirsyncer.nix @@ -3,12 +3,10 @@ lib, config, ... -}: -let +}: let pass = "${config.programs.password-store.package}/bin/pass"; -in -{ - home.packages = with pkgs; [ vdirsyncer ]; +in { + home.packages = with pkgs; [vdirsyncer]; home.persistence = { "/persist/home/misterio".directories = [ @@ -18,7 +16,10 @@ in ]; }; - xdg.configFile."vdirsyncer/config".text = /* ini */ + xdg.configFile."vdirsyncer/config".text = + /* + ini + */ '' [general] status_path = "~/.local/share/vdirsyncer/status" @@ -63,17 +64,15 @@ in Unit = { Description = "vdirsyncer synchronization"; }; - Service = - let - gpgCmds = import ../cli/gpg-commands.nix { inherit pkgs; }; - in - { - Type = "oneshot"; - ExecCondition = '' - /bin/sh -c "${gpgCmds.isUnlocked}" - ''; - ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync"; - }; + Service = let + gpgCmds = import ../cli/gpg-commands.nix {inherit pkgs;}; + in { + Type = "oneshot"; + ExecCondition = '' + /bin/sh -c "${gpgCmds.isUnlocked}" + ''; + ExecStart = "${pkgs.vdirsyncer}/bin/vdirsyncer sync"; + }; }; systemd.user.timers.vdirsyncer = { Unit = { @@ -84,7 +83,7 @@ in OnUnitActiveSec = "5m"; }; Install = { - WantedBy = [ "timers.target" ]; + WantedBy = ["timers.target"]; }; }; } diff --git a/home/misterio/features/rgb/default.nix b/home/misterio/features/rgb/default.nix index 55f9b396..4da7e222 100644 --- a/home/misterio/features/rgb/default.nix +++ b/home/misterio/features/rgb/default.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let inherit (config.colorscheme) colors; -in -{ +in { services.rgbdaemon = { enable = true; daemons = { diff --git a/home/misterio/generic.nix b/home/misterio/generic.nix index 855844dd..f99bc5f3 100644 --- a/home/misterio/generic.nix +++ b/home/misterio/generic.nix @@ -1,6 +1,5 @@ -{ lib, ... }: -{ - imports = [ ./global ]; +{lib, ...}: { + imports = [./global]; # Disable impermanence - home.persistence = lib.mkForce { }; + home.persistence = lib.mkForce {}; } diff --git a/home/misterio/global/default.nix b/home/misterio/global/default.nix index 42cc303f..62154cfd 100644 --- a/home/misterio/global/default.nix +++ b/home/misterio/global/default.nix @@ -5,24 +5,24 @@ config, outputs, ... -}: -let +}: let inherit (inputs.nix-colors) colorSchemes; - inherit (inputs.nix-colors.lib-contrib { inherit pkgs; }) nixWallpaperFromScheme; -in -{ - imports = [ - inputs.impermanence.nixosModules.home-manager.impermanence - inputs.nix-colors.homeManagerModule - ../features/cli - ../features/nvim - ] ++ (builtins.attrValues outputs.homeManagerModules); + inherit (inputs.nix-colors.lib-contrib {inherit pkgs;}) nixWallpaperFromScheme; +in { + imports = + [ + inputs.impermanence.nixosModules.home-manager.impermanence + inputs.nix-colors.homeManagerModule + ../features/cli + ../features/nvim + ] + ++ (builtins.attrValues outputs.homeManagerModules); nixpkgs = { overlays = builtins.attrValues outputs.overlays; config = { allowUnfree = true; - allowUnfreePredicate = (_: true); + allowUnfreePredicate = _: true; }; }; @@ -49,7 +49,7 @@ in username = lib.mkDefault "misterio"; homeDirectory = lib.mkDefault "/home/${config.home.username}"; stateVersion = lib.mkDefault "22.05"; - sessionPath = [ "$HOME/.local/bin" ]; + sessionPath = ["$HOME/.local/bin"]; sessionVariables = { FLAKE = "$HOME/Documents/NixConfig"; }; @@ -79,12 +79,11 @@ in ".colorscheme.json".text = builtins.toJSON config.colorscheme; }; - wallpaper = - let - largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs)); - largestWidth = largest (x: x.width) config.monitors; - largestHeight = largest (x: x.height) config.monitors; - in + wallpaper = let + largest = f: xs: builtins.head (builtins.sort (a: b: a > b) (map f xs)); + largestWidth = largest (x: x.width) config.monitors; + largestHeight = largest (x: x.height) config.monitors; + in lib.mkDefault (nixWallpaperFromScheme { scheme = config.colorscheme; width = largestWidth; @@ -92,53 +91,51 @@ in logoScale = 4; }); - home.packages = - let - specialisation = pkgs.writeShellScriptBin "specialisation" '' - profiles="$HOME/.local/state/nix/profiles" - current="$profiles/home-manager" - base="$profiles/home-manager-base" + home.packages = let + specialisation = pkgs.writeShellScriptBin "specialisation" '' + profiles="$HOME/.local/state/nix/profiles" + current="$profiles/home-manager" + base="$profiles/home-manager-base" - # If current contains specialisations, link it as base - if [ -d "$current/specialisation" ]; then - echo >&2 "Using current profile as base" - ln -sfT "$(readlink "$current")" "$base" - # Check that $base contains specialisations before proceeding - elif [ -d "$base/specialisation" ]; then - echo >&2 "Using previously linked base profile" - else - echo >&2 "No suitable base config found. Try 'home-manager switch' again." - exit 1 - fi + # If current contains specialisations, link it as base + if [ -d "$current/specialisation" ]; then + echo >&2 "Using current profile as base" + ln -sfT "$(readlink "$current")" "$base" + # Check that $base contains specialisations before proceeding + elif [ -d "$base/specialisation" ]; then + echo >&2 "Using previously linked base profile" + else + echo >&2 "No suitable base config found. Try 'home-manager switch' again." + exit 1 + fi - if [ "$1" = "list" ] || [ "$1" = "-l" ] || [ "$1" = "--list" ]; then - find "$base/specialisation" -type l -printf "%f\n" - exit 0 - fi + if [ "$1" = "list" ] || [ "$1" = "-l" ] || [ "$1" = "--list" ]; then + find "$base/specialisation" -type l -printf "%f\n" + exit 0 + fi - echo >&2 "Switching to ''${1:-base} specialisation" - if [ -n "$1" ]; then - "$base/specialisation/$1/activate" + echo >&2 "Switching to ''${1:-base} specialisation" + if [ -n "$1" ]; then + "$base/specialisation/$1/activate" + else + "$base/activate" + fi + ''; + toggle-theme = pkgs.writeShellScriptBin "toggle-theme" '' + if [ -n "$1" ]; then + theme="$1" + else + current="$(${lib.getExe pkgs.jq} -re '.kind' "$HOME/.colorscheme.json")" + if [ "$current" = "light" ]; then + theme="dark" else - "$base/activate" + theme="light" fi - ''; - toggle-theme = pkgs.writeShellScriptBin "toggle-theme" '' - if [ -n "$1" ]; then - theme="$1" - else - current="$(${lib.getExe pkgs.jq} -re '.kind' "$HOME/.colorscheme.json")" - if [ "$current" = "light" ]; then - theme="dark" - else - theme="light" - fi - fi - ${lib.getExe specialisation} "$theme" - ''; - in - [ - specialisation - toggle-theme - ]; + fi + ${lib.getExe specialisation} "$theme" + ''; + in [ + specialisation + toggle-theme + ]; } diff --git a/home/misterio/maia.nix b/home/misterio/maia.nix index fd2d33ad..bc0a20e4 100644 --- a/home/misterio/maia.nix +++ b/home/misterio/maia.nix @@ -1 +1 @@ -{ imports = [ ./global ]; } +{imports = [./global];} diff --git a/home/misterio/merope.nix b/home/misterio/merope.nix index 17b15ac1..4d14033b 100644 --- a/home/misterio/merope.nix +++ b/home/misterio/merope.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ - imports = [ ./global ]; +{inputs, ...}: { + imports = [./global]; colorscheme = inputs.nix-colors.colorSchemes.nord; } diff --git a/home/misterio/pleione.nix b/home/misterio/pleione.nix index 2cf8f07c..3d7bd0af 100644 --- a/home/misterio/pleione.nix +++ b/home/misterio/pleione.nix @@ -3,11 +3,9 @@ lib, pkgs, ... -}: -let +}: let inherit (inputs.nix-colors) colorSchemes; -in -{ +in { imports = [ ./global ./features/desktop/hyprland diff --git a/hosts/alcyone/hardware-configuration.nix b/hosts/alcyone/hardware-configuration.nix index 05adc5fd..c07c7b24 100644 --- a/hosts/alcyone/hardware-configuration.nix +++ b/hosts/alcyone/hardware-configuration.nix @@ -1,5 +1,5 @@ { - imports = [ ../common/optional/ephemeral-btrfs.nix ]; + imports = [../common/optional/ephemeral-btrfs.nix]; boot = { initrd = { @@ -21,7 +21,7 @@ fileSystems."/boot" = { device = "/dev/disk/by-label/alcyone"; fsType = "btrfs"; - options = [ "subvol=boot" ]; + options = ["subvol=boot"]; }; swapDevices = [ @@ -34,7 +34,7 @@ hardware.cpu.intel.updateMicrocode = true; virtualisation.hypervGuest.enable = true; - systemd.services.hv-kvp.unitConfig.ConditionPathExists = [ "/dev/vmbus/hv_kvp" ]; + systemd.services.hv-kvp.unitConfig.ConditionPathExists = ["/dev/vmbus/hv_kvp"]; nixpkgs.hostPlatform = "x86_64-linux"; } diff --git a/hosts/alcyone/services/cgit/default.nix b/hosts/alcyone/services/cgit/default.nix index 9382c57d..bfdd0070 100644 --- a/hosts/alcyone/services/cgit/default.nix +++ b/hosts/alcyone/services/cgit/default.nix @@ -1,14 +1,11 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let cgit = "${pkgs.scgit}"; - compileSass = - file: - pkgs.runCommand "sass" { buildInputs = [ pkgs.sass ]; } '' + compileSass = file: + pkgs.runCommand "sass" {buildInputs = [pkgs.sass];} '' sass ${file} > $out ''; partials = "${pkgs.inputs.website.default}/public/cgit_partials"; -in -{ +in { services = { nginx.virtualHosts."m7.rs" = { forceSSL = true; @@ -34,7 +31,7 @@ in master = "true"; socket = "/run/uwsgi/cgit.sock"; procname-master = "uwsgi cgit"; - plugins = [ "cgi" ]; + plugins = ["cgi"]; cgi = "${cgit}/cgit/cgit.cgi"; }; }; @@ -42,7 +39,7 @@ in systemd.services.create-cgit-cache = { description = "Create cache directory for cgit"; enable = true; - wantedBy = [ "uwsgi.service" ]; + wantedBy = ["uwsgi.service"]; serviceConfig = { type = "oneshot"; }; diff --git a/hosts/alcyone/services/cincobola.nix b/hosts/alcyone/services/cincobola.nix index 3cafff88..bc494e64 100644 --- a/hosts/alcyone/services/cincobola.nix +++ b/hosts/alcyone/services/cincobola.nix @@ -1,8 +1,6 @@ # Something I did for a UI/UX class I took # Decided to keep around to help out freshmen - -{ pkgs, ... }: -let +{pkgs, ...}: let cincobola = pkgs.stdenv.mkDerivation { name = "cincobola"; JEKYLL_ENV = "production"; @@ -12,7 +10,7 @@ let rev = "bd1dcc3"; hash = "sha256-npPYxuZkqZWS0nRGc9IpTNviWzF5sFNUeVTdS6486lg="; }; - buildInputs = [ pkgs.jekyll ]; + buildInputs = [pkgs.jekyll]; buildPhase = '' jekyll build ''; @@ -23,8 +21,7 @@ let days = n: (hours n) * 24; hours = n: (minutes n) * 60; minutes = n: n * 60; -in -{ +in { services.nginx.virtualHosts."cincobola.misterio.me" = { forceSSL = true; enableACME = true; diff --git a/hosts/alcyone/services/files-server.nix b/hosts/alcyone/services/files-server.nix index bed97d0d..1530891e 100644 --- a/hosts/alcyone/services/files-server.nix +++ b/hosts/alcyone/services/files-server.nix @@ -4,8 +4,7 @@ let enableACME = true; locations."/".root = "/srv/files"; }; -in -{ +in { services.nginx.virtualHosts = { "files.m7.rs" = files; "f.m7.rs" = files; diff --git a/hosts/alcyone/services/firefly.nix b/hosts/alcyone/services/firefly.nix index 0d636b0f..655123f1 100644 --- a/hosts/alcyone/services/firefly.nix +++ b/hosts/alcyone/services/firefly.nix @@ -1,15 +1,18 @@ -{ inputs, config, ... }: { - imports = [ inputs.firefly.nixosModules.firefly-iii ]; + inputs, + config, + ... +}: { + imports = [inputs.firefly.nixosModules.firefly-iii]; - nixpkgs.overlays = [ inputs.firefly.overlays.default ]; + nixpkgs.overlays = [inputs.firefly.overlays.default]; services.firefly-iii = { enable = true; hostname = "firefly.m7.rs"; appKeyFile = config.sops.secrets.firefly-key.path; nginx = { - serverAliases = [ "firefly.m7.rs" ]; + serverAliases = ["firefly.m7.rs"]; forceSSL = true; enableACME = true; }; @@ -24,6 +27,6 @@ }; environment.persistence = { - "/persist".directories = [ "/var/lib/firefly-iii" ]; + "/persist".directories = ["/var/lib/firefly-iii"]; }; } diff --git a/hosts/alcyone/services/git-remote.nix b/hosts/alcyone/services/git-remote.nix index c6ea5468..31eb033b 100644 --- a/hosts/alcyone/services/git-remote.nix +++ b/hosts/alcyone/services/git-remote.nix @@ -3,11 +3,9 @@ lib, pkgs, ... -}: -{ - +}: { environment.persistence = { - "/persist".directories = [ "/srv/git" ]; + "/persist".directories = ["/srv/git"]; }; services.gitDaemon = { @@ -15,7 +13,7 @@ basePath = "/srv/git"; exportAll = true; }; - networking.firewall.allowedTCPPorts = [ 9418 ]; + networking.firewall.allowedTCPPorts = [9418]; users = { users.git = { @@ -25,15 +23,15 @@ isSystemUser = true; shell = "${pkgs.bash}/bin/bash"; group = "git"; - packages = [ pkgs.git ]; + packages = [pkgs.git]; openssh.authorizedKeys.keys = # My key config.users.users.misterio.openssh.authorizedKeys.keys ++ - # The key hydra uses to access other hosts - # This is used to push CI-gated branches to my nix-config - config.nix.sshServe.keys; + # The key hydra uses to access other hosts + # This is used to push CI-gated branches to my nix-config + config.nix.sshServe.keys; }; - groups.git = { }; + groups.git = {}; }; } diff --git a/hosts/alcyone/services/headscale.nix b/hosts/alcyone/services/headscale.nix index 19193ce1..15d8f2ed 100644 --- a/hosts/alcyone/services/headscale.nix +++ b/hosts/alcyone/services/headscale.nix @@ -1,8 +1,10 @@ -{ config, lib, ... }: -let - derpPort = 3478; -in { + config, + lib, + ... +}: let + derpPort = 3478; +in { services = { headscale = { enable = true; @@ -13,8 +15,8 @@ in override_local_dns = true; base_domain = "m7.rs"; magic_dns = true; - domains = [ "ts.m7.rs" ]; - nameservers = [ "9.9.9.9" ]; + domains = ["ts.m7.rs"]; + nameservers = ["9.9.9.9"]; }; server_url = "https://tailscale.m7.rs"; metrics_listen_addr = "127.0.0.1:8095"; @@ -59,11 +61,11 @@ in }; # Derp server - networking.firewall.allowedUDPPorts = [ derpPort ]; + networking.firewall.allowedUDPPorts = [derpPort]; - environment.systemPackages = [ config.services.headscale.package ]; + environment.systemPackages = [config.services.headscale.package]; environment.persistence = { - "/persist".directories = [ "/var/lib/headscale" ]; + "/persist".directories = ["/var/lib/headscale"]; }; } diff --git a/hosts/alcyone/services/mail.nix b/hosts/alcyone/services/mail.nix index b2eb9e45..cc7a0089 100644 --- a/hosts/alcyone/services/mail.nix +++ b/hosts/alcyone/services/mail.nix @@ -3,12 +3,11 @@ pkgs, inputs, ... -}: -{ - imports = [ inputs.nixos-mailserver.nixosModules.mailserver ]; +}: { + imports = [inputs.nixos-mailserver.nixosModules.mailserver]; # https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/issues/275 - services.dovecot2.sieve.extensions = [ "fileinto" ]; + services.dovecot2.sieve.extensions = ["fileinto"]; mailserver = rec { enable = true; @@ -72,7 +71,7 @@ # Webmail services.roundcube = rec { enable = true; - package = pkgs.roundcube.withPlugins (p: [ p.carddav ]); + package = pkgs.roundcube.withPlugins (p: [p.carddav]); hostName = "mail.m7.rs"; extraConfig = '' $config['smtp_host'] = "tls://${hostName}:587"; diff --git a/hosts/alcyone/services/prometheus.nix b/hosts/alcyone/services/prometheus.nix index 9511eeed..57ea7a43 100644 --- a/hosts/alcyone/services/prometheus.nix +++ b/hosts/alcyone/services/prometheus.nix @@ -3,8 +3,7 @@ outputs, lib, ... -}: -{ +}: { services = { prometheus = { enable = true; @@ -16,12 +15,12 @@ { job_name = "hydra"; scheme = "https"; - static_configs = [ { targets = [ "hydra.m7.rs" ]; } ]; + static_configs = [{targets = ["hydra.m7.rs"];}]; } { job_name = "headscale"; scheme = "https"; - static_configs = [ { targets = [ "tailscale.m7.rs" ]; } ]; + static_configs = [{targets = ["tailscale.m7.rs"];}]; } { job_name = "nginx"; @@ -39,23 +38,23 @@ { job_name = "hosts"; scheme = "http"; - static_configs = lib.mapAttrsToList (hostname: value: let - port = value.config.services.prometheus.exporters.node.port; - in { - targets = ["${hostname}:${toString port}"]; - labels.instance = hostname; - }) outputs.nixosConfigurations; + static_configs = + lib.mapAttrsToList (hostname: value: let + port = value.config.services.prometheus.exporters.node.port; + in { + targets = ["${hostname}:${toString port}"]; + labels.instance = hostname; + }) + outputs.nixosConfigurations; } ]; - extraFlags = - let - prometheus = config.services.prometheus.package; - in - [ - # Custom consoles - "--web.console.templates=${prometheus}/etc/prometheus/consoles" - "--web.console.libraries=${prometheus}/etc/prometheus/console_libraries" - ]; + extraFlags = let + prometheus = config.services.prometheus.package; + in [ + # Custom consoles + "--web.console.templates=${prometheus}/etc/prometheus/consoles" + "--web.console.libraries=${prometheus}/etc/prometheus/console_libraries" + ]; }; nginx.virtualHosts = { "metrics.m7.rs" = { diff --git a/hosts/alcyone/services/radicale.nix b/hosts/alcyone/services/radicale.nix index 6cf00935..3e6d587b 100644 --- a/hosts/alcyone/services/radicale.nix +++ b/hosts/alcyone/services/radicale.nix @@ -1,8 +1,10 @@ -{ config, lib, ... }: -let - port = "5232"; -in { + config, + lib, + ... +}: let + port = "5232"; +in { services = { radicale = { enable = true; @@ -43,6 +45,6 @@ in }; environment.persistence = { - "/persist".directories = [ "/var/lib/radicale" ]; + "/persist".directories = ["/var/lib/radicale"]; }; } diff --git a/hosts/alcyone/services/website/default.nix b/hosts/alcyone/services/website/default.nix index f88ff5e2..e5665d23 100644 --- a/hosts/alcyone/services/website/default.nix +++ b/hosts/alcyone/services/website/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let website = pkgs.inputs.website.default; pgpKey = ../../../../home/misterio/pgp.asc; sshKey = ../../../../home/misterio/ssh.pub; @@ -11,8 +10,7 @@ let days = n: (hours n) * 24; hours = n: (minutes n) * 60; minutes = n: n * 60; -in -{ +in { imports = [ ./themes.nix ./shortner.nix diff --git a/hosts/alcyone/services/website/shortner.nix b/hosts/alcyone/services/website/shortner.nix index dacd73dc..ef965893 100644 --- a/hosts/alcyone/services/website/shortner.nix +++ b/hosts/alcyone/services/website/shortner.nix @@ -1,9 +1,8 @@ -{ lib, ... }: -{ +{lib, ...}: { services.nginx.virtualHosts."m7.rs" = { forceSSL = true; enableACME = true; - locations = lib.mapAttrs' (n: v: lib.nameValuePair "/l/${n}" { return = "302 ${v}$request_uri"; }) { + locations = lib.mapAttrs' (n: v: lib.nameValuePair "/l/${n}" {return = "302 ${v}$request_uri";}) { "booletim" = "https://drive.google.com/uc?export=download&id=1cPemsZV3mUq9nfPMW1nKE7CssijMk7s0"; }; }; diff --git a/hosts/alcyone/services/website/themes.nix b/hosts/alcyone/services/website/themes.nix index 2e792b52..4da1f725 100644 --- a/hosts/alcyone/services/website/themes.nix +++ b/hosts/alcyone/services/website/themes.nix @@ -1,10 +1,13 @@ -{ inputs, pkgs, ... }: -let +{ + inputs, + pkgs, + ... +}: let themes = pkgs.stdenv.mkDerivation { name = "website-themes"; src = builtins.toFile "schemes" (builtins.toJSON inputs.nix-colors.colorSchemes); dontUnpack = true; - buildInputs = [ pkgs.jq ]; + buildInputs = [pkgs.jq]; buildPhase = '' build_css() { scheme_name="$1" @@ -48,8 +51,7 @@ let ''; }; days = n: toString (n * 60 * 60 * 24); -in -{ +in { services.nginx.virtualHosts = { "m7.rs" = { forceSSL = true; diff --git a/hosts/atlas/default.nix b/hosts/atlas/default.nix index ebaa802d..9a17add5 100644 --- a/hosts/atlas/default.nix +++ b/hosts/atlas/default.nix @@ -1,5 +1,8 @@ -{ pkgs, inputs, ... }: { + pkgs, + inputs, + ... +}: { imports = [ inputs.hardware.nixosModules.common-cpu-amd inputs.hardware.nixosModules.common-gpu-amd diff --git a/hosts/atlas/hardware-configuration.nix b/hosts/atlas/hardware-configuration.nix index 0dc2c0c4..7ea16625 100644 --- a/hosts/atlas/hardware-configuration.nix +++ b/hosts/atlas/hardware-configuration.nix @@ -14,7 +14,7 @@ "usbhid" "sd_mod" ]; - kernelModules = [ "kvm-amd" ]; + kernelModules = ["kvm-amd"]; }; loader = { systemd-boot = { diff --git a/hosts/celaeno/hardware-configuration.nix b/hosts/celaeno/hardware-configuration.nix index 1e25832b..ce3c24c4 100644 --- a/hosts/celaeno/hardware-configuration.nix +++ b/hosts/celaeno/hardware-configuration.nix @@ -1,5 +1,4 @@ -{ modulesPath, ... }: -{ +{modulesPath, ...}: { imports = [ ../common/optional/ephemeral-btrfs.nix (modulesPath + "/profiles/qemu-guest.nix") diff --git a/hosts/celaeno/services/binary-cache.nix b/hosts/celaeno/services/binary-cache.nix index f8c0dbb9..09dffa08 100644 --- a/hosts/celaeno/services/binary-cache.nix +++ b/hosts/celaeno/services/binary-cache.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: { + config, + pkgs, + ... +}: { sops.secrets.cache-sig-key = { sopsFile = ../secrets.yaml; }; diff --git a/hosts/celaeno/services/default.nix b/hosts/celaeno/services/default.nix index af0052e3..177489cc 100644 --- a/hosts/celaeno/services/default.nix +++ b/hosts/celaeno/services/default.nix @@ -12,5 +12,5 @@ ./minecraft ]; - networking.firewall.allowedTCPPorts = [ 5432 ]; + networking.firewall.allowedTCPPorts = [5432]; } diff --git a/hosts/celaeno/services/disconic.nix b/hosts/celaeno/services/disconic.nix index eb7116b1..f9903ce2 100644 --- a/hosts/celaeno/services/disconic.nix +++ b/hosts/celaeno/services/disconic.nix @@ -3,9 +3,8 @@ inputs, pkgs, ... -}: -{ - imports = [ inputs.disconic.nixosModules.default ]; +}: { + imports = [inputs.disconic.nixosModules.default]; services.disconic = { enable = true; diff --git a/hosts/celaeno/services/hydra/default.nix b/hosts/celaeno/services/hydra/default.nix index fc720ebe..357fca18 100644 --- a/hosts/celaeno/services/hydra/default.nix +++ b/hosts/celaeno/services/hydra/default.nix @@ -5,17 +5,15 @@ outputs, inputs, ... -}: -let +}: let hydraUser = config.users.users.hydra.name; hydraGroup = config.users.users.hydra.group; release-host-branch = pkgs.callPackage ./lib/release-host-branch.nix { sshKeyFile = config.sops.secrets.nix-ssh-key.path; }; -in -{ - imports = [ ./machines.nix ]; +in { + imports = [./machines.nix]; # https://github.com/NixOS/nix/issues/4178#issuecomment-738886808 systemd.services.hydra-evaluator.environment.GC_DONT_GC = "true"; @@ -28,7 +26,10 @@ in listenHost = "localhost"; smtpHost = "localhost"; useSubstitutes = true; - extraConfig = /* xml */ + extraConfig = + /* + xml + */ '' Include ${config.sops.secrets.hydra-gh-auth.path} max_unsupported_time = 30 @@ -57,8 +58,8 @@ in }; }; users.users = { - hydra-queue-runner.extraGroups = [ hydraGroup ]; - hydra-www.extraGroups = [ hydraGroup ]; + hydra-queue-runner.extraGroups = [hydraGroup]; + hydra-www.extraGroups = [hydraGroup]; }; sops.secrets = { hydra-gh-auth = { @@ -76,6 +77,6 @@ in }; environment.persistence = { - "/persist".directories = [ "/var/lib/hydra" ]; + "/persist".directories = ["/var/lib/hydra"]; }; } diff --git a/hosts/celaeno/services/hydra/lib/mk-build-machines-file.nix b/hosts/celaeno/services/hydra/lib/mk-build-machines-file.nix index 77027b0d..bede0948 100644 --- a/hosts/celaeno/services/hydra/lib/mk-build-machines-file.nix +++ b/hosts/celaeno/services/hydra/lib/mk-build-machines-file.nix @@ -1,31 +1,26 @@ let - field = - x: - if (x == null || x == [ ] || x == "") then - "-" - else if (builtins.isInt x) then - (builtins.toString x) - else if (builtins.isList x) then - (builtins.concatStringsSep "," x) - else - x; + field = x: + if (x == null || x == [] || x == "") + then "-" + else if (builtins.isInt x) + then (builtins.toString x) + else if (builtins.isList x) + then (builtins.concatStringsSep "," x) + else x; - mkBuildMachine = - { - uri ? null, - systems ? null, - sshKey ? null, - maxJobs ? null, - speedFactor ? null, - supportedFeatures ? null, - mandatoryFeatures ? null, - publicHostKey ? null, - }: - '' - ${field uri} ${field systems} ${field sshKey} ${field maxJobs} ${field speedFactor} ${field supportedFeatures} ${field mandatoryFeatures} ${field publicHostKey} - ''; + mkBuildMachine = { + uri ? null, + systems ? null, + sshKey ? null, + maxJobs ? null, + speedFactor ? null, + supportedFeatures ? null, + mandatoryFeatures ? null, + publicHostKey ? null, + }: '' + ${field uri} ${field systems} ${field sshKey} ${field maxJobs} ${field speedFactor} ${field supportedFeatures} ${field mandatoryFeatures} ${field publicHostKey} + ''; - mkBuildMachinesFile = - x: builtins.toFile "machines" (builtins.concatStringsSep "\n" (map (mkBuildMachine) x)); + mkBuildMachinesFile = x: builtins.toFile "machines" (builtins.concatStringsSep "\n" (map mkBuildMachine x)); in -mkBuildMachinesFile + mkBuildMachinesFile diff --git a/hosts/celaeno/services/hydra/machines.nix b/hosts/celaeno/services/hydra/machines.nix index c7a4f6c1..7a915030 100644 --- a/hosts/celaeno/services/hydra/machines.nix +++ b/hosts/celaeno/services/hydra/machines.nix @@ -1,5 +1,8 @@ -{ config, pkgs, ... }: -let +{ + config, + pkgs, + ... +}: let buildMachinesFile = (import ./lib/mk-build-machines-file.nix) [ { uri = "ssh://nix-ssh@atlas"; @@ -51,15 +54,14 @@ let ]; } ]; -in -{ - services.hydra.buildMachinesFiles = [ "/etc/nix/hydra-machines" ]; +in { + services.hydra.buildMachinesFiles = ["/etc/nix/hydra-machines"]; systemd = { timers.builder-pinger = { description = "Build machine pinger timer"; - partOf = [ "builder-pinger.service" ]; - wantedBy = [ "multi-user.target" ]; + partOf = ["builder-pinger.service"]; + wantedBy = ["multi-user.target"]; timerConfig = { OnBootSec = "0"; OnUnitActiveSec = "30s"; @@ -82,45 +84,44 @@ in pkgs.diffutils pkgs.coreutils ]; - script = - '' - set -euo pipefail + script = '' + set -euo pipefail - final_file="/etc/nix/hydra-machines" - temp_file="$(mktemp)" + final_file="/etc/nix/hydra-machines" + temp_file="$(mktemp)" - check_host() { - line="$1" - host="$(echo "$line" | cut -d ' ' -f1)" - key="$(echo "$line" | cut -d ' ' -f3)" + check_host() { + line="$1" + host="$(echo "$line" | cut -d ' ' -f1)" + key="$(echo "$line" | cut -d ' ' -f3)" - if [ "$key" == "-" ]; then - args="" - else - args="ssh-key=$key" - fi - if [ "$host" == "localhost" ]; then - host="local" - fi - - if timeout 20 nix store ping --store "$host?$args"; then - echo "$line" >> $temp_file - fi - } - - while read -r host_line; do - check_host "$host_line" & - done < "${buildMachinesFile}" - - wait - - touch "$final_file" - if ! diff <(sort "$temp_file") <(sort "$final_file"); then - mv "$temp_file" "$final_file" - chmod 755 "$final_file" - touch "$final_file" # So that hydra-queue-runner refreshes + if [ "$key" == "-" ]; then + args="" + else + args="ssh-key=$key" fi - ''; + if [ "$host" == "localhost" ]; then + host="local" + fi + + if timeout 20 nix store ping --store "$host?$args"; then + echo "$line" >> $temp_file + fi + } + + while read -r host_line; do + check_host "$host_line" & + done < "${buildMachinesFile}" + + wait + + touch "$final_file" + if ! diff <(sort "$temp_file") <(sort "$final_file"); then + mv "$temp_file" "$final_file" + chmod 755 "$final_file" + touch "$final_file" # So that hydra-queue-runner refreshes + fi + ''; }; }; } diff --git a/hosts/celaeno/services/minecraft/aikar-flags.nix b/hosts/celaeno/services/minecraft/aikar-flags.nix index a23d2eac..790db637 100644 --- a/hosts/celaeno/services/minecraft/aikar-flags.nix +++ b/hosts/celaeno/services/minecraft/aikar-flags.nix @@ -1,2 +1 @@ -memory: -"-Xms${memory} -Xmx${memory} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 " +memory: "-Xms${memory} -Xmx${memory} -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 " diff --git a/hosts/celaeno/services/minecraft/default.nix b/hosts/celaeno/services/minecraft/default.nix index 6669a8b7..50112f19 100644 --- a/hosts/celaeno/services/minecraft/default.nix +++ b/hosts/celaeno/services/minecraft/default.nix @@ -3,8 +3,7 @@ config, lib, ... -}: -{ +}: { imports = [ inputs.nix-minecraft.nixosModules.minecraft-servers ./servers/proxy @@ -30,7 +29,7 @@ }; networking.firewall = { - allowedTCPPorts = [ 25565 ]; + allowedTCPPorts = [25565]; allowedUDPPorts = [ 25565 19132 @@ -38,7 +37,7 @@ }; services.mysql = { - ensureDatabases = [ "minecraft" ]; + ensureDatabases = ["minecraft"]; ensureUsers = [ { name = "minecraft"; @@ -49,7 +48,7 @@ ]; }; # Set minecrafts' password (the plugins don't play well with socket auth) - users.users.mysql.extraGroups = [ "minecraft" ]; # Get access to the secret + users.users.mysql.extraGroups = ["minecraft"]; # Get access to the secret systemd.services.mysql.postStart = lib.mkAfter '' source ${config.sops.secrets.minecraft-secrets.path} ${config.services.mysql.package}/bin/mysql < /run/minecraft-server/proxy.stdin @@ -13,12 +12,12 @@ files = { "plugins/fallbackservervelocity/config.yml".value = { settings = { - blacklisted_words = [ "ban" ]; + blacklisted_words = ["ban"]; check_updates = false; command_tab_complete = true; command_without_permission = true; disabled_servers = false; - disabled_servers_list = { }; + disabled_servers_list = {}; fallback_list = [ "lobby" "limbo" @@ -29,7 +28,7 @@ "lobby" ]; server_blacklist = false; - server_blacklist_list = [ ]; + server_blacklist_list = []; stats = true; task_period = 5; }; diff --git a/hosts/celaeno/services/minecraft/servers/proxy/geyser.nix b/hosts/celaeno/services/minecraft/servers/proxy/geyser.nix index f3298247..a2294a4d 100644 --- a/hosts/celaeno/services/minecraft/servers/proxy/geyser.nix +++ b/hosts/celaeno/services/minecraft/servers/proxy/geyser.nix @@ -1,10 +1,6 @@ -{ pkgs, ... }: -let - geyserUrl = - n: v: b: - "https://download.geysermc.org/v2/projects/${n}/versions/${v}/builds/${b}/downloads/velocity"; -in -{ +{pkgs, ...}: let + geyserUrl = n: v: b: "https://download.geysermc.org/v2/projects/${n}/versions/${v}/builds/${b}/downloads/velocity"; +in { services.minecraft-servers.servers.proxy = { symlinks = { "plugins/Geyser.jar" = pkgs.fetchurl rec { diff --git a/hosts/celaeno/services/minecraft/servers/proxy/huskchat.nix b/hosts/celaeno/services/minecraft/servers/proxy/huskchat.nix index 31dde029..1fc7ca9e 100644 --- a/hosts/celaeno/services/minecraft/servers/proxy/huskchat.nix +++ b/hosts/celaeno/services/minecraft/servers/proxy/huskchat.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.minecraft-servers.servers.proxy = { extraReload = '' echo 'huskchat reload' > /run/minecraft-server/proxy.stdin diff --git a/hosts/celaeno/services/minecraft/servers/proxy/librelogin.nix b/hosts/celaeno/services/minecraft/servers/proxy/librelogin.nix index 4dcef21c..871efca2 100644 --- a/hosts/celaeno/services/minecraft/servers/proxy/librelogin.nix +++ b/hosts/celaeno/services/minecraft/servers/proxy/librelogin.nix @@ -3,11 +3,9 @@ config, lib, ... -}: -let +}: let inherit (lib) mapAttrs' replaceStrings nameValuePair; -in -{ +in { services.minecraft-servers.servers.proxy = { symlinks."plugins/LibreLogin.jar" = pkgs.fetchurl rec { pname = "LibreLogin"; @@ -16,7 +14,7 @@ in hash = "sha256-n4np9Q4Ej3UMk314ozVc0idgaGzFBuLaZ0kRx7BfqxI="; }; files = { - "plugins/librelogin/config.conf".format = pkgs.formats.json { }; + "plugins/librelogin/config.conf".format = pkgs.formats.json {}; "plugins/librelogin/config.conf".value = { allowed-commands-while-unauthorized = [ "login" @@ -37,20 +35,19 @@ in default-crypto-provider = "BCrypt-2A"; fallback = false; kick-on-wrong-password = false; - limbo = [ "limbo" ]; - migration = { }; + limbo = ["limbo"]; + migration = {}; milliseconds-to-refresh-notification = 10000; minimum-password-length = -1; new-uuid-creator = "MOJANG"; # Use the same config as velocity's "try" and "forced-hosts - pass-through = - let - velocityCfg = config.services.minecraft-servers.servers.proxy.files."velocity.toml".value; - in + pass-through = let + velocityCfg = config.services.minecraft-servers.servers.proxy.files."velocity.toml".value; + in { root = velocityCfg.servers.try; } - // (mapAttrs' (n: nameValuePair (replaceStrings [ "." ] [ "§" ] n)) velocityCfg.forced-hosts); + // (mapAttrs' (n: nameValuePair (replaceStrings ["."] ["§"] n)) velocityCfg.forced-hosts); ping-servers = true; remember-last-server = true; revision = 3; @@ -59,7 +56,7 @@ in totp.enabled = true; use-titles = false; }; - "plugins/librelogin/messages.conf".format = pkgs.formats.json { }; + "plugins/librelogin/messages.conf".format = pkgs.formats.json {}; "plugins/librelogin/messages.conf".value = { error-already-authorized = "&cVocê já está logado."; error-already-registered = "&cVocê já está registrado."; diff --git a/hosts/celaeno/services/minecraft/servers/proxy/luckperms.nix b/hosts/celaeno/services/minecraft/servers/proxy/luckperms.nix index 5ecd2686..b0cb3b84 100644 --- a/hosts/celaeno/services/minecraft/servers/proxy/luckperms.nix +++ b/hosts/celaeno/services/minecraft/servers/proxy/luckperms.nix @@ -1,5 +1,8 @@ -{ pkgs, lib, ... }: { + pkgs, + lib, + ... +}: { services.minecraft-servers.servers.proxy = rec { extraPostStart = '' echo 'lpv import initial.json.gz' > /run/minecraft-server/proxy.stdin @@ -7,56 +10,53 @@ extraReload = extraPostStart; symlinks = { - "plugins/LuckPerms.jar" = - let - build = "1515"; - in + "plugins/LuckPerms.jar" = let + build = "1515"; + in pkgs.fetchurl rec { pname = "LuckPerms"; version = "5.4.102"; url = "https://download.luckperms.net/${build}/velocity/${pname}-Velocity-${version}.jar"; hash = "sha256-hNxaR2BImIMFiX835DiG8FS/iWrkIv5bU4jQARp43Bw="; }; - "plugins/luckperms/initial.json.gz".format = pkgs.formats.gzipJson { }; - "plugins/luckperms/initial.json.gz".value = - let - mkPermissions = lib.mapAttrsToList (key: value: { inherit key value; }); - in - { - groups = { - owner.nodes = mkPermissions { - "group.admin" = true; - "prefix.1000.&5" = true; - "weight.1000" = true; + "plugins/luckperms/initial.json.gz".format = pkgs.formats.gzipJson {}; + "plugins/luckperms/initial.json.gz".value = let + mkPermissions = lib.mapAttrsToList (key: value: {inherit key value;}); + in { + groups = { + owner.nodes = mkPermissions { + "group.admin" = true; + "prefix.1000.&5" = true; + "weight.1000" = true; - "librelogin.*" = true; - "luckperms.*" = true; - "velocity.command.*" = true; - }; - admin.nodes = mkPermissions { - "group.default" = true; - "prefix.900.&6" = true; - "weight.900" = true; - - "huskchat.command.broadcast" = true; - }; - default.nodes = mkPermissions { - "huskchat.command.channel" = true; - "huskchat.command.msg" = true; - "huskchat.command.msg.reply" = true; - }; + "librelogin.*" = true; + "luckperms.*" = true; + "velocity.command.*" = true; }; - users = { - "3fc76c64-b1b2-4a95-b3cf-0d7d94db2d75" = { - username = "misterio7x"; - nodes = mkPermissions { "group.owner" = true; }; - }; - "10ffa557-322a-4b6c-9b3e-cdc2792163ae" = { - username = "kirao"; - nodes = mkPermissions { "group.admin" = true; }; - }; + admin.nodes = mkPermissions { + "group.default" = true; + "prefix.900.&6" = true; + "weight.900" = true; + + "huskchat.command.broadcast" = true; + }; + default.nodes = mkPermissions { + "huskchat.command.channel" = true; + "huskchat.command.msg" = true; + "huskchat.command.msg.reply" = true; }; }; + users = { + "3fc76c64-b1b2-4a95-b3cf-0d7d94db2d75" = { + username = "misterio7x"; + nodes = mkPermissions {"group.owner" = true;}; + }; + "10ffa557-322a-4b6c-9b3e-cdc2792163ae" = { + username = "kirao"; + nodes = mkPermissions {"group.admin" = true;}; + }; + }; + }; }; files = { diff --git a/hosts/celaeno/services/minecraft/servers/proxy/velocitab.nix b/hosts/celaeno/services/minecraft/servers/proxy/velocitab.nix index c40476be..a6694da6 100644 --- a/hosts/celaeno/services/minecraft/servers/proxy/velocitab.nix +++ b/hosts/celaeno/services/minecraft/servers/proxy/velocitab.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.minecraft-servers.servers.proxy = { extraReload = '' echo 'velocitab reload' > /run/minecraft-server/proxy.stdin @@ -19,16 +18,16 @@ only_list_players_in_same_group = false; remove_spectator_effect = true; sort_players = false; - server_display_names = { }; + server_display_names = {}; }; "plugins/velocitab/tab_groups.yml".value = { groups = [ { name = "default"; - headers = [ "&7FierceLands" ]; - footers = [ ]; + headers = ["&7FierceLands"]; + footers = []; format = "&7[%server%] &r%prefix%%username%"; - servers = [ ]; + servers = []; header_footer_update_rate = 1000; placeholder_update_rate = 1000; } diff --git a/hosts/celaeno/services/minecraft/servers/survival/default.nix b/hosts/celaeno/services/minecraft/servers/survival/default.nix index bd388ca7..568215d5 100644 --- a/hosts/celaeno/services/minecraft/servers/survival/default.nix +++ b/hosts/celaeno/services/minecraft/servers/survival/default.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.minecraft-servers.servers.survival = { enable = true; enableReload = true; @@ -59,10 +58,9 @@ url = "https://github.com/ViaVersion/${pname}/releases/download/${version}/${pname}-${version}.jar"; hash = "sha256-JSE71YbivWCqUzNwPVFNgqlhhFkMoIstrn+L/F3qdFM="; }; - "plugins/LuckPerms.jar" = - let - build = "1515"; - in + "plugins/LuckPerms.jar" = let + build = "1515"; + in pkgs.fetchurl rec { pname = "LuckPerms"; version = "5.4.102"; diff --git a/hosts/celaeno/services/paste-misterio-me.nix b/hosts/celaeno/services/paste-misterio-me.nix index c20993e1..e0df0f8b 100644 --- a/hosts/celaeno/services/paste-misterio-me.nix +++ b/hosts/celaeno/services/paste-misterio-me.nix @@ -3,9 +3,8 @@ inputs, pkgs, ... -}: -{ - imports = [ inputs.paste-misterio-me.nixosModules.server ]; +}: { + imports = [inputs.paste-misterio-me.nixosModules.server]; services = { paste-misterio-me = { diff --git a/hosts/common/global/acme.nix b/hosts/common/global/acme.nix index b2904b94..12e844e8 100644 --- a/hosts/common/global/acme.nix +++ b/hosts/common/global/acme.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{lib, ...}: { # Enable acme for usage with nginx vhosts security.acme = { defaults.email = "eu@misterio.me"; @@ -8,7 +7,7 @@ environment.persistence = { "/persist" = { - directories = [ "/var/lib/acme" ]; + directories = ["/var/lib/acme"]; }; }; } diff --git a/hosts/common/global/auto-upgrade.nix b/hosts/common/global/auto-upgrade.nix index 55d77023..011a82c8 100644 --- a/hosts/common/global/auto-upgrade.nix +++ b/hosts/common/global/auto-upgrade.nix @@ -4,18 +4,16 @@ pkgs, lib, ... -}: -let +}: let inherit (config.networking) hostName; # Only enable auto upgrade if current config came from a clean tree # This avoids accidental auto-upgrades when working locally. isClean = inputs.self ? rev; -in -{ +in { system.autoUpgrade = { enable = isClean; dates = "hourly"; - flags = [ "--refresh" ]; + flags = ["--refresh"]; flake = "git://m7.rs/nix-config?ref=release-${hostName}"; }; diff --git a/hosts/common/global/default.nix b/hosts/common/global/default.nix index 51081fa4..b88aac0e 100644 --- a/hosts/common/global/default.nix +++ b/hosts/common/global/default.nix @@ -1,25 +1,30 @@ # This file (and the global directory) holds config that i use on all hosts -{ inputs, outputs, ... }: { - imports = [ - inputs.home-manager.nixosModules.home-manager - ./acme.nix - ./auto-upgrade.nix - ./fish.nix - ./locale.nix - ./nix.nix - ./openssh.nix - ./optin-persistence.nix - ./podman.nix - ./sops.nix - ./ssh-serve-store.nix - ./steam-hardware.nix - ./systemd-initrd.nix - ./tailscale.nix - ./gamemode.nix - ./nix-ld.nix - ./prometheus-node-exporter.nix - ] ++ (builtins.attrValues outputs.nixosModules); + inputs, + outputs, + ... +}: { + imports = + [ + inputs.home-manager.nixosModules.home-manager + ./acme.nix + ./auto-upgrade.nix + ./fish.nix + ./locale.nix + ./nix.nix + ./openssh.nix + ./optin-persistence.nix + ./podman.nix + ./sops.nix + ./ssh-serve-store.nix + ./steam-hardware.nix + ./systemd-initrd.nix + ./tailscale.nix + ./gamemode.nix + ./nix-ld.nix + ./prometheus-node-exporter.nix + ] + ++ (builtins.attrValues outputs.nixosModules); home-manager.extraSpecialArgs = { inherit inputs outputs; @@ -35,7 +40,7 @@ # Fix for qt6 plugins # TODO: maybe upstream this? environment.profileRelativeSessionVariables = { - QT_PLUGIN_PATH = [ "/lib/qt-6/plugins" ]; + QT_PLUGIN_PATH = ["/lib/qt-6/plugins"]; }; hardware.enableRedistributableFirmware = true; diff --git a/hosts/common/global/gamemode.nix b/hosts/common/global/gamemode.nix index 03f3c8f3..1d25e427 100644 --- a/hosts/common/global/gamemode.nix +++ b/hosts/common/global/gamemode.nix @@ -1 +1 @@ -{ programs.gamemode.enable = true; } +{programs.gamemode.enable = true;} diff --git a/hosts/common/global/locale.nix b/hosts/common/global/locale.nix index 64f2b7c7..e291f91f 100644 --- a/hosts/common/global/locale.nix +++ b/hosts/common/global/locale.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{lib, ...}: { i18n = { defaultLocale = lib.mkDefault "en_US.UTF-8"; extraLocaleSettings = { diff --git a/hosts/common/global/nix.nix b/hosts/common/global/nix.nix index 55658a58..311606d6 100644 --- a/hosts/common/global/nix.nix +++ b/hosts/common/global/nix.nix @@ -3,8 +3,7 @@ lib, pkgs, ... -}: -{ +}: { nix = { # TODO # https://github.com/NixOS/nix/issues/9579 @@ -12,8 +11,8 @@ package = pkgs.nixVersions.nix_2_18; settings = { - substituters = lib.mkAfter [ "https://cache.m7.rs" ]; - trusted-public-keys = [ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ]; + substituters = lib.mkAfter ["https://cache.m7.rs"]; + trusted-public-keys = ["cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg="]; trusted-users = [ "root" "@wheel" @@ -41,10 +40,10 @@ # Add each flake input as a registry # To make nix3 commands consistent with the flake - registry = lib.mapAttrs (_: value: { flake = value; }) inputs; + registry = lib.mapAttrs (_: value: {flake = value;}) inputs; # Add nixpkgs input to NIX_PATH # This lets nix2 commands still use - nixPath = [ "nixpkgs=${inputs.nixpkgs.outPath}" ]; + nixPath = ["nixpkgs=${inputs.nixpkgs.outPath}"]; }; } diff --git a/hosts/common/global/openssh.nix b/hosts/common/global/openssh.nix index 188148d1..5c28d4e6 100644 --- a/hosts/common/global/openssh.nix +++ b/hosts/common/global/openssh.nix @@ -3,9 +3,7 @@ lib, config, ... -}: - -let +}: let inherit (config.networking) hostName; hosts = outputs.nixosConfigurations; pubKey = host: ../../${host}/ssh_host_ed25519_key.pub; @@ -14,8 +12,7 @@ let # Sops needs acess to the keys before the persist dirs are even mounted; so # just persisting the keys won't work, we must point at /persist hasOptinPersistence = config.environment.persistence ? "/persist"; -in -{ +in { services.openssh = { enable = true; settings = { @@ -38,21 +35,23 @@ in programs.ssh = { # Each hosts public key - knownHosts = builtins.mapAttrs (name: _: { - publicKeyFile = pubKey name; - extraHostNames = - (lib.optional (name == hostName) "localhost") - # Alias for localhost if it's the same host - ++ (lib.optionals (name == gitHost) [ - "m7.rs" - "git.m7.rs" - ]); # Alias for m7.rs and git.m7.rs if it's the git host - }) hosts; + knownHosts = + builtins.mapAttrs (name: _: { + publicKeyFile = pubKey name; + extraHostNames = + (lib.optional (name == hostName) "localhost") + # Alias for localhost if it's the same host + ++ (lib.optionals (name == gitHost) [ + "m7.rs" + "git.m7.rs" + ]); # Alias for m7.rs and git.m7.rs if it's the git host + }) + hosts; }; # Passwordless sudo when SSH'ing with keys security.pam.sshAgentAuth = { enable = true; - authorizedKeysFiles = [ "/etc/ssh/authorized_keys.d/%u" ]; + authorizedKeysFiles = ["/etc/ssh/authorized_keys.d/%u"]; }; } diff --git a/hosts/common/global/optin-persistence.nix b/hosts/common/global/optin-persistence.nix index 2051205a..8a34088c 100644 --- a/hosts/common/global/optin-persistence.nix +++ b/hosts/common/global/optin-persistence.nix @@ -8,9 +8,8 @@ inputs, config, ... -}: -{ - imports = [ inputs.impermanence.nixosModules.impermanence ]; +}: { + imports = [inputs.impermanence.nixosModules.impermanence]; environment.persistence = { "/persist" = { @@ -24,16 +23,14 @@ }; programs.fuse.userAllowOther = true; - system.activationScripts.persistent-dirs.text = - let - mkHomePersist = - user: - lib.optionalString user.createHome '' - mkdir -p /persist/${user.home} - chown ${user.name}:${user.group} /persist/${user.home} - chmod ${user.homeMode} /persist/${user.home} - ''; - users = lib.attrValues config.users.users; - in + system.activationScripts.persistent-dirs.text = let + mkHomePersist = user: + lib.optionalString user.createHome '' + mkdir -p /persist/${user.home} + chown ${user.name}:${user.group} /persist/${user.home} + chmod ${user.homeMode} /persist/${user.home} + ''; + users = lib.attrValues config.users.users; + in lib.concatLines (map mkHomePersist users); } diff --git a/hosts/common/global/podman.nix b/hosts/common/global/podman.nix index 5882aac6..972be358 100644 --- a/hosts/common/global/podman.nix +++ b/hosts/common/global/podman.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let dockerEnabled = config.virtualisation.docker.enable; -in -{ +in { virtualisation.podman = { enable = true; dockerCompat = !dockerEnabled; @@ -11,6 +9,6 @@ in }; environment.persistence = { - "/persist".directories = [ "/var/lib/containers" ]; + "/persist".directories = ["/var/lib/containers"]; }; } diff --git a/hosts/common/global/prometheus-node-exporter.nix b/hosts/common/global/prometheus-node-exporter.nix index cb1839c0..e0d88f57 100644 --- a/hosts/common/global/prometheus-node-exporter.nix +++ b/hosts/common/global/prometheus-node-exporter.nix @@ -1,10 +1,9 @@ -{ config, ... }: -{ +{config, ...}: { services.prometheus.exporters.node = { enable = true; - enabledCollectors = [ "systemd" ]; + enabledCollectors = ["systemd"]; }; networking.firewall.interfaces."tailscale0" = { - allowedTCPPorts = [ config.services.prometheus.exporters.node.port ]; + allowedTCPPorts = [config.services.prometheus.exporters.node.port]; }; } diff --git a/hosts/common/global/sops.nix b/hosts/common/global/sops.nix index bc424ce0..137c8c04 100644 --- a/hosts/common/global/sops.nix +++ b/hosts/common/global/sops.nix @@ -3,14 +3,12 @@ lib, config, ... -}: -let +}: let isEd25519 = k: k.type == "ed25519"; getKeyPath = k: k.path; keys = builtins.filter isEd25519 config.services.openssh.hostKeys; -in -{ - imports = [ inputs.sops-nix.nixosModules.sops ]; +in { + imports = [inputs.sops-nix.nixosModules.sops]; sops = { age.sshKeyPaths = map getKeyPath keys; diff --git a/hosts/common/global/ssh-serve-store.nix b/hosts/common/global/ssh-serve-store.nix index 1250f722..7b369afa 100644 --- a/hosts/common/global/ssh-serve-store.nix +++ b/hosts/common/global/ssh-serve-store.nix @@ -1,5 +1,4 @@ -{ config, ... }: -{ +{config, ...}: { nix = { sshServe = { enable = true; @@ -9,6 +8,6 @@ protocol = "ssh"; write = true; }; - settings.trusted-users = [ "nix-ssh" ]; + settings.trusted-users = ["nix-ssh"]; }; } diff --git a/hosts/common/global/steam-hardware.nix b/hosts/common/global/steam-hardware.nix index f7dd9180..7e9bd8bc 100644 --- a/hosts/common/global/steam-hardware.nix +++ b/hosts/common/global/steam-hardware.nix @@ -1 +1 @@ -{ hardware.steam-hardware.enable = true; } +{hardware.steam-hardware.enable = true;} diff --git a/hosts/common/global/systemd-initrd.nix b/hosts/common/global/systemd-initrd.nix index 1d3cd175..d3950061 100644 --- a/hosts/common/global/systemd-initrd.nix +++ b/hosts/common/global/systemd-initrd.nix @@ -1 +1 @@ -{ boot.initrd.systemd.enable = true; } +{boot.initrd.systemd.enable = true;} diff --git a/hosts/common/global/tailscale.nix b/hosts/common/global/tailscale.nix index 2f2aa423..1d40734d 100644 --- a/hosts/common/global/tailscale.nix +++ b/hosts/common/global/tailscale.nix @@ -1,13 +1,12 @@ -{ lib, ... }: -{ +{lib, ...}: { services.tailscale = { enable = true; useRoutingFeatures = lib.mkDefault "client"; - extraUpFlags = [ "--login-server https://tailscale.m7.rs" ]; + extraUpFlags = ["--login-server https://tailscale.m7.rs"]; }; - networking.firewall.allowedUDPPorts = [ 41641 ]; # Facilitate firewall punching + networking.firewall.allowedUDPPorts = [41641]; # Facilitate firewall punching environment.persistence = { - "/persist".directories = [ "/var/lib/tailscale" ]; + "/persist".directories = ["/var/lib/tailscale"]; }; } diff --git a/hosts/common/optional/ckb-next.nix b/hosts/common/optional/ckb-next.nix index 1e990366..6f62d77f 100644 --- a/hosts/common/optional/ckb-next.nix +++ b/hosts/common/optional/ckb-next.nix @@ -1,13 +1,12 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { hardware.ckb-next = { enable = true; }; systemd.services.ckb-next-resume = { description = "Restart ckb-next after hibernation"; - after = [ "suspend.target" ]; - wantedBy = [ "suspend.target" ]; + after = ["suspend.target"]; + wantedBy = ["suspend.target"]; serviceConfig = { Type = "simple"; ExecStart = "${pkgs.systemd}/bin/systemctl --no-block restart ckb-next.service"; diff --git a/hosts/common/optional/encrypted-root.nix b/hosts/common/optional/encrypted-root.nix index a84070fd..8989ae4a 100644 --- a/hosts/common/optional/encrypted-root.nix +++ b/hosts/common/optional/encrypted-root.nix @@ -1,8 +1,6 @@ -{ config, ... }: -let +{config, ...}: let hostname = config.networking.hostName; -in -{ +in { boot.initrd = { luks.devices."${hostname}".device = "/dev/disk/by-label/${hostname}_crypt"; }; diff --git a/hosts/common/optional/ephemeral-btrfs.nix b/hosts/common/optional/ephemeral-btrfs.nix index fbf8c1bc..32efb8cc 100644 --- a/hosts/common/optional/ephemeral-btrfs.nix +++ b/hosts/common/optional/ephemeral-btrfs.nix @@ -1,7 +1,10 @@ # This file contains an ephemeral btrfs root configuration # TODO: perhaps partition using disko in the future -{ lib, config, ... }: -let +{ + lib, + config, + ... +}: let hostname = config.networking.hostName; wipeScript = '' mkdir /tmp -p @@ -24,20 +27,19 @@ let ) ''; phase1Systemd = config.boot.initrd.systemd.enable; -in -{ +in { boot.initrd = { - supportedFilesystems = [ "btrfs" ]; + supportedFilesystems = ["btrfs"]; postDeviceCommands = lib.mkIf (!phase1Systemd) (lib.mkBefore wipeScript); systemd.services.restore-root = lib.mkIf phase1Systemd { description = "Rollback btrfs rootfs"; - wantedBy = [ "initrd.target" ]; - requires = [ "dev-disk-by\\x2dlabel-${hostname}.device" ]; + wantedBy = ["initrd.target"]; + requires = ["dev-disk-by\\x2dlabel-${hostname}.device"]; after = [ "dev-disk-by\\x2dlabel-${hostname}.device" "systemd-cryptsetup@${hostname}.service" ]; - before = [ "sysroot.mount" ]; + before = ["sysroot.mount"]; unitConfig.DefaultDependencies = "no"; serviceConfig.Type = "oneshot"; script = wipeScript; diff --git a/hosts/common/optional/greetd.nix b/hosts/common/optional/greetd.nix index da9c283e..e35b0ef8 100644 --- a/hosts/common/optional/greetd.nix +++ b/hosts/common/optional/greetd.nix @@ -3,8 +3,7 @@ lib, config, ... -}: -let +}: let homeCfgs = config.home-manager.users; homeSharePaths = lib.mapAttrsToList (_: v: "${v.home.path}/share") homeCfgs; vars = ''XDG_DATA_DIRS="$XDG_DATA_DIRS:${lib.concatStringsSep ":" homeSharePaths}" GTK_USE_PORTAL=0''; @@ -14,18 +13,15 @@ let iconTheme = misterioCfg.gtk.iconTheme; wallpaper = misterioCfg.wallpaper; - sway-kiosk = - command: - "${lib.getExe pkgs.sway} --unsupported-gpu --config ${pkgs.writeText "kiosk.config" '' - output * bg #000000 solid_color - xwayland disable - input "type:touchpad" { - tap enabled - } - exec '${vars} ${command}; ${pkgs.sway}/bin/swaymsg exit' - ''}"; -in -{ + sway-kiosk = command: "${lib.getExe pkgs.sway} --unsupported-gpu --config ${pkgs.writeText "kiosk.config" '' + output * bg #000000 solid_color + xwayland disable + input "type:touchpad" { + tap enabled + } + exec '${vars} ${command}; ${pkgs.sway}/bin/swaymsg exit' + ''}"; +in { users.extraUsers.greeter = { packages = [ gtkTheme.package diff --git a/hosts/common/optional/mysql.nix b/hosts/common/optional/mysql.nix index 3b386666..331b5c2e 100644 --- a/hosts/common/optional/mysql.nix +++ b/hosts/common/optional/mysql.nix @@ -1,11 +1,10 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { services.mysql = { enable = true; package = pkgs.mariadb; }; environment.persistence = { - "/persist".directories = [ "/var/lib/mysql" ]; + "/persist".directories = ["/var/lib/mysql"]; }; } diff --git a/hosts/common/optional/nginx.nix b/hosts/common/optional/nginx.nix index 5bb3de88..e907bd27 100644 --- a/hosts/common/optional/nginx.nix +++ b/hosts/common/optional/nginx.nix @@ -1,8 +1,10 @@ -{ lib, config, ... }: -let - inherit (config.networking) hostName; -in { + lib, + config, + ... +}: let + inherit (config.networking) hostName; +in { services = { nginx = { enable = true; @@ -28,7 +30,7 @@ in settings.namespaces = [ { name = "filelogger"; - source.files = [ "/var/log/nginx/access.log" ]; + source.files = ["/var/log/nginx/access.log"]; format = "$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent \"$http_referer\" \"$http_user_agent\""; } ]; @@ -38,10 +40,10 @@ in enable = true; user = "nginx"; group = "nginx"; - plugins = [ "cgi" ]; + plugins = ["cgi"]; instance = { type = "emperor"; - vassals = lib.mkBefore { }; + vassals = lib.mkBefore {}; }; }; }; diff --git a/hosts/common/optional/postgres.nix b/hosts/common/optional/postgres.nix index ff762538..cee4a20e 100644 --- a/hosts/common/optional/postgres.nix +++ b/hosts/common/optional/postgres.nix @@ -1,8 +1,7 @@ -{ lib, ... }: -{ +{lib, ...}: { services.postgresql.enable = true; environment.persistence = { - "/persist".directories = [ "/var/lib/postgresql" ]; + "/persist".directories = ["/var/lib/postgresql"]; }; } diff --git a/hosts/common/optional/quietboot.nix b/hosts/common/optional/quietboot.nix index 80d0dd9c..31f2c95c 100644 --- a/hosts/common/optional/quietboot.nix +++ b/hosts/common/optional/quietboot.nix @@ -1,5 +1,8 @@ -{ pkgs, config, ... }: { + pkgs, + config, + ... +}: { console = { useXkbConfig = true; earlySetup = false; @@ -10,7 +13,7 @@ enable = true; theme = "spinner-monochrome"; themePackages = [ - (pkgs.plymouth-spinner-monochrome.override { inherit (config.boot.plymouth) logo; }) + (pkgs.plymouth-spinner-monochrome.override {inherit (config.boot.plymouth) logo;}) ]; }; loader.timeout = 0; diff --git a/hosts/common/optional/tailscale-exit-node.nix b/hosts/common/optional/tailscale-exit-node.nix index 643198fc..801895a9 100644 --- a/hosts/common/optional/tailscale-exit-node.nix +++ b/hosts/common/optional/tailscale-exit-node.nix @@ -1,7 +1,7 @@ { - imports = [ ../global/tailscale.nix ]; + imports = [../global/tailscale.nix]; services.tailscale = { useRoutingFeatures = "both"; - extraUpFlags = [ "--advertise-exit-node" ]; + extraUpFlags = ["--advertise-exit-node"]; }; } diff --git a/hosts/common/optional/tlp.nix b/hosts/common/optional/tlp.nix index 441b0392..85d638dc 100644 --- a/hosts/common/optional/tlp.nix +++ b/hosts/common/optional/tlp.nix @@ -1 +1 @@ -{ services.tlp.enable = true; } +{services.tlp.enable = true;} diff --git a/hosts/common/optional/wireless.nix b/hosts/common/optional/wireless.nix index 593095fc..42b4d824 100644 --- a/hosts/common/optional/wireless.nix +++ b/hosts/common/optional/wireless.nix @@ -3,8 +3,7 @@ lib, pkgs, ... -}: -{ +}: { # Wireless secrets stored through sops sops.secrets.wireless = { sopsFile = ../secrets.yaml; @@ -45,7 +44,7 @@ pskRaw = "@ZOOCHA@"; }; "eduroam" = { - authProtocols = [ "WPA-EAP" ]; + authProtocols = ["WPA-EAP"]; auth = '' pairwise=CCMP group=CCMP TKIP @@ -71,7 +70,7 @@ }; # Ensure group exists - users.groups.network = { }; + users.groups.network = {}; systemd.services.wpa_supplicant.preStart = "touch /etc/wpa_supplicant.conf"; } diff --git a/hosts/common/users/layla/default.nix b/hosts/common/users/layla/default.nix index 9d89742e..c37d8688 100644 --- a/hosts/common/users/layla/default.nix +++ b/hosts/common/users/layla/default.nix @@ -3,9 +3,8 @@ lib, config, ... -}: -{ - imports = [ ./packages.nix ]; +}: { + imports = [./packages.nix]; users.mutableUsers = false; users.users.layla = { @@ -26,6 +25,6 @@ # Persist entire home environment.persistence = { - "/persist".directories = [ "/home/layla" ]; + "/persist".directories = ["/home/layla"]; }; } diff --git a/hosts/common/users/layla/packages.nix b/hosts/common/users/layla/packages.nix index 309b1ab4..5856d958 100644 --- a/hosts/common/users/layla/packages.nix +++ b/hosts/common/users/layla/packages.nix @@ -1,8 +1,7 @@ -{ pkgs, ... }: -let +{pkgs, ...}: let steam-with-pkgs = pkgs.steam.override { - extraPkgs = - pkgs: with pkgs; [ + extraPkgs = pkgs: + with pkgs; [ xorg.libXcursor xorg.libXi xorg.libXinerama @@ -15,8 +14,7 @@ let keyutils ]; }; -in -{ +in { users.users.layla.packages = with pkgs; [ firefox diff --git a/hosts/common/users/misterio/default.nix b/hosts/common/users/misterio/default.nix index a05368bc..2816e7b6 100644 --- a/hosts/common/users/misterio/default.nix +++ b/hosts/common/users/misterio/default.nix @@ -1,8 +1,10 @@ -{ pkgs, config, ... }: -let - ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; -in { + pkgs, + config, + ... +}: let + ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; +in { users.mutableUsers = false; users.users.misterio = { isNormalUser = true; @@ -26,9 +28,9 @@ in "deluge" ]; - openssh.authorizedKeys.keys = [ (builtins.readFile ../../../../home/misterio/ssh.pub) ]; + openssh.authorizedKeys.keys = [(builtins.readFile ../../../../home/misterio/ssh.pub)]; hashedPasswordFile = config.sops.secrets.misterio-password.path; - packages = [ pkgs.home-manager ]; + packages = [pkgs.home-manager]; }; sops.secrets.misterio-password = { @@ -39,6 +41,6 @@ in home-manager.users.misterio = import ../../../../home/misterio/${config.networking.hostName}.nix; security.pam.services = { - swaylock = { }; + swaylock = {}; }; } diff --git a/hosts/electra/default.nix b/hosts/electra/default.nix index f91ee1d0..b001e659 100644 --- a/hosts/electra/default.nix +++ b/hosts/electra/default.nix @@ -1,5 +1,8 @@ -{ pkgs, inputs, ... }: { + pkgs, + inputs, + ... +}: { imports = [ inputs.hardware.nixosModules.common-cpu-intel inputs.hardware.nixosModules.common-gpu-nvidia diff --git a/hosts/electra/hardware-configuration.nix b/hosts/electra/hardware-configuration.nix index 4db57fff..9da3b5f4 100644 --- a/hosts/electra/hardware-configuration.nix +++ b/hosts/electra/hardware-configuration.nix @@ -1,5 +1,5 @@ { - imports = [ ../common/optional/ephemeral-btrfs.nix ]; + imports = [../common/optional/ephemeral-btrfs.nix]; boot = { initrd = { @@ -10,7 +10,7 @@ "rtsx_usb_sdmmc" "usbhid" ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = ["kvm-intel"]; }; loader = { systemd-boot = { diff --git a/hosts/maia/default.nix b/hosts/maia/default.nix index 7e27257d..c0c20060 100644 --- a/hosts/maia/default.nix +++ b/hosts/maia/default.nix @@ -1,5 +1,8 @@ -{ pkgs, inputs, ... }: { + pkgs, + inputs, + ... +}: { imports = [ inputs.hardware.nixosModules.common-cpu-intel inputs.hardware.nixosModules.common-gpu-nvidia @@ -30,7 +33,7 @@ i18n.defaultLocale = "pt_BR.UTF-8"; - boot.kernelModules = [ "coretemp" ]; + boot.kernelModules = ["coretemp"]; services.thermald.enable = true; environment.etc."sysconfig/lm_sensors".text = '' HWMON_MODULES="coretemp" diff --git a/hosts/maia/hardware-configuration.nix b/hosts/maia/hardware-configuration.nix index 81a1662f..eb76aff4 100644 --- a/hosts/maia/hardware-configuration.nix +++ b/hosts/maia/hardware-configuration.nix @@ -11,7 +11,7 @@ "usbhid" "sd_mod" ]; - kernelModules = [ "kvm-intel" ]; + kernelModules = ["kvm-intel"]; }; loader = { systemd-boot = { diff --git a/hosts/merope/default.nix b/hosts/merope/default.nix index a7beccba..0111e05d 100644 --- a/hosts/merope/default.nix +++ b/hosts/merope/default.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ +{inputs, ...}: { imports = [ inputs.hardware.nixosModules.raspberry-pi-4 @@ -41,7 +40,7 @@ # Workaround for https://github.com/NixOS/nixpkgs/issues/154163 nixpkgs.overlays = [ - (final: prev: { makeModulesClosure = x: prev.makeModulesClosure (x // { allowMissing = true; }); }) + (final: prev: {makeModulesClosure = x: prev.makeModulesClosure (x // {allowMissing = true;});}) ]; system.stateVersion = "22.05"; diff --git a/hosts/merope/hardware-configuration.nix b/hosts/merope/hardware-configuration.nix index 5737e0ee..22da6781 100644 --- a/hosts/merope/hardware-configuration.nix +++ b/hosts/merope/hardware-configuration.nix @@ -1,9 +1,9 @@ { - imports = [ ../common/optional/ephemeral-btrfs.nix ]; + imports = [../common/optional/ephemeral-btrfs.nix]; boot = { initrd = { - availableKernelModules = [ "xhci_pci" ]; + availableKernelModules = ["xhci_pci"]; }; loader.timeout = 5; }; diff --git a/hosts/merope/services/deluge.nix b/hosts/merope/services/deluge.nix index 1f288556..99d315d8 100644 --- a/hosts/merope/services/deluge.nix +++ b/hosts/merope/services/deluge.nix @@ -1,5 +1,4 @@ -{ config, ... }: -{ +{config, ...}: { services.deluge = { enable = true; declarative = true; @@ -39,7 +38,7 @@ networking.firewall = { # Remote control port - allowedTCPPorts = [ 58846 ]; + allowedTCPPorts = [58846]; # Listen allowedTCPPortRanges = [ { diff --git a/hosts/merope/services/navidrome.nix b/hosts/merope/services/navidrome.nix index 9b0300a7..e15083eb 100644 --- a/hosts/merope/services/navidrome.nix +++ b/hosts/merope/services/navidrome.nix @@ -1,5 +1,8 @@ -{ lib, config, ... }: { + lib, + config, + ... +}: { services = { navidrome = { enable = true; @@ -28,6 +31,6 @@ }; environment.persistence = { - "/persist".directories = [ "/var/lib/private/navidrome" ]; + "/persist".directories = ["/var/lib/private/navidrome"]; }; } diff --git a/hosts/pleione/default.nix b/hosts/pleione/default.nix index 99dcc8f8..4cc0b624 100644 --- a/hosts/pleione/default.nix +++ b/hosts/pleione/default.nix @@ -1,5 +1,8 @@ -{ pkgs, inputs, ... }: { + pkgs, + inputs, + ... +}: { imports = [ inputs.hardware.nixosModules.common-cpu-amd inputs.hardware.nixosModules.common-gpu-amd diff --git a/hosts/pleione/hardware-configuration.nix b/hosts/pleione/hardware-configuration.nix index f47d9dbf..c926e2e9 100644 --- a/hosts/pleione/hardware-configuration.nix +++ b/hosts/pleione/hardware-configuration.nix @@ -13,7 +13,7 @@ "usb_storage" "sd_mod" ]; - kernelModules = [ "kvm-amd" ]; + kernelModules = ["kvm-amd"]; }; loader = { systemd-boot = { diff --git a/hydra.nix b/hydra.nix index 78040bf3..ea3c166a 100644 --- a/hydra.nix +++ b/hydra.nix @@ -1,15 +1,15 @@ -{ inputs, outputs }: -let +{ + inputs, + outputs, +}: let inherit (inputs.nixpkgs.lib) filterAttrs mapAttrs elem; notBroken = pkg: !(pkg.meta.broken or false); - isDistributable = pkg: (pkg.meta.license or { redistributable = true; }).redistributable; - hasPlatform = sys: pkg: elem sys (pkg.meta.platforms or [ ]); - filterValidPkgs = - sys: pkgs: filterAttrs (_: pkg: hasPlatform sys pkg && notBroken pkg && isDistributable pkg) pkgs; + isDistributable = pkg: (pkg.meta.license or {redistributable = true;}).redistributable; + hasPlatform = sys: pkg: elem sys (pkg.meta.platforms or []); + filterValidPkgs = sys: pkgs: filterAttrs (_: pkg: hasPlatform sys pkg && notBroken pkg && isDistributable pkg) pkgs; getCfg = _: cfg: cfg.config.system.build.toplevel; -in -{ +in { pkgs = mapAttrs filterValidPkgs outputs.packages; hosts = mapAttrs getCfg outputs.nixosConfigurations; } diff --git a/modules/home-manager/fonts.nix b/modules/home-manager/fonts.nix index 93d8a6d8..0df65dc6 100644 --- a/modules/home-manager/fonts.nix +++ b/modules/home-manager/fonts.nix @@ -1,6 +1,8 @@ -{ lib, config, ... }: - -let +{ + lib, + config, + ... +}: let mkFontOption = kind: { family = lib.mkOption { type = lib.types.str; @@ -16,8 +18,7 @@ let }; }; cfg = config.fontProfiles; -in -{ +in { options.fontProfiles = { enable = lib.mkEnableOption "Whether to enable font profiles"; monospace = mkFontOption "monospace"; diff --git a/modules/home-manager/monitors.nix b/modules/home-manager/monitors.nix index d7edbfb3..00a4c941 100644 --- a/modules/home-manager/monitors.nix +++ b/modules/home-manager/monitors.nix @@ -1,10 +1,11 @@ -{ lib, config, ... }: - -let +{ + lib, + config, + ... +}: let inherit (lib) mkOption types; cfg = config.monitors; -in -{ +in { options.monitors = mkOption { type = types.listOf ( types.submodule { @@ -48,7 +49,7 @@ in }; } ); - default = [ ]; + default = []; }; config = { assertions = [ diff --git a/modules/home-manager/pass-secret-service.nix b/modules/home-manager/pass-secret-service.nix index 9b93cb22..480fd78d 100644 --- a/modules/home-manager/pass-secret-service.nix +++ b/modules/home-manager/pass-secret-service.nix @@ -4,14 +4,10 @@ lib, ... }: - -with lib; - -let +with lib; let cfg = config.services.pass-secret-service; -in -{ - disabledModules = [ "services/pass-secret-service.nix" ]; +in { + disabledModules = ["services/pass-secret-service.nix"]; meta.maintainers = with maintainers; [ cab404 @@ -21,7 +17,7 @@ in options.services.pass-secret-service = { enable = mkEnableOption "Pass libsecret service"; - package = mkPackageOption pkgs "pass-secret-service" { }; + package = mkPackageOption pkgs "pass-secret-service" {}; storePath = mkOption { type = with types; nullOr str; @@ -33,13 +29,13 @@ in extraArgs = lib.mkOption { type = with lib.types; listOf str; - default = [ ]; + default = []; description = "Extra command-line arguments to be passed to the service."; }; }; config = mkIf cfg.enable { - assertions = [ (hm.assertions.assertPlatform "services.pass-secret-service" pkgs platforms.linux) ]; + assertions = [(hm.assertions.assertPlatform "services.pass-secret-service" pkgs platforms.linux)]; services.pass-secret-service.extraArgs = optional (cfg.storePath != null) "--path=${cfg.storePath}"; @@ -48,7 +44,7 @@ in AssertFileIsExecutable = "${cfg.package}/bin/pass_secret_service"; Description = "Pass libsecret service"; Documentation = "https://github.com/mdellweg/pass_secret_service"; - PartOf = [ "default.target" ]; + PartOf = ["default.target"]; }; Service = { @@ -56,7 +52,7 @@ in }; Install = { - WantedBy = [ "default.target" ]; + WantedBy = ["default.target"]; }; }; }; diff --git a/modules/home-manager/rgbdaemon.nix b/modules/home-manager/rgbdaemon.nix index 861f6c17..f99c2d4a 100644 --- a/modules/home-manager/rgbdaemon.nix +++ b/modules/home-manager/rgbdaemon.nix @@ -4,12 +4,9 @@ config, ... }: -with lib; - -let +with lib; let cfg = config.services.rgbdaemon; -in -{ +in { options.services.rgbdaemon = { enable = mkOption { type = types.bool; @@ -52,17 +49,16 @@ in ''; }; }; - colors = - let - mkColorOption = name: { - inherit name; - value = mkOption { - type = types.strMatching "[a-fA-F0-9]{6}"; - description = "${name} color."; - default = "ffffff"; - }; + colors = let + mkColorOption = name: { + inherit name; + value = mkOption { + type = types.strMatching "[a-fA-F0-9]{6}"; + description = "${name} color."; + default = "ffffff"; }; - in + }; + in listToAttrs ( map mkColorOption [ "background" @@ -86,7 +82,7 @@ in highlighted = mkOption { type = types.listOf types.str; description = "Always highlighted mouse keys"; - default = [ ]; + default = []; }; }; keyboard = { @@ -98,7 +94,7 @@ in highlighted = mkOption { type = types.listOf types.str; description = "Always highlighted keyboard keys"; - default = [ ]; + default = []; }; }; }; @@ -134,7 +130,7 @@ in Restart = "always"; }; Install = { - WantedBy = [ "graphical-session.target" ]; + WantedBy = ["graphical-session.target"]; }; }; }; diff --git a/modules/home-manager/shellcolor.nix b/modules/home-manager/shellcolor.nix index bb3ac184..da1f972f 100644 --- a/modules/home-manager/shellcolor.nix +++ b/modules/home-manager/shellcolor.nix @@ -3,9 +3,7 @@ lib, pkgs, ... -}: - -let +}: let cfg = config.programs.shellcolor; package = pkgs.shellcolord; @@ -13,8 +11,7 @@ let ${key}=${value} ''; renderSettings = settings: lib.concatStrings (lib.mapAttrsToList renderSetting settings); -in -{ +in { options.programs.shellcolor = { enable = lib.mkEnableOption "shellcolor"; @@ -57,7 +54,7 @@ in settings = lib.mkOption { type = lib.types.attrsOf lib.types.str; - default = { }; + default = {}; example = lib.literalExpression '' { base00 = "000000"; @@ -72,9 +69,9 @@ in }; config = lib.mkIf cfg.enable { - home.packages = [ package ]; + home.packages = [package]; - xdg.configFile."shellcolor.conf" = lib.mkIf (cfg.settings != { }) { + xdg.configFile."shellcolor.conf" = lib.mkIf (cfg.settings != {}) { text = renderSettings cfg.settings; onChange = '' timeout 1 ${package}/bin/shellcolor apply || true diff --git a/modules/home-manager/wallpaper.nix b/modules/home-manager/wallpaper.nix index 49b47d1e..6ca48e05 100644 --- a/modules/home-manager/wallpaper.nix +++ b/modules/home-manager/wallpaper.nix @@ -1,8 +1,6 @@ -{ lib, ... }: -let +{lib, ...}: let inherit (lib) types mkOption; -in -{ +in { options.wallpaper = mkOption { type = types.path; default = ""; diff --git a/modules/home-manager/xpo.nix b/modules/home-manager/xpo.nix index c1400aed..51f52cc2 100644 --- a/modules/home-manager/xpo.nix +++ b/modules/home-manager/xpo.nix @@ -3,12 +3,10 @@ pkgs, lib, ... -}: -let +}: let cfg = config.programs.xpo; package = pkgs.xpo; -in -{ +in { options.programs.xpo = { enable = lib.mkEnableOption "xpo"; @@ -23,7 +21,7 @@ in config = lib.mkIf cfg.enable { home = { - packages = [ package ]; + packages = [package]; sessionVariables.XPO_SERVER = lib.optionalString (cfg.defaultServer != null) cfg.defaultServer; }; }; diff --git a/modules/nixos/default.nix b/modules/nixos/default.nix index 77f829a4..e992bc55 100644 --- a/modules/nixos/default.nix +++ b/modules/nixos/default.nix @@ -1 +1 @@ -{ satisfactory = import ./satisfactory.nix; } +{satisfactory = import ./satisfactory.nix;} diff --git a/modules/nixos/satisfactory.nix b/modules/nixos/satisfactory.nix index bb080905..df2bbab8 100644 --- a/modules/nixos/satisfactory.nix +++ b/modules/nixos/satisfactory.nix @@ -4,12 +4,9 @@ pkgs, ... }: - -with lib; -let +with lib; let cfg = config.services.satisfactory-server; -in -{ +in { options.services.satisfactory-server = { enable = mkEnableOption "Satisfactory Dedicated Server"; @@ -44,30 +41,27 @@ in }; config = mkIf cfg.enable { + systemd.services.satisfactory-server = let + steamcmd = "${cfg.steamcmdPackage}/bin/steamcmd"; + steam-run = "${pkgs.steam-run}/bin/steam-run"; + in { + description = "Satisfactory Dedicated Server"; + wantedBy = ["multi-user.target"]; + after = ["network.target"]; - systemd.services.satisfactory-server = - let - steamcmd = "${cfg.steamcmdPackage}/bin/steamcmd"; - steam-run = "${pkgs.steam-run}/bin/steam-run"; - in - { - description = "Satisfactory Dedicated Server"; - wantedBy = [ "multi-user.target" ]; - after = [ "network.target" ]; - - serviceConfig = { - TimeoutSec = "15min"; - ExecStart = "${steam-run} ${cfg.dataDir}/FactoryServer.sh ${cfg.launchOptions}"; - Restart = "always"; - User = "satisfactory"; - WorkingDirectory = cfg.dataDir; - }; - - preStart = '' - ${steamcmd} +force_install_dir "${cfg.dataDir}" +login anonymous +app_update 1690800 validate +quit - ''; + serviceConfig = { + TimeoutSec = "15min"; + ExecStart = "${steam-run} ${cfg.dataDir}/FactoryServer.sh ${cfg.launchOptions}"; + Restart = "always"; + User = "satisfactory"; + WorkingDirectory = cfg.dataDir; }; + preStart = '' + ${steamcmd} +force_install_dir "${cfg.dataDir}" +login anonymous +app_update 1690800 validate +quit + ''; + }; + users.users.satisfactory = { description = "Satisfactory server service user"; home = cfg.dataDir; @@ -75,7 +69,7 @@ in isSystemUser = true; group = "satisfactory"; }; - users.groups.satisfactory = { }; + users.groups.satisfactory = {}; networking.firewall = mkIf cfg.openFirewall { allowedUDPPorts = [ diff --git a/overlays/default.nix b/overlays/default.nix index 4e602be0..4256d335 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,53 +1,59 @@ -{ outputs, inputs }: -let - addPatches = - pkg: patches: - pkg.overrideAttrs (oldAttrs: { - patches = (oldAttrs.patches or [ ]) ++ patches; - }); -in { + outputs, + inputs, +}: let + addPatches = pkg: patches: + pkg.overrideAttrs (oldAttrs: { + patches = (oldAttrs.patches or []) ++ patches; + }); +in { # For every flake input, aliases 'pkgs.inputs.${flake}' to # 'inputs.${flake}.packages.${pkgs.system}' or # 'inputs.${flake}.legacyPackages.${pkgs.system}' flake-inputs = final: _: { - inputs = builtins.mapAttrs ( - _: flake: - let - legacyPackages = ((flake.legacyPackages or { }).${final.system} or { }); - packages = ((flake.packages or { }).${final.system} or { }); - in - if legacyPackages != { } then legacyPackages else packages - ) inputs; + inputs = + builtins.mapAttrs ( + _: flake: let + legacyPackages = (flake.legacyPackages or {}).${final.system} or {}; + packages = (flake.packages or {}).${final.system} or {}; + in + if legacyPackages != {} + then legacyPackages + else packages + ) + inputs; }; # Adds my custom packages - additions = - final: prev: - import ../pkgs { pkgs = final; } + additions = final: prev: + import ../pkgs {pkgs = final;} // { - formats = (prev.formats or { }) // import ../pkgs/formats { pkgs = final; }; - vimPlugins = (prev.vimPlugins or { }) // import ../pkgs/vim-plugins { pkgs = final; }; + formats = (prev.formats or {}) // import ../pkgs/formats {pkgs = final;}; + vimPlugins = (prev.vimPlugins or {}) // import ../pkgs/vim-plugins {pkgs = final;}; }; # Modifies existing packages modifications = final: prev: { - vimPlugins = prev.vimPlugins // { - vim-numbertoggle = addPatches prev.vimPlugins.vim-numbertoggle [ - ./vim-numbertoggle-command-mode.patch - ]; - }; + vimPlugins = + prev.vimPlugins + // { + vim-numbertoggle = addPatches prev.vimPlugins.vim-numbertoggle [ + ./vim-numbertoggle-command-mode.patch + ]; + }; - passExtensions = prev.passExtensions // { - # https://github.com/tadfisher/pass-otp/pull/173 - pass-otp = addPatches prev.passExtensions.pass-otp [ ./pass-otp-fix-completion.patch ]; - }; + passExtensions = + prev.passExtensions + // { + # https://github.com/tadfisher/pass-otp/pull/173 + pass-otp = addPatches prev.passExtensions.pass-otp [./pass-otp-fix-completion.patch]; + }; # https://github.com/mdellweg/pass_secret_service/pull/37 - pass-secret-service = addPatches prev.pass-secret-service [ ./pass-secret-service-native.diff ]; + pass-secret-service = addPatches prev.pass-secret-service [./pass-secret-service-native.diff]; # https://github.com/NixOS/nix/issues/7098 - hydra_unstable = addPatches prev.hydra_unstable [ ./hydra-restrict-eval.diff ]; + hydra_unstable = addPatches prev.hydra_unstable [./hydra-restrict-eval.diff]; pfetch = prev.pfetch.overrideAttrs (oldAttrs: { version = "unstable-2021-12-10"; @@ -58,11 +64,11 @@ in sha256 = "sha256-9n5w93PnSxF53V12iRqLyj0hCrJ3jRibkw8VK3tFDvo="; }; # Add term option, rename de to desktop, add scheme option - patches = (oldAttrs.patches or [ ]) ++ [ ./pfetch.patch ]; + patches = (oldAttrs.patches or []) ++ [./pfetch.patch]; }); # Sane default values and crash avoidance (https://github.com/k-vernooy/trekscii/pull/1) - trekscii = addPatches prev.trekscii [ ./trekscii.patch ]; + trekscii = addPatches prev.trekscii [./trekscii.patch]; scgit = prev.cgit-pink.overrideAttrs (_: { pname = "scgit"; diff --git a/pkgs/default.nix b/pkgs/default.nix index 58d00cb3..5cb25109 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -1,28 +1,24 @@ -{ - pkgs ? import { }, -}: -rec { - +{pkgs ? import {}}: rec { # Packages with an actual source - rgbdaemon = pkgs.callPackage ./rgbdaemon { }; - shellcolord = pkgs.callPackage ./shellcolord { }; - trekscii = pkgs.callPackage ./trekscii { }; - frcon = pkgs.callPackage ./frcon { }; + rgbdaemon = pkgs.callPackage ./rgbdaemon {}; + shellcolord = pkgs.callPackage ./shellcolord {}; + trekscii = pkgs.callPackage ./trekscii {}; + frcon = pkgs.callPackage ./frcon {}; # Personal scripts - nix-inspect = pkgs.callPackage ./nix-inspect { }; - minicava = pkgs.callPackage ./minicava { }; - pass-wofi = pkgs.callPackage ./pass-wofi { }; - primary-xwayland = pkgs.callPackage ./primary-xwayland { }; - wl-mirror-pick = pkgs.callPackage ./wl-mirror-pick { }; - lyrics = pkgs.python3Packages.callPackage ./lyrics { }; - xpo = pkgs.callPackage ./xpo { }; - tly = pkgs.callPackage ./tly { }; - hyprslurp = pkgs.callPackage ./hyprslurp { }; + nix-inspect = pkgs.callPackage ./nix-inspect {}; + minicava = pkgs.callPackage ./minicava {}; + pass-wofi = pkgs.callPackage ./pass-wofi {}; + primary-xwayland = pkgs.callPackage ./primary-xwayland {}; + wl-mirror-pick = pkgs.callPackage ./wl-mirror-pick {}; + lyrics = pkgs.python3Packages.callPackage ./lyrics {}; + xpo = pkgs.callPackage ./xpo {}; + tly = pkgs.callPackage ./tly {}; + hyprslurp = pkgs.callPackage ./hyprslurp {}; # My slightly customized plymouth theme, just makes the blue outline white - plymouth-spinner-monochrome = pkgs.callPackage ./plymouth-spinner-monochrome { }; + plymouth-spinner-monochrome = pkgs.callPackage ./plymouth-spinner-monochrome {}; # My wallpaper collection - wallpapers = pkgs.callPackage ./wallpapers { }; + wallpapers = pkgs.callPackage ./wallpapers {}; } diff --git a/pkgs/formats/default.nix b/pkgs/formats/default.nix index 941fac36..8565c178 100644 --- a/pkgs/formats/default.nix +++ b/pkgs/formats/default.nix @@ -1,23 +1,22 @@ -{ pkgs }: -{ - gzipJson = - { }: - { - generate = - name: value: - pkgs.callPackage ( - { runCommand, gzip }: +{pkgs}: { + gzipJson = {}: { + generate = name: value: + pkgs.callPackage ( + { + runCommand, + gzip, + }: runCommand name - { - nativeBuildInputs = [ gzip ]; - value = builtins.toJSON value; - passAsFile = [ "value" ]; - } - '' - gzip "$valuePath" -c > "$out" - '' - ) { }; + { + nativeBuildInputs = [gzip]; + value = builtins.toJSON value; + passAsFile = ["value"]; + } + '' + gzip "$valuePath" -c > "$out" + '' + ) {}; - type = (pkgs.formats.json { }).type; - }; + type = (pkgs.formats.json {}).type; + }; } diff --git a/pkgs/frcon/default.nix b/pkgs/frcon/default.nix index 8212c5a3..0b425b68 100644 --- a/pkgs/frcon/default.nix +++ b/pkgs/frcon/default.nix @@ -3,7 +3,6 @@ rustPlatform, fetchFromGitHub, }: - rustPlatform.buildRustPackage { pname = "frcon"; version = "unstable-2024-03-07"; diff --git a/pkgs/lyrics/default.nix b/pkgs/lyrics/default.nix index f6467293..16df3939 100644 --- a/pkgs/lyrics/default.nix +++ b/pkgs/lyrics/default.nix @@ -3,7 +3,6 @@ buildPythonPackage, dbus-python, }: - buildPythonPackage rec { pname = "lyrics"; version = "1.5.0"; @@ -15,9 +14,9 @@ buildPythonPackage rec { hash = "sha256-61l4W7X66WHm1k/M/JM55dNj+mMh4R9ohKbByk9dIVA="; }; - propagatedBuildInputs = [ dbus-python ]; + propagatedBuildInputs = [dbus-python]; doCheck = false; - patches = [ ./fix-config-in-build-phase.diff ]; + patches = [./fix-config-in-build-phase.diff]; } diff --git a/pkgs/minicava/default.nix b/pkgs/minicava/default.nix index 6e9f5efa..249cd8a1 100644 --- a/pkgs/minicava/default.nix +++ b/pkgs/minicava/default.nix @@ -6,39 +6,37 @@ cava, gnused, }: - with lib; + stdenv.mkDerivation { + pname = "minicava"; + version = "0.1"; + src = fetchFromGitHub { + owner = "Misterio77"; + repo = "minicava"; + rev = "c24681fe7c91548e0fb4f55a1882b0145c48d097"; + sha256 = "sha256-t+NHZP2I7clDHrnCDdYMaLcua7inVKm2t3aYZ3uBAlk="; + }; -stdenv.mkDerivation { - pname = "minicava"; - version = "0.1"; - src = fetchFromGitHub { - owner = "Misterio77"; - repo = "minicava"; - rev = "c24681fe7c91548e0fb4f55a1882b0145c48d097"; - sha256 = "sha256-t+NHZP2I7clDHrnCDdYMaLcua7inVKm2t3aYZ3uBAlk="; - }; + dontBuild = true; + dontConfigure = true; - dontBuild = true; - dontConfigure = true; + nativeBuildInputs = [makeWrapper]; - nativeBuildInputs = [ makeWrapper ]; - - installPhase = '' - install -Dm 0755 minicava.sh $out/bin/minicava - wrapProgram $out/bin/minicava --set PATH \ - "${ + installPhase = '' + install -Dm 0755 minicava.sh $out/bin/minicava + wrapProgram $out/bin/minicava --set PATH \ + "${ makeBinPath [ cava gnused ] }" - ''; + ''; - meta = { - description = "A miniature cava sound visualizer"; - homepage = "https://github.com/Misterio77/minicava"; - license = licenses.mit; - platforms = platforms.all; - }; -} + meta = { + description = "A miniature cava sound visualizer"; + homepage = "https://github.com/Misterio77/minicava"; + license = licenses.mit; + platforms = platforms.all; + }; + } diff --git a/pkgs/pass-wofi/default.nix b/pkgs/pass-wofi/default.nix index 5a0cb6bb..5ea069f1 100644 --- a/pkgs/pass-wofi/default.nix +++ b/pkgs/pass-wofi/default.nix @@ -13,24 +13,22 @@ gnused, coreutils, }: - with lib; + stdenv.mkDerivation { + name = "pass-wofi"; + version = "1.0"; + src = ./pass-wofi.sh; -stdenv.mkDerivation { - name = "pass-wofi"; - version = "1.0"; - src = ./pass-wofi.sh; + nativeBuildInputs = [makeWrapper]; - nativeBuildInputs = [ makeWrapper ]; + dontUnpack = true; + dontBuild = true; + dontConfigure = true; - dontUnpack = true; - dontBuild = true; - dontConfigure = true; - - installPhase = '' - install -Dm 0755 $src $out/bin/pass-wofi - wrapProgram $out/bin/pass-wofi --prefix PATH \ - "${ + installPhase = '' + install -Dm 0755 $src $out/bin/pass-wofi + wrapProgram $out/bin/pass-wofi --prefix PATH \ + "${ makeBinPath [ pass jq @@ -42,12 +40,12 @@ stdenv.mkDerivation { coreutils ] }" - ''; + ''; - meta = { - description = "A wofi graphical menu for pass"; - license = licenses.mit; - platforms = platforms.all; - mainProgram = "pass-wofi"; - }; -} + meta = { + description = "A wofi graphical menu for pass"; + license = licenses.mit; + platforms = platforms.all; + mainProgram = "pass-wofi"; + }; + } diff --git a/pkgs/primary-xwayland/default.nix b/pkgs/primary-xwayland/default.nix index 60bcfe98..eae7e270 100644 --- a/pkgs/primary-xwayland/default.nix +++ b/pkgs/primary-xwayland/default.nix @@ -12,18 +12,17 @@ xrandr ]; - text = - '' - if [ "$#" -ge 1 ] && [ "$1" == "largest" ]; then - output=$(xrandr --listmonitors | tail -n +2 | awk '{printf "%s %s\n", $3, $4}' | sort | tail -1 | cut -d ' ' -f2) - else - selected=$(slurp -f "%wx%h+%x+%y" -o) - output=$(xrandr | grep "$selected" | cut -d ' ' -f1) - fi + text = '' + if [ "$#" -ge 1 ] && [ "$1" == "largest" ]; then + output=$(xrandr --listmonitors | tail -n +2 | awk '{printf "%s %s\n", $3, $4}' | sort | tail -1 | cut -d ' ' -f2) + else + selected=$(slurp -f "%wx%h+%x+%y" -o) + output=$(xrandr | grep "$selected" | cut -d ' ' -f1) + fi - echo "Setting $output" - xrandr --output "$output" --primary - ''; + echo "Setting $output" + xrandr --output "$output" --primary + ''; }) // { meta = with lib; { diff --git a/pkgs/rgbdaemon/default.nix b/pkgs/rgbdaemon/default.nix index c0db21d9..5bb96c5c 100644 --- a/pkgs/rgbdaemon/default.nix +++ b/pkgs/rgbdaemon/default.nix @@ -11,26 +11,23 @@ pulseaudio, playerctl, }: - with lib; + (writeShellApplication { + name = "rgbdaemon"; + runtimeInputs = [ + findutils + gnugrep + procps + gawk + coreutils + openrgb + pastel + pulseaudio + playerctl + ]; -(writeShellApplication { - name = "rgbdaemon"; - runtimeInputs = [ - findutils - gnugrep - procps - gawk - coreutils - openrgb - pastel - pulseaudio - playerctl - ]; - - checkPhase = ""; - text = - '' + checkPhase = ""; + text = '' set +o nounset base_colors() { @@ -177,10 +174,10 @@ with lib; startup ''; -}) -// { - meta = with lib; { - license = licenses.mit; - platforms = platforms.all; - }; -} + }) + // { + meta = with lib; { + license = licenses.mit; + platforms = platforms.all; + }; + } diff --git a/pkgs/shellcolord/default.nix b/pkgs/shellcolord/default.nix index b0eda3f6..c4c904cd 100644 --- a/pkgs/shellcolord/default.nix +++ b/pkgs/shellcolord/default.nix @@ -2,27 +2,26 @@ lib, stdenv, fetchFromSourcehut, -}: -let +}: let pname = "shellcolord"; in -stdenv.mkDerivation { - inherit pname; - version = "0.1"; - src = fetchFromSourcehut { - owner = "~misterio"; - repo = pname; - rev = "c761072952bba8bdc21b906fdc941b9ae5ac5432"; - sha256 = "sha256-SLMAZy9UxQOA+2YhnryJ5ZvMXOf/Bxv0E8gIbP32XfE="; - }; + stdenv.mkDerivation { + inherit pname; + version = "0.1"; + src = fetchFromSourcehut { + owner = "~misterio"; + repo = pname; + rev = "c761072952bba8bdc21b906fdc941b9ae5ac5432"; + sha256 = "sha256-SLMAZy9UxQOA+2YhnryJ5ZvMXOf/Bxv0E8gIbP32XfE="; + }; - makeFlags = [ "PREFIX=$(out)" ]; + makeFlags = ["PREFIX=$(out)"]; - meta = with lib; { - description = "A daemon that themes your shell remotely"; - homepage = "https://git.sr.ht/~misterio/shellcolord"; - license = licenses.unlicense; - platforms = platforms.all; - maintainers = with maintainers; [ misterio77 ]; - }; -} + meta = with lib; { + description = "A daemon that themes your shell remotely"; + homepage = "https://git.sr.ht/~misterio/shellcolord"; + license = licenses.unlicense; + platforms = platforms.all; + maintainers = with maintainers; [misterio77]; + }; + } diff --git a/pkgs/tly/default.nix b/pkgs/tly/default.nix index 1af2df73..7cf1ff9e 100644 --- a/pkgs/tly/default.nix +++ b/pkgs/tly/default.nix @@ -1,6 +1,5 @@ # Tally counter, also used as stopwatch # tly [list-name] - { lib, writeShellApplication, diff --git a/pkgs/trekscii/default.nix b/pkgs/trekscii/default.nix index 64edd109..7f04022f 100644 --- a/pkgs/trekscii/default.nix +++ b/pkgs/trekscii/default.nix @@ -2,26 +2,25 @@ lib, stdenv, fetchFromGitHub, -}: -let +}: let pname = "trekscii"; in -stdenv.mkDerivation { - inherit pname; - version = "unstable-2022-06-27"; + stdenv.mkDerivation { + inherit pname; + version = "unstable-2022-06-27"; - src = fetchFromGitHub { - owner = "k-vernooy"; - repo = pname; - rev = "8b51971c4c62f49f886d59f2c8445ce8734b00e8"; - hash = "sha256-Mn3wasplwXsDCBEpHLqdh0G+SqYIirj7lKvM3VehPH0="; - }; + src = fetchFromGitHub { + owner = "k-vernooy"; + repo = pname; + rev = "8b51971c4c62f49f886d59f2c8445ce8734b00e8"; + hash = "sha256-Mn3wasplwXsDCBEpHLqdh0G+SqYIirj7lKvM3VehPH0="; + }; - installPhase = '' - install -Dm 0755 bin/trekscii $out/bin/trekscii - ''; + installPhase = '' + install -Dm 0755 bin/trekscii $out/bin/trekscii + ''; - meta = with lib; { - platforms = platforms.all; - }; -} + meta = with lib; { + platforms = platforms.all; + }; + } diff --git a/pkgs/vim-plugins/default.nix b/pkgs/vim-plugins/default.nix index dc0b3f63..caa153f9 100644 --- a/pkgs/vim-plugins/default.nix +++ b/pkgs/vim-plugins/default.nix @@ -1,8 +1,7 @@ -{ pkgs }: -{ - gemini-vim-syntax = pkgs.callPackage ./gemini-vim-syntax { }; - vim-syntax-shakespeare = pkgs.callPackage ./vim-syntax-shakespeare { }; - vim-medieval = pkgs.callPackage ./vim-medieval { }; - mermaid-vim = pkgs.callPackage ./mermaid-vim { }; - nvim-femaco = pkgs.callPackage ./nvim-femaco { }; +{pkgs}: { + gemini-vim-syntax = pkgs.callPackage ./gemini-vim-syntax {}; + vim-syntax-shakespeare = pkgs.callPackage ./vim-syntax-shakespeare {}; + vim-medieval = pkgs.callPackage ./vim-medieval {}; + mermaid-vim = pkgs.callPackage ./mermaid-vim {}; + nvim-femaco = pkgs.callPackage ./nvim-femaco {}; } diff --git a/pkgs/vim-plugins/gemini-vim-syntax/default.nix b/pkgs/vim-plugins/gemini-vim-syntax/default.nix index 9b1cf293..74bd33ec 100644 --- a/pkgs/vim-plugins/gemini-vim-syntax/default.nix +++ b/pkgs/vim-plugins/gemini-vim-syntax/default.nix @@ -1,17 +1,19 @@ -{ vimUtils, fetchFromGitea }: -let +{ + vimUtils, + fetchFromGitea, +}: let pname = "gemini-vim-syntax"; in -vimUtils.buildVimPlugin { - inherit pname; - version = "2021-11-15"; - dontBuild = true; - src = fetchFromGitea { - domain = "tildegit.org"; - owner = "sloum"; - repo = pname; - rev = "596d1f36b386e5b2cc1af4f2f8285134626878d1"; - sha256 = "sha256-4Ma74KdAWtr00NNV0DbDL0SwY6s4d2Ok1HaUvVzCrMA="; - }; - meta.homepage = "https://tildegit.org/sloum/${pname}"; -} + vimUtils.buildVimPlugin { + inherit pname; + version = "2021-11-15"; + dontBuild = true; + src = fetchFromGitea { + domain = "tildegit.org"; + owner = "sloum"; + repo = pname; + rev = "596d1f36b386e5b2cc1af4f2f8285134626878d1"; + sha256 = "sha256-4Ma74KdAWtr00NNV0DbDL0SwY6s4d2Ok1HaUvVzCrMA="; + }; + meta.homepage = "https://tildegit.org/sloum/${pname}"; + } diff --git a/pkgs/vim-plugins/mermaid-vim/default.nix b/pkgs/vim-plugins/mermaid-vim/default.nix index 98be12f8..a2274024 100644 --- a/pkgs/vim-plugins/mermaid-vim/default.nix +++ b/pkgs/vim-plugins/mermaid-vim/default.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPlugin { pname = "mermaid-vim"; version = "2022-02-15"; diff --git a/pkgs/vim-plugins/nvim-femaco/default.nix b/pkgs/vim-plugins/nvim-femaco/default.nix index 4001e70a..c1b4dae3 100644 --- a/pkgs/vim-plugins/nvim-femaco/default.nix +++ b/pkgs/vim-plugins/nvim-femaco/default.nix @@ -1,4 +1,7 @@ -{ vimUtils, fetchFromGitHub }: +{ + vimUtils, + fetchFromGitHub, +}: vimUtils.buildVimPlugin { pname = "nvim-femaco"; version = "2022-10-10"; diff --git a/pkgs/vim-plugins/vim-medieval/default.nix b/pkgs/vim-plugins/vim-medieval/default.nix index d14b72e4..929375c9 100644 --- a/pkgs/vim-plugins/vim-medieval/default.nix +++ b/pkgs/vim-plugins/vim-medieval/default.nix @@ -1,16 +1,18 @@ -{ vimUtils, fetchFromGitHub }: -let +{ + vimUtils, + fetchFromGitHub, +}: let pname = "vim-medieval"; in -vimUtils.buildVimPlugin { - inherit pname; - version = "2022-02-07"; - dontBuild = true; - src = fetchFromGitHub { - owner = "gpanders"; - repo = "${pname}"; - rev = "029ba76340cc51d481d5fa0ad19e25b0ee13b3c5"; - sha256 = "sha256-JYkevNxW/RYLVfxXSGYvVSQwmjk2zSvzxLVTbR0lzek="; - }; - patches = [ ./preview-instead-of-scratch.patch ]; -} + vimUtils.buildVimPlugin { + inherit pname; + version = "2022-02-07"; + dontBuild = true; + src = fetchFromGitHub { + owner = "gpanders"; + repo = "${pname}"; + rev = "029ba76340cc51d481d5fa0ad19e25b0ee13b3c5"; + sha256 = "sha256-JYkevNxW/RYLVfxXSGYvVSQwmjk2zSvzxLVTbR0lzek="; + }; + patches = [./preview-instead-of-scratch.patch]; + } diff --git a/pkgs/vim-plugins/vim-syntax-shakespeare/default.nix b/pkgs/vim-plugins/vim-syntax-shakespeare/default.nix index 5d9edb6d..1f615408 100644 --- a/pkgs/vim-plugins/vim-syntax-shakespeare/default.nix +++ b/pkgs/vim-plugins/vim-syntax-shakespeare/default.nix @@ -1,16 +1,18 @@ -{ vimUtils, fetchFromGitHub }: -let +{ + vimUtils, + fetchFromGitHub, +}: let pname = "vim-syntax-shakespeare"; in -vimUtils.buildVimPlugin { - inherit pname; - version = "2021-12-14"; - dontBuild = true; - src = fetchFromGitHub { - owner = "pbrisbin"; - repo = pname; - rev = "2f4f61eae55b8f1319ce3a086baf9b5ab57743f3"; - sha256 = "sha256-sdCXJOvB+vJE0ir+qsT/u1cHNxrksMnqeQi4D/Vg6UA="; - }; - meta.homepage = "https://github.com/pbrisbin/${pname}"; -} + vimUtils.buildVimPlugin { + inherit pname; + version = "2021-12-14"; + dontBuild = true; + src = fetchFromGitHub { + owner = "pbrisbin"; + repo = pname; + rev = "2f4f61eae55b8f1319ce3a086baf9b5ab57743f3"; + sha256 = "sha256-sdCXJOvB+vJE0ir+qsT/u1cHNxrksMnqeQi4D/Vg6UA="; + }; + meta.homepage = "https://github.com/pbrisbin/${pname}"; + } diff --git a/pkgs/wallpapers/default.nix b/pkgs/wallpapers/default.nix index 50ddf0ac..6d884ec0 100644 --- a/pkgs/wallpapers/default.nix +++ b/pkgs/wallpapers/default.nix @@ -1,4 +1,7 @@ -{ lib, fetchurl }: +{ + lib, + fetchurl, +}: lib.listToAttrs ( map (wallpaper: { inherit (wallpaper) name; diff --git a/pkgs/wl-mirror-pick/default.nix b/pkgs/wl-mirror-pick/default.nix index dcd0e1e0..53b0b855 100644 --- a/pkgs/wl-mirror-pick/default.nix +++ b/pkgs/wl-mirror-pick/default.nix @@ -12,11 +12,10 @@ wl-mirror ]; - text = - '' - output=$(slurp -f "%o" -o) - wl-mirror "$output" - ''; + text = '' + output=$(slurp -f "%o" -o) + wl-mirror "$output" + ''; }) // { meta = with lib; { diff --git a/pkgs/xpo/default.nix b/pkgs/xpo/default.nix index ce05ae32..b4e6ffa4 100644 --- a/pkgs/xpo/default.nix +++ b/pkgs/xpo/default.nix @@ -1,6 +1,5 @@ # Exposes a port through SSH # xpo [local port] [remote host] [remote port] - { lib, writeShellApplication, @@ -8,7 +7,7 @@ }: (writeShellApplication { name = "xpo"; - runtimeInputs = [ openssh ]; + runtimeInputs = [openssh]; text = builtins.readFile ./xpo.sh; }) // { diff --git a/shell.nix b/shell.nix index 5c435c45..6c9efb1a 100644 --- a/shell.nix +++ b/shell.nix @@ -1,17 +1,17 @@ # Shell for bootstrapping flake-enabled nix and other tooling { - pkgs ? # If pkgs is not defined, instanciate nixpkgs from locked commit - let - lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; - nixpkgs = fetchTarball { - url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; - sha256 = lock.narHash; - }; - in - import nixpkgs { overlays = [ ]; }, + pkgs ? + # If pkgs is not defined, instanciate nixpkgs from locked commit + let + lock = (builtins.fromJSON (builtins.readFile ./flake.lock)).nodes.nixpkgs.locked; + nixpkgs = fetchTarball { + url = "https://github.com/nixos/nixpkgs/archive/${lock.rev}.tar.gz"; + sha256 = lock.narHash; + }; + in + import nixpkgs {overlays = [];}, ... -}: -{ +}: { default = pkgs.mkShell { NIX_CONFIG = "extra-experimental-features = nix-command flakes repl-flake"; nativeBuildInputs = with pkgs; [ diff --git a/templates/c/default.nix b/templates/c/default.nix index 677bb4eb..e132eb0d 100644 --- a/templates/c/default.nix +++ b/templates/c/default.nix @@ -1,9 +1,8 @@ -{ clangStdenv }: - +{clangStdenv}: clangStdenv.mkDerivation { pname = "foo-bar"; version = "0.1.0"; src = ./.; - makeFlags = [ "PREFIX=$(out)" ]; + makeFlags = ["PREFIX=$(out)"]; } diff --git a/templates/c/flake.nix b/templates/c/flake.nix index 333e0ba4..fcf43faf 100644 --- a/templates/c/flake.nix +++ b/templates/c/flake.nix @@ -2,32 +2,32 @@ description = "Foo Bar C/C++ Project"; nixConfig = { - extra-substituters = [ "https://cache.m7.rs" ]; - extra-trusted-public-keys = [ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ]; + extra-substituters = ["https://cache.m7.rs"]; + extra-trusted-public-keys = ["cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg="]; }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; }; - outputs = - { self, nixpkgs }: - let - forAllSystems = nixpkgs.lib.genAttrs [ - "x86_64-linux" - "aarch64-linux" - ]; - pkgsFor = nixpkgs.legacyPackages; - in - rec { - packages = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./default.nix { }; - }); + outputs = { + self, + nixpkgs, + }: let + forAllSystems = nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + ]; + pkgsFor = nixpkgs.legacyPackages; + in rec { + packages = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./default.nix {}; + }); - devShells = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./shell.nix { }; - }); + devShells = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./shell.nix {}; + }); - hydraJobs = packages; - }; + hydraJobs = packages; + }; } diff --git a/templates/c/shell.nix b/templates/c/shell.nix index 4e6883ef..16b5dd98 100644 --- a/templates/c/shell.nix +++ b/templates/c/shell.nix @@ -1,8 +1,9 @@ -{ callPackage, clang-tools }: - -let - mainPkg = callPackage ./default.nix { }; +{ + callPackage, + clang-tools, +}: let + mainPkg = callPackage ./default.nix {}; in -mainPkg.overrideAttrs (oa: { - nativeBuildInputs = [ clang-tools ] ++ (oa.nativeBuildInputs or [ ]); -}) + mainPkg.overrideAttrs (oa: { + nativeBuildInputs = [clang-tools] ++ (oa.nativeBuildInputs or []); + }) diff --git a/templates/haskell/default.nix b/templates/haskell/default.nix index 5df881b7..6ff6ce25 100644 --- a/templates/haskell/default.nix +++ b/templates/haskell/default.nix @@ -1,3 +1,2 @@ -{ haskellPackages }: - -haskellPackages.callCabal2nix "foo-bar" ./. { } +{haskellPackages}: +haskellPackages.callCabal2nix "foo-bar" ./. {} diff --git a/templates/haskell/flake.nix b/templates/haskell/flake.nix index aa25715d..7341e7ab 100644 --- a/templates/haskell/flake.nix +++ b/templates/haskell/flake.nix @@ -2,32 +2,32 @@ description = "Foo Bar Haskell Project"; nixConfig = { - extra-substituters = [ "https://cache.m7.rs" ]; - extra-trusted-public-keys = [ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ]; + extra-substituters = ["https://cache.m7.rs"]; + extra-trusted-public-keys = ["cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg="]; }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; }; - outputs = - { self, nixpkgs }: - let - forAllSystems = nixpkgs.lib.genAttrs [ - "x86_64-linux" - "aarch64-linux" - ]; - pkgsFor = nixpkgs.legacyPackages; - in - rec { - packages = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./default.nix { }; - }); + outputs = { + self, + nixpkgs, + }: let + forAllSystems = nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + ]; + pkgsFor = nixpkgs.legacyPackages; + in rec { + packages = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./default.nix {}; + }); - devShells = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./shell.nix { }; - }); + devShells = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./shell.nix {}; + }); - hydraJobs = packages; - }; + hydraJobs = packages; + }; } diff --git a/templates/haskell/shell.nix b/templates/haskell/shell.nix index c8e33c16..a6a5deb9 100644 --- a/templates/haskell/shell.nix +++ b/templates/haskell/shell.nix @@ -2,14 +2,14 @@ callPackage, haskell-language-server, cabal-install, -}: - -let - mainPkg = callPackage ./default.nix { }; +}: let + mainPkg = callPackage ./default.nix {}; in -mainPkg.overrideAttrs (oa: { - nativeBuildInputs = [ - cabal-install - haskell-language-server - ] ++ (oa.nativeBuildInputs or [ ]); -}) + mainPkg.overrideAttrs (oa: { + nativeBuildInputs = + [ + cabal-install + haskell-language-server + ] + ++ (oa.nativeBuildInputs or []); + }) diff --git a/templates/node/default.nix b/templates/node/default.nix index e1058cad..fb7934a3 100644 --- a/templates/node/default.nix +++ b/templates/node/default.nix @@ -1,5 +1,4 @@ -{ buildNpmPackage }: - +{buildNpmPackage}: buildNpmPackage { pname = "foo-bar"; version = "0.1.0"; diff --git a/templates/node/flake.nix b/templates/node/flake.nix index bc7a9b89..374cf583 100644 --- a/templates/node/flake.nix +++ b/templates/node/flake.nix @@ -2,32 +2,32 @@ description = "Foo Bar NodeJS Project"; nixConfig = { - extra-substituters = [ "https://cache.m7.rs" ]; - extra-trusted-public-keys = [ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ]; + extra-substituters = ["https://cache.m7.rs"]; + extra-trusted-public-keys = ["cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg="]; }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; }; - outputs = - { self, nixpkgs }: - let - forAllSystems = nixpkgs.lib.genAttrs [ - "x86_64-linux" - "aarch64-linux" - ]; - pkgsFor = nixpkgs.legacyPackages; - in - rec { - packages = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./default.nix { }; - }); + outputs = { + self, + nixpkgs, + }: let + forAllSystems = nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + ]; + pkgsFor = nixpkgs.legacyPackages; + in rec { + packages = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./default.nix {}; + }); - devShells = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./shell.nix { }; - }); + devShells = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./shell.nix {}; + }); - hydraJobs = packages; - }; + hydraJobs = packages; + }; } diff --git a/templates/node/shell.nix b/templates/node/shell.nix index 0a344c3d..b498bb0c 100644 --- a/templates/node/shell.nix +++ b/templates/node/shell.nix @@ -1,16 +1,19 @@ -{ callPackage, writeShellScriptBin }: - -let - mainPkg = callPackage ./default.nix { }; +{ + callPackage, + writeShellScriptBin, +}: let + mainPkg = callPackage ./default.nix {}; npxAlias = name: writeShellScriptBin name "npx ${name} \"$@\""; in -mainPkg.overrideAttrs (oa: { - nativeBuildInputs = [ - (npxAlias "tsc") - (npxAlias "tsserver") - ] ++ (oa.nativeBuildInputs or [ ]); + mainPkg.overrideAttrs (oa: { + nativeBuildInputs = + [ + (npxAlias "tsc") + (npxAlias "tsserver") + ] + ++ (oa.nativeBuildInputs or []); - shellHook = '' - npm install - ''; -}) + shellHook = '' + npm install + ''; + }) diff --git a/templates/rust/default.nix b/templates/rust/default.nix index 86cdc2ff..e20f9a1b 100644 --- a/templates/rust/default.nix +++ b/templates/rust/default.nix @@ -1,5 +1,4 @@ -{ rustPlatform }: - +{rustPlatform}: rustPlatform.buildRustPackage { pname = "foo-bar"; version = "0.1.0"; diff --git a/templates/rust/flake.nix b/templates/rust/flake.nix index 29c1d504..75ec9020 100644 --- a/templates/rust/flake.nix +++ b/templates/rust/flake.nix @@ -2,32 +2,32 @@ description = "Foo Bar Rust Project"; nixConfig = { - extra-substituters = [ "https://cache.m7.rs" ]; - extra-trusted-public-keys = [ "cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg=" ]; + extra-substituters = ["https://cache.m7.rs"]; + extra-trusted-public-keys = ["cache.m7.rs:kszZ/NSwE/TjhOcPPQ16IuUiuRSisdiIwhKZCxguaWg="]; }; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11"; }; - outputs = - { self, nixpkgs }: - let - forAllSystems = nixpkgs.lib.genAttrs [ - "x86_64-linux" - "aarch64-linux" - ]; - pkgsFor = nixpkgs.legacyPackages; - in - rec { - packages = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./default.nix { }; - }); + outputs = { + self, + nixpkgs, + }: let + forAllSystems = nixpkgs.lib.genAttrs [ + "x86_64-linux" + "aarch64-linux" + ]; + pkgsFor = nixpkgs.legacyPackages; + in rec { + packages = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./default.nix {}; + }); - devShells = forAllSystems (system: { - default = pkgsFor.${system}.callPackage ./shell.nix { }; - }); + devShells = forAllSystems (system: { + default = pkgsFor.${system}.callPackage ./shell.nix {}; + }); - hydraJobs = packages; - }; + hydraJobs = packages; + }; } diff --git a/templates/rust/shell.nix b/templates/rust/shell.nix index 5f6c6b28..6b184ad2 100644 --- a/templates/rust/shell.nix +++ b/templates/rust/shell.nix @@ -3,16 +3,16 @@ rust-analyzer, rustfmt, clippy, -}: - -let - mainPkg = callPackage ./default.nix { }; +}: let + mainPkg = callPackage ./default.nix {}; in -mainPkg.overrideAttrs (oa: { - nativeBuildInputs = [ - # Additional rust tooling - rust-analyzer - rustfmt - clippy - ] ++ (oa.nativeBuildInputs or [ ]); -}) + mainPkg.overrideAttrs (oa: { + nativeBuildInputs = + [ + # Additional rust tooling + rust-analyzer + rustfmt + clippy + ] + ++ (oa.nativeBuildInputs or []); + })