From 5948c1db1ce5c94b94eaa1a2de63517bb23614dc Mon Sep 17 00:00:00 2001 From: Franek Date: Sat, 3 May 2025 09:25:00 +0200 Subject: [PATCH] properly reformat all files --- flake.nix | 38 ++++++---- hosts/default.nix | 13 ++-- hosts/hulk/default.nix | 29 ++++---- hosts/hulk/modules.nix | 8 +-- modules/derivations/nordvpn.nix | 48 ++++++------- modules/home-manager/ags.nix | 89 +++++++++++++---------- modules/home-manager/apple-style.nix | 48 ++++++------- modules/home-manager/darkman.nix | 45 ++++++------ modules/home-manager/stylix.nix | 104 +++++++++++++-------------- modules/nixos/fingerprint.nix | 7 +- modules/nixos/nvidia-support.nix | 28 ++++---- profiles/hulk/default.nix | 22 +++--- profiles/hulk/fish-functions.nix | 20 +++--- profiles/hulk/modules.nix | 44 ++++++------ profiles/hulk/packages.nix | 23 +++--- shells/android.nix | 31 ++++---- shells/ddt4all.nix | 2 +- shells/rust.nix | 12 ++-- 18 files changed, 324 insertions(+), 287 deletions(-) diff --git a/flake.nix b/flake.nix index 3ad0e99..d20ef5b 100644 --- a/flake.nix +++ b/flake.nix @@ -10,16 +10,22 @@ ags.url = "github:Aylur/ags"; fingerprint-sensor.url = "github:ahbnr/nixos-06cb-009a-fingerprint-sensor/24.11"; - android-nixpkgs.url = "github:tadfisher/android-nixpkgs"; + android-nixpkgs.url = "github:tadfisher/android-nixpkgs"; hyprspace.url = "github:KZDKM/Hyprspace"; - - android-nixpkgs.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.inputs.nixpkgs.follows = "nixpkgs"; - stylix.inputs.nixpkgs.follows = "nixpkgs"; - ags.inputs.nixpkgs.follows = "nixpkgs"; + + android-nixpkgs.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + stylix.inputs.nixpkgs.follows = "nixpkgs"; + ags.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, nixpkgs, android-nixpkgs, ... }: + outputs = + { + self, + nixpkgs, + android-nixpkgs, + ... + }: let forAllSystems = nixpkgs.lib.genAttrs [ "aarch64-linux" @@ -29,12 +35,16 @@ in { nixosConfigurations = import ./hosts { inherit self; }; - devShells = forAllSystems (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in { - ddt4all = import ./shells/ddt4all.nix { inherit pkgs; }; - android = import ./shells/android.nix { inherit pkgs android-nixpkgs; }; - rust = import ./shells/rust.nix { inherit pkgs; }; - }); + devShells = forAllSystems ( + system: + let + pkgs = nixpkgs.legacyPackages.${system}; + in + { + ddt4all = import ./shells/ddt4all.nix { inherit pkgs; }; + android = import ./shells/android.nix { inherit pkgs android-nixpkgs; }; + rust = import ./shells/rust.nix { inherit pkgs; }; + } + ); }; } diff --git a/hosts/default.nix b/hosts/default.nix index 8bae380..687491c 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -2,8 +2,8 @@ let inherit (self) inputs; - - lib = inputs.nixpkgs.lib; + + lib = inputs.nixpkgs.lib; homeDir = self + /profiles; mkSystem = @@ -12,16 +12,17 @@ let hostname, useHomeManager ? true, modules ? [ ], - }: lib.nixosSystem { + }: + lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ ./base-configuration.nix ./${hostname} homeDir - ] - ++ lib.lists.optionals useHomeManager [ inputs.home-manager.nixosModules.default ] - ++ modules; + ] + ++ lib.lists.optionals useHomeManager [ inputs.home-manager.nixosModules.default ] + ++ modules; }; in { diff --git a/hosts/hulk/default.nix b/hosts/hulk/default.nix index d8bbe01..94da28f 100644 --- a/hosts/hulk/default.nix +++ b/hosts/hulk/default.nix @@ -9,9 +9,12 @@ ]; nix.settings = { - experimental-features = [ "nix-command" "flakes" ]; - auto-optimise-store = true; - }; + experimental-features = [ + "nix-command" + "flakes" + ]; + auto-optimise-store = true; + }; nix.gc = { automatic = true; @@ -19,16 +22,16 @@ options = "--delete-older-than 7d"; }; - nixpkgs.config = { - allowUnfreePredicate = - pkg: - builtins.elem (pkgs.lib.getName pkg) [ - "nvidia-settings" - "nvidia-x11" - "nordvpn" - "hplip" - ]; - }; + nixpkgs.config = { + allowUnfreePredicate = + pkg: + builtins.elem (pkgs.lib.getName pkg) [ + "nvidia-settings" + "nvidia-x11" + "nordvpn" + "hplip" + ]; + }; swapDevices = [ { diff --git a/hosts/hulk/modules.nix b/hosts/hulk/modules.nix index b9eb1db..eb239fc 100644 --- a/hosts/hulk/modules.nix +++ b/hosts/hulk/modules.nix @@ -9,12 +9,12 @@ ../../modules/nixos/greetd.nix ../../modules/nixos/audio.nix - # Apps + services - ../../modules/nixos/nordvpn.nix + # Apps + services + ../../modules/nixos/nordvpn.nix ]; modules.bluetooth.enable = true; - modules.nordvpn.enable = true; + modules.nordvpn.enable = true; modules.nvidia.enable = true; modules.audio.enable = true; modules.fingerprint-fix = { @@ -38,7 +38,7 @@ }; udev.extraRules = '' - SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" + SUBSYSTEM=="backlight", KERNEL=="intel_backlight", MODE="0666", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness" ''; }; diff --git a/modules/derivations/nordvpn.nix b/modules/derivations/nordvpn.nix index faebf68..a9595c1 100644 --- a/modules/derivations/nordvpn.nix +++ b/modules/derivations/nordvpn.nix @@ -28,19 +28,19 @@ let dontBuild = true; unpackPhase = '' - runHook preUnpack - dpkg --extract $src . - runHook postUnpack - ''; + runHook preUnpack + dpkg --extract $src . + runHook postUnpack + ''; installPhase = '' - runHook preInstall - mkdir -p $out - mv usr/* $out/ - mv var/ $out/ - mv etc/ $out/ - runHook postInstall - ''; + runHook preInstall + mkdir -p $out + mv usr/* $out/ + mv var/ $out/ + mv etc/ $out/ + runHook postInstall + ''; }; nordVPNfhs = pkgs.buildFHSEnvChroot { @@ -63,11 +63,11 @@ let }; preScript = pkgs.writeShellScript "nordvpn-start" '' - mkdir -m 700 -p /var/lib/nordvpn; - if [ -z "$(ls -A /var/lib/nordvpn)" ]; then - cp -r ${nordVPNBase}/var/lib/nordvpn/* /var/lib/nordvpn; - fi - ''; + mkdir -m 700 -p /var/lib/nordvpn; + if [ -z "$(ls -A /var/lib/nordvpn)" ]; then + cp -r ${nordVPNBase}/var/lib/nordvpn/* /var/lib/nordvpn; + fi + ''; in pkgs.stdenv.mkDerivation rec { inherit pname version; @@ -77,14 +77,14 @@ pkgs.stdenv.mkDerivation rec { dontBuild = true; installPhase = '' - runHook preInstall - mkdir -p $out/bin $out/share - ln -s ${nordVPNBase}/bin/nordvpn $out/bin - ln -s ${nordVPNfhs}/bin/nordvpnd $out/bin - ln -s ${nordVPNBase}/share/* $out/share/ - ln -s ${nordVPNBase}/var $out/ - runHook postInstall - ''; + runHook preInstall + mkdir -p $out/bin $out/share + ln -s ${nordVPNBase}/bin/nordvpn $out/bin + ln -s ${nordVPNfhs}/bin/nordvpnd $out/bin + ln -s ${nordVPNBase}/share/* $out/share/ + ln -s ${nordVPNBase}/var $out/ + runHook postInstall + ''; meta = with lib; { description = "CLI client for NordVPN"; diff --git a/modules/home-manager/ags.nix b/modules/home-manager/ags.nix index 59ddbd5..cd6b892 100644 --- a/modules/home-manager/ags.nix +++ b/modules/home-manager/ags.nix @@ -1,5 +1,32 @@ -{ config, pkgs, lib, inputs, ... }: +{ + config, + pkgs, + lib, + inputs, + ... +}: +let + generate-colors = + colors: with colors; '' + $base00: #${base00}; + $base01: #${base01}; + $base02: #${base02}; + $base03: #${base03}; + $base04: #${base04}; + $base05: #${base05}; + $base06: #${base06}; + $base07: #${base07}; + $base08: #${base08}; + $base09: #${base09}; + $base0A: #${base0A}; + $base0B: #${base0B}; + $base0C: #${base0C}; + $base0D: #${base0D}; + $base0E: #${base0E}; + $base0F: #${base0F}; + ''; +in { options.modules.ags = { enable = lib.mkEnableOption "Aylur's GTK Shell with optional Stylix support"; @@ -11,43 +38,29 @@ }; config = lib.mkIf config.modules.ags.enable { - programs.ags = { - enable = true; - extraPackages = if config.modules.ags.full then - with inputs.ags.packages.${pkgs.system}; - [ - apps - battery - bluetooth - greet - hyprland - mpris - network - notifd - powerprofiles - tray - wireplumber - ] else []; - }; + programs.ags = { + enable = true; + extraPackages = + if config.modules.ags.full then + with inputs.ags.packages.${pkgs.system}; + [ + apps + battery + bluetooth + greet + hyprland + mpris + network + notifd + powerprofiles + tray + wireplumber + ] + else + [ ]; + }; - home.file.".config/theme_colors.scss".text = if config.modules.stylix.enable - then with config.lib.stylix.colors; '' - $base00: #${base00}; - $base01: #${base01}; - $base02: #${base02}; - $base03: #${base03}; - $base04: #${base04}; - $base05: #${base05}; - $base06: #${base06}; - $base07: #${base07}; - $base08: #${base08}; - $base09: #${base09}; - $base0A: #${base0A}; - $base0B: #${base0B}; - $base0C: #${base0C}; - $base0D: #${base0D}; - $base0E: #${base0E}; - $base0F: #${base0F}; - '' else null; + home.file.".config/theme_colors.scss".text = + if config.modules.stylix.enable then generate-colors config.lib.stylix.colors else null; }; } diff --git a/modules/home-manager/apple-style.nix b/modules/home-manager/apple-style.nix index 161c82b..df1a8c3 100644 --- a/modules/home-manager/apple-style.nix +++ b/modules/home-manager/apple-style.nix @@ -1,35 +1,35 @@ { - config, - lib, - pkgs, - inputs, - ... + config, + lib, + pkgs, + inputs, + ... }: - + { options.modules.apple-style.enable = lib.mkEnableOption "Enable Apple fonts and emojis"; config = lib.mkIf (config.modules.apple-style.enable && config.modules.stylix.enable) { - stylix.fonts = { - serif = { - package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd; - name = "SFProDisplay Nerd Font"; - }; + stylix.fonts = { + serif = { + package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd; + name = "SFProDisplay Nerd Font"; + }; - sansSerif = { - package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd; - name = "SFProText Nerd Font"; - }; + sansSerif = { + package = inputs.apple-fonts.packages.${pkgs.system}.sf-pro-nerd; + name = "SFProText Nerd Font"; + }; - monospace = { - package = inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd; - name = "SFMono Nerd Font"; - }; + monospace = { + package = inputs.apple-fonts.packages.${pkgs.system}.sf-mono-nerd; + name = "SFMono Nerd Font"; + }; - emoji = { - package = inputs.apple-emoji.packages.${pkgs.system}.apple-emoji-nix; - name = "Apple Color Emoji"; - }; - }; + emoji = { + package = inputs.apple-emoji.packages.${pkgs.system}.apple-emoji-nix; + name = "Apple Color Emoji"; + }; + }; }; } diff --git a/modules/home-manager/darkman.nix b/modules/home-manager/darkman.nix index 820a090..ca9da5c 100644 --- a/modules/home-manager/darkman.nix +++ b/modules/home-manager/darkman.nix @@ -6,39 +6,40 @@ }: let - inherit (pkgs.lib) optionalAttrs; - + inherit (pkgs.lib) optionalAttrs; + home-manager = "${pkgs.home-manager}/bin/home-manager"; grep = lib.getExe' pkgs.toybox "grep"; head = lib.getExe' pkgs.toybox "head"; find = lib.getExe' pkgs.toybox "find"; - find-generation = '' - for line in $(${home-manager} generations | ${grep} -o '/.*') + find-generation = '' + for line in $(${home-manager} generations | ${grep} -o '/.*') do - res=$(${find} $line | ${grep} specialisation | ${head} -1) + res=$(${find} $line | ${grep} specialisation | ${head} -1) output=$? if [[ $output -eq 0 ]] && [[ $res != "" ]]; then - echo $res + echo $res exit fi done ''; - switch-theme = theme: "$(${find-generation})/${theme}/activate"; -in { + switch-theme = theme: "$(${find-generation})/${theme}/activate"; +in +{ options.modules.darkman = { enable = lib.mkEnableOption "Darkman service and integration"; customLightModeScript = lib.mkOption { type = lib.types.nullOr lib.types.str; - default = null; + default = null; description = "Path to custom light mode script"; }; customDarkModeScript = lib.mkOption { type = lib.types.nullOr lib.types.str; - default = null; + default = null; description = "Path to custom dark mode script"; }; }; @@ -46,17 +47,21 @@ in { config = lib.mkIf config.modules.darkman.enable { services.darkman = { enable = true; - darkModeScripts = optionalAttrs (config.modules.darkman.customDarkModeScript != null) { - custom = config.modules.darkman.customDarkModeScript; - } // optionalAttrs (config.modules.stylix.enable) { - stylix = switch-theme "dark"; - }; + darkModeScripts = + optionalAttrs (config.modules.darkman.customDarkModeScript != null) { + custom = config.modules.darkman.customDarkModeScript; + } + // optionalAttrs (config.modules.stylix.enable) { + stylix = switch-theme "dark"; + }; - lightModeScripts = optionalAttrs (config.modules.darkman.customLightModeScript != null) { - custom = config.modules.darkman.customLightModeScript; - } // optionalAttrs (config.modules.stylix.enable) { - stylix = switch-theme "light"; - }; + lightModeScripts = + optionalAttrs (config.modules.darkman.customLightModeScript != null) { + custom = config.modules.darkman.customLightModeScript; + } + // optionalAttrs (config.modules.stylix.enable) { + stylix = switch-theme "light"; + }; settings.usegeoclue = true; }; diff --git a/modules/home-manager/stylix.nix b/modules/home-manager/stylix.nix index fd8616a..df9d063 100644 --- a/modules/home-manager/stylix.nix +++ b/modules/home-manager/stylix.nix @@ -1,62 +1,62 @@ -{ - config, - lib, - pkgs, - inputs, - ... +{ + config, + lib, + pkgs, + inputs, + ... }: { - options.modules.stylix = { - enable = lib.mkEnableOption "Whether to enable Stylix, a theme manager for NixOS"; - setupCursors = lib.mkOption { - type = lib.types.bool; - default = true; - description = "Whether to setup cursors by default"; - }; + options.modules.stylix = { + enable = lib.mkEnableOption "Whether to enable Stylix, a theme manager for NixOS"; + setupCursors = lib.mkOption { + type = lib.types.bool; + default = true; + description = "Whether to setup cursors by default"; + }; - lightWallpaper = lib.mkOption { - type = lib.types.path; - description = "Path to light theme desktop wallpaper"; - }; + lightWallpaper = lib.mkOption { + type = lib.types.path; + description = "Path to light theme desktop wallpaper"; + }; - darkWallpaper = lib.mkOption { - type = lib.types.path; - description = "Path to dark theme desktop wallpaper"; - }; - }; + darkWallpaper = lib.mkOption { + type = lib.types.path; + description = "Path to dark theme desktop wallpaper"; + }; + }; - imports = [ - inputs.stylix.homeManagerModules.stylix - ]; - - config = lib.mkIf config.modules.stylix.enable { - stylix = { - enable = true; - polarity = lib.mkDefault "light"; - - image = lib.mkDefault config.modules.stylix.lightWallpaper; - base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml"; + imports = [ + inputs.stylix.homeManagerModules.stylix + ]; - cursor = lib.mkIf config.modules.stylix.setupCursors { - name = "Bibata-Modern-Classic"; - package = pkgs.bibata-cursors; - size = 24; - }; - }; + config = lib.mkIf config.modules.stylix.enable { + stylix = { + enable = true; + polarity = lib.mkDefault "light"; - specialisation = { - light.configuration.stylix = { - polarity = "light"; - image = config.modules.stylix.lightWallpaper; - base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave-light.yaml"; - }; + image = lib.mkDefault config.modules.stylix.lightWallpaper; + base16Scheme = lib.mkDefault "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml"; - dark.configuration.stylix = { - polarity = "dark"; - image = config.modules.stylix.darkWallpaper; - base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml"; - }; - }; - }; + cursor = lib.mkIf config.modules.stylix.setupCursors { + name = "Bibata-Modern-Classic"; + package = pkgs.bibata-cursors; + size = 24; + }; + }; + + specialisation = { + light.configuration.stylix = { + polarity = "light"; + image = config.modules.stylix.lightWallpaper; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave-light.yaml"; + }; + + dark.configuration.stylix = { + polarity = "dark"; + image = config.modules.stylix.darkWallpaper; + base16Scheme = "${pkgs.base16-schemes}/share/themes/atelier-cave.yaml"; + }; + }; + }; } diff --git a/modules/nixos/fingerprint.nix b/modules/nixos/fingerprint.nix index fb1507e..56ac1e9 100644 --- a/modules/nixos/fingerprint.nix +++ b/modules/nixos/fingerprint.nix @@ -7,8 +7,9 @@ }: let - module = inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"; -in { + module = inputs.fingerprint-sensor.nixosModules."06cb-009a-fingerprint-sensor"; +in +{ options.modules.fingerprint-fix = { enable = lib.mkEnableOption "Enable support for fingerprint for P51S-like ThinkPads."; calibDataFile = lib.mkOption { @@ -41,7 +42,7 @@ in { calib-data-file = config.modules.fingerprint-fix.calibDataFile; }; - security.pam.services.su.fprintAuth = true; + security.pam.services.su.fprintAuth = true; security.pam.services.sudo.fprintAuth = true; security.pam.services.login.fprintAuth = true; security.pam.services.greetd.fprintAuth = true; diff --git a/modules/nixos/nvidia-support.nix b/modules/nixos/nvidia-support.nix index 24b5078..b3c4dff 100644 --- a/modules/nixos/nvidia-support.nix +++ b/modules/nixos/nvidia-support.nix @@ -4,21 +4,21 @@ options.modules.nvidia.enable = lib.mkEnableOption "Enable NVIDIA kernel and modprobe configurations."; config = lib.mkIf config.modules.nvidia.enable { - hardware.graphics = { - enable = true; - }; + hardware.graphics = { + enable = true; + }; - services.xserver.videoDrivers = ["nvidia"]; + services.xserver.videoDrivers = [ "nvidia" ]; - hardware.nvidia = { - modesetting.enable = true; - powerManagement.enable = false; - powerManagement.finegrained = false; - - open = false; - nvidiaSettings = true; + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = false; + powerManagement.finegrained = false; - package = config.boot.kernelPackages.nvidiaPackages.stable; - }; - }; + open = false; + nvidiaSettings = true; + + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; + }; } diff --git a/profiles/hulk/default.nix b/profiles/hulk/default.nix index 8bf4b46..0531e14 100644 --- a/profiles/hulk/default.nix +++ b/profiles/hulk/default.nix @@ -11,25 +11,25 @@ in inherit username homeDirectory; packages = import ./packages.nix { inherit pkgs inputs; }; - sessionVariables = { + sessionVariables = { NIXOS_OZONE_WL = "1"; TZ = "Europe/Warsaw"; }; }; - nixpkgs.config = { - permittedInsecurePackages = [ - "fluffychat-linux-1.26.0" + nixpkgs.config = { + permittedInsecurePackages = [ + "fluffychat-linux-1.26.0" "olm-3.2.16" ]; - allowUnfreePredicate = - pkg: - builtins.elem (pkgs.lib.getName pkg) [ - "davinci-resolve" - "anydesk" - ]; - }; + allowUnfreePredicate = + pkg: + builtins.elem (pkgs.lib.getName pkg) [ + "davinci-resolve" + "anydesk" + ]; + }; programs.home-manager.enable = true; home.stateVersion = "24.11"; diff --git a/profiles/hulk/fish-functions.nix b/profiles/hulk/fish-functions.nix index 13ff673..a0fe1bc 100644 --- a/profiles/hulk/fish-functions.nix +++ b/profiles/hulk/fish-functions.nix @@ -1,7 +1,7 @@ { webcopy = '' set -l domain (string trim $argv) - get --recursive \ + wget --recursive \ --level 5 \ --no-clobber \ --page-requisites \ @@ -15,18 +15,18 @@ venv = '' if [ -d .venv ]; then - source .venv/bin/activate.fish - else - python -m venv .venv - source .venv/bin/activate.fish - fi + source .venv/bin/activate.fish + else + python -m venv .venv + source .venv/bin/activate.fish + fi ''; thunderbird = '' if pgrep -x birdtray > /dev/null - birdtray -s - else - birdtray & - end + birdtray -s + else + birdtray & + end ''; } diff --git a/profiles/hulk/modules.nix b/profiles/hulk/modules.nix index 4e8b104..a56e0bc 100644 --- a/profiles/hulk/modules.nix +++ b/profiles/hulk/modules.nix @@ -4,13 +4,13 @@ imports = [ # DE + style ../../modules/desktop-environments/hyprland.nix - ../../modules/home-manager/apple-style.nix - ../../modules/home-manager/stylix.nix + ../../modules/home-manager/apple-style.nix + ../../modules/home-manager/stylix.nix # Utilities + apps ../../modules/home-manager/darkman.nix ../../modules/home-manager/fish.nix - ../../modules/home-manager/ags.nix + ../../modules/home-manager/ags.nix # Home Manager modules inputs.ags.homeManagerModules.default @@ -41,21 +41,21 @@ }; }; - modules.stylix = { - enable = true; - lightWallpaper = ./wallpapers/light.jpg; - darkWallpaper = ./wallpapers/dark.jpg; - }; + modules.stylix = { + enable = true; + lightWallpaper = ./wallpapers/light.jpg; + darkWallpaper = ./wallpapers/dark.jpg; + }; - stylix.targets.firefox.profileNames = ["default"]; + stylix.targets.firefox.profileNames = [ "default" ]; - modules.ags = { - enable = true; - full = true; - }; + modules.ags = { + enable = true; + full = true; + }; modules.darkman.enable = true; - modules.apple-style.enable = true; + modules.apple-style.enable = true; modules.fish = { enable = true; @@ -76,12 +76,12 @@ ]; }; - programs.vscode = { - enable = true; - package = pkgs.vscodium; - profiles.default.extensions = with pkgs.vscode-extensions; [ - rust-lang.rust-analyzer - bbenoist.nix - ]; - }; + programs.vscode = { + enable = true; + package = pkgs.vscodium; + profiles.default.extensions = with pkgs.vscode-extensions; [ + rust-lang.rust-analyzer + bbenoist.nix + ]; + }; } diff --git a/profiles/hulk/packages.nix b/profiles/hulk/packages.nix index 6336f30..c86efa1 100644 --- a/profiles/hulk/packages.nix +++ b/profiles/hulk/packages.nix @@ -1,21 +1,22 @@ { pkgs, inputs, ... }: -with pkgs; [ +with pkgs; +[ (python3.withPackages ( - py: with py; [ - pywayland - ] + py: with py; [ + pywayland + ] )) (birdtray.overrideAttrs (_: { - cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${thunderbird}/bin/thunderbird" ]; + cmakeFlags = [ "-DOPT_THUNDERBIRD_CMDLINE=${thunderbird}/bin/thunderbird" ]; })) - jq - starship - firefox - fluffychat - home-manager + jq + starship + firefox + fluffychat + home-manager thunderbird-bin youtube-music libreoffice-qt6-fresh @@ -31,5 +32,5 @@ with pkgs; [ bitwarden-desktop davinci-resolve mpv - sshfs + sshfs ] diff --git a/shells/android.nix b/shells/android.nix index 62c6464..b25a22b 100644 --- a/shells/android.nix +++ b/shells/android.nix @@ -1,22 +1,25 @@ { pkgs, android-nixpkgs }: let - android = pkgs.callPackage android-nixpkgs {}; - androidSdk = android.sdk (sdkPkgs: with sdkPkgs; [ - cmdline-tools-latest - build-tools-35-0-0 - platform-tools - platforms-android-35 - ]); + android = pkgs.callPackage android-nixpkgs { }; + androidSdk = android.sdk ( + sdkPkgs: with sdkPkgs; [ + cmdline-tools-latest + build-tools-35-0-0 + platform-tools + platforms-android-35 + ] + ); -in pkgs.mkShell rec { +in +pkgs.mkShell rec { buildInputs = with pkgs; [ - androidSdk - jdk17 - glibc - ]; + androidSdk + jdk17 + glibc + ]; - ANDROID_JAVA_HOME = "${pkgs.jdk17.home}"; + ANDROID_JAVA_HOME = "${pkgs.jdk17.home}"; ANDROID_SDK_ROOT = "${androidSdk}/share/android-sdk"; - GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/35.0.0/aapt2"; + GRADLE_OPTS = "-Dorg.gradle.project.android.aapt2FromMavenOverride=${ANDROID_SDK_ROOT}/build-tools/35.0.0/aapt2"; } diff --git a/shells/ddt4all.nix b/shells/ddt4all.nix index 65dac92..4f60f31 100644 --- a/shells/ddt4all.nix +++ b/shells/ddt4all.nix @@ -45,7 +45,7 @@ pkgs.mkShell { nativeBuildInputs = [ pkgs.libsForQt5.qt5.wrapQtAppsHook ]; shellHook = '' - wrapQtAppsHook + wrapQtAppsHook mkdir -p $HOME/DDT4ALL cp -r $src/bin/* $HOME/DDT4ALL diff --git a/shells/rust.nix b/shells/rust.nix index e34da7f..af72e3c 100644 --- a/shells/rust.nix +++ b/shells/rust.nix @@ -3,15 +3,15 @@ pkgs.mkShell { buildInputs = with pkgs; [ rustc - cargo + cargo rustfmt rust-analyzer clippy - gcc - libpqxx - postgresql + gcc + libpqxx + postgresql ]; - RUST_BACKTRACE = 1; - RUSTC_BOOTSTRAP = true; + RUST_BACKTRACE = 1; + RUSTC_BOOTSTRAP = true; }