diff --git a/custom/clipedit/default.nix b/custom/clipedit/default.nix index cda1ad4..bb97d60 100644 --- a/custom/clipedit/default.nix +++ b/custom/clipedit/default.nix @@ -3,15 +3,20 @@ , xclip , coreutils , terminal-command ? "kitty -e" +, }: # 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; } # 65 │ function clippaste() { xclip -out -selection clipboard; } clip writeShellScriptBin "clipedit" '' - PATH=$PATH:"${lib.makeBinPath [ coreutils xclip ]}" + PATH=$PATH:"${ + lib.makeBinPath [ + coreutils + xclip + ] + }" tmp_file=$(mktemp) xclip -out -selection -clipboard > $tmp_file ${terminal-command} $VISUAL $tmp_file || ${terminal-command} $EDITOR $tmp_file xclip -in -selection clipboard < $tmp_file rm $tmp_file '' - diff --git a/custom/default.nix b/custom/default.nix index 21ac6d1..ae7ea84 100644 --- a/custom/default.nix +++ b/custom/default.nix @@ -1,4 +1,7 @@ -{ pkgs ? import { inherit system; }, system ? builtins.currentSystem }: +{ pkgs ? import { inherit system; } +, system ? builtins.currentSystem +, +}: let self = { clipedit = pkgs.callPackage ./clipedit { }; diff --git a/custom/keyboard-switch/default.nix b/custom/keyboard-switch/default.nix index ad048b2..ab830fc 100644 --- a/custom/keyboard-switch/default.nix +++ b/custom/keyboard-switch/default.nix @@ -4,11 +4,18 @@ , libnotify , coreutils , keyboard_name ? "AT Translated Set 2 keyboard" +, }: writeShellScriptBin "keyboard-switch" '' set -e - PATH=$PATH:"${lib.makeBinPath [ coreutils xorg.xinput libnotify ]}" + PATH=$PATH:"${ + lib.makeBinPath [ + coreutils + xorg.xinput + libnotify + ] + }" fconfig="''${XDG_DATA_HOME:-$HOME/.local/share}/keyboard-switch.state" if [ ! -f $fconfig ]; then echo "Creating config file" @@ -31,5 +38,3 @@ writeShellScriptBin "keyboard-switch" '' echo 'disabled' > $fconfig fi '' - - diff --git a/custom/lockscreen/default.nix b/custom/lockscreen/default.nix index 16e1f84..970943e 100644 --- a/custom/lockscreen/default.nix +++ b/custom/lockscreen/default.nix @@ -10,8 +10,10 @@ , palette ? rice.palette.palette { } , ... }: -let strPalette = lib.nix-rice.palette.toRGBAHex palette; -in writeScriptBin "lockscreen" '' +let + strPalette = lib.nix-rice.palette.toRGBAHex palette; +in +writeScriptBin "lockscreen" '' # Using font package ${font.package} ${i3lock-color}/bin/i3lock-color \ --insidever-color="${strPalette.normal.green}" \ diff --git a/custom/sddm-sugar-dark/default.nix b/custom/sddm-sugar-dark/default.nix index 84d8150..bedd6c1 100644 --- a/custom/sddm-sugar-dark/default.nix +++ b/custom/sddm-sugar-dark/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, sddm, qt5 }: +{ lib +, stdenv +, fetchFromGitHub +, sddm +, qt5 +, +}: stdenv.mkDerivation { pname = "sddm-sugar-dark"; version = "2023-02-17"; @@ -35,4 +41,3 @@ stdenv.mkDerivation { platforms = lib.platforms.all; }; } - diff --git a/custom/sddm-theme-clairvoyance/default.nix b/custom/sddm-theme-clairvoyance/default.nix index bf58b66..15dc919 100644 --- a/custom/sddm-theme-clairvoyance/default.nix +++ b/custom/sddm-theme-clairvoyance/default.nix @@ -1,4 +1,10 @@ -{ lib, stdenv, fetchFromGitHub, fira-mono, wallpaper ? null }: +{ lib +, stdenv +, fetchFromGitHub +, fira-mono +, wallpaper ? null +, +}: with lib; stdenv.mkDerivation { pname = "sddm-theme-clairvoyance"; @@ -13,12 +19,14 @@ stdenv.mkDerivation { buildInputs = [ fira-mono ]; - installPhase = '' - mkdir -p $out/usr/share/sddm/themes/ - cp -a . $out/usr/share/sddm/themes/clairvoyance - '' + optionalString (wallpaper != null) '' - cp ${wallpaper} $out/usr/share/sddm/themes/clairvoyance/Assets/Background.jpg - ''; + installPhase = + '' + mkdir -p $out/usr/share/sddm/themes/ + cp -a . $out/usr/share/sddm/themes/clairvoyance + '' + + optionalString (wallpaper != null) '' + cp ${wallpaper} $out/usr/share/sddm/themes/clairvoyance/Assets/Background.jpg + ''; meta = with lib; { description = "Clairvoyance theme for SDDM"; diff --git a/custom/update-background/default.nix b/custom/update-background/default.nix index 92d3c17..e5216e4 100644 --- a/custom/update-background/default.nix +++ b/custom/update-background/default.nix @@ -5,6 +5,7 @@ , coreutils , writeScriptBin , backgrounds_directory ? "$HOME/Immagini/Sfondi" +, }: let find = "${findutils}/bin/find"; diff --git a/custom/way-lockscreen/default.nix b/custom/way-lockscreen/default.nix index 6422eca..dd4157a 100644 --- a/custom/way-lockscreen/default.nix +++ b/custom/way-lockscreen/default.nix @@ -11,8 +11,10 @@ , palette ? rice.palette.palette { } , ... }: -let strPalette = lib.nix-rice.palette.toRgbaShortHex palette; -in writeScriptBin "way-lockscreen" '' +let + strPalette = lib.nix-rice.palette.toRgbaShortHex palette; +in +writeScriptBin "way-lockscreen" '' # Using font package ${font.package} ${swaylock}/bin/swaylock \ --color "${strPalette.primary.background}" \ @@ -35,4 +37,3 @@ in writeScriptBin "way-lockscreen" '' # --indicator-radius 120 \ # --indicator-thickness 15 \ '' - diff --git a/custom/wl-clipedit/default.nix b/custom/wl-clipedit/default.nix index 3c22f7a..f6150b8 100644 --- a/custom/wl-clipedit/default.nix +++ b/custom/wl-clipedit/default.nix @@ -4,16 +4,20 @@ , coreutils , editor ? "hx" , terminal-command ? "kitty -e" +, }: # 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; } # 65 │ function clippaste() { xclip -out -selection clipboard; } clip writeShellScriptBin "wl-clipedit" '' - PATH=$PATH:"${lib.makeBinPath [ coreutils wl-clipboard ]}" + PATH=$PATH:"${ + lib.makeBinPath [ + coreutils + wl-clipboard + ] + }" tmp_file=$(mktemp) wl-paste -t 'text/plain;charset=utf-8' -n > "$tmp_file" ${terminal-command} ''${VISUAL:-''${EDITOR:-${editor}}} "$tmp_file" wl-copy -t 'text/plain;charset=utf-8' -n < "$tmp_file" rm "$tmp_file" '' - - diff --git a/default.nix b/default.nix index f620865..9c96b26 100644 --- a/default.nix +++ b/default.nix @@ -1,10 +1,13 @@ (import ( - let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + let + lock = builtins.fromJSON (builtins.readFile ./flake.lock); + in fetchTarball { - url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + url = + lock.nodes.flake-compat.locked.url + or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; sha256 = lock.nodes.flake-compat.locked.narHash; } ) - { src = ./.; } -).defaultNix + { src = ./.; }).defaultNix diff --git a/flake.nix b/flake.nix index 9ec623f..75bbef9 100644 --- a/flake.nix +++ b/flake.nix @@ -6,19 +6,53 @@ nixpkgs.url = "github:NixOS/nixpkgs/release-24.05"; nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager = { url = "github:nix-community/home-manager/release-24.05"; inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager = { + url = "github:nix-community/home-manager/release-24.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; # home-manager-u = { url = "github:nix-community/home-manager"; inputs = { nixpkgs.follows = "nixpkgs-u"; }; }; - agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; }; - deploy-rs = { url = "github:serokell/deploy-rs"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; + agenix = { + url = "github:ryantm/agenix"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + deploy-rs = { + url = "github:serokell/deploy-rs"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; flake-utils.url = "github:numtide/flake-utils"; nix-rice.url = "github:bertof/nix-rice"; - nixos-generators = { url = "github:nix-community/nixos-generators"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; + nixos-generators = { + url = "github:nix-community/nixos-generators"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; nixos-hardware.url = "github:NixOS/nixos-hardware"; - pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs = { nixpkgs.follows = "nixpkgs"; }; }; + pre-commit-hooks = { + url = "github:cachix/pre-commit-hooks.nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + }; + }; }; - outputs = { self, nixpkgs, nixpkgs-u, home-manager, agenix, deploy-rs, flake-utils, nixos-generators, nixos-hardware, nix-rice, pre-commit-hooks, ... }: + outputs = + { self + , nixpkgs + , nixpkgs-u + , home-manager + , agenix + , deploy-rs + , flake-utils + , nixos-generators + , nixos-hardware + , nix-rice + , pre-commit-hooks + , ... + }: let config = { allowUnfree = true; @@ -33,8 +67,14 @@ overlays = [ # Combine stable and unstable packages (self: _: { - stable_pkgs = import nixpkgs { inherit config overlays; inherit (self) system; }; - unstable_pkgs = import nixpkgs-u { inherit config overlays; inherit (self) system; }; + stable_pkgs = import nixpkgs { + inherit config overlays; + inherit (self) system; + }; + unstable_pkgs = import nixpkgs-u { + inherit config overlays; + inherit (self) system; + }; }) # Nix rice @@ -45,24 +85,47 @@ (self: super: { clipedit = self.callPackage ./custom/clipedit { }; wl-clipedit = self.callPackage ./custom/wl-clipedit { }; - update-background = self.callPackage ./custom/update-background { backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; }; - lockscreen = self.callPackage ./custom/lockscreen { palette = self.rice.colorPalette; font = self.rice.font.normal; }; - way-lockscreen = self.callPackage ./custom/way-lockscreen { palette = self.rice.colorPalette; font = self.rice.font.normal; }; - sddm-theme-clairvoyance = self.callPackage ./custom/sddm-theme-clairvoyance { wallpaper = ./wallpapers/background.jpg; }; + update-background = self.callPackage ./custom/update-background { + backgrounds_directory = "$HOME/Immagini/Sfondi/1080+/1440+"; + }; + lockscreen = self.callPackage ./custom/lockscreen { + palette = self.rice.colorPalette; + font = self.rice.font.normal; + }; + way-lockscreen = self.callPackage ./custom/way-lockscreen { + palette = self.rice.colorPalette; + font = self.rice.font.normal; + }; + sddm-theme-clairvoyance = self.callPackage ./custom/sddm-theme-clairvoyance { + wallpaper = ./wallpapers/background.jpg; + }; keyboard-switch = self.callPackage ./custom/keyboard-switch { }; sddm-sugar-dark = self.callPackage ./custom/sddm-sugar-dark { }; - google-chrome = super.google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; }; + google-chrome = super.google-chrome.override { + commandLineArgs = [ + "--password-store=gnome" + "--force-dark-mode" + ]; + }; }) ]; - basic = with flake-utils.lib; - eachDefaultSystem (system: - let pkgs = import nixpkgs { inherit system config overlays; }; - in { + basic = + with flake-utils.lib; + eachDefaultSystem ( + system: + let + pkgs = import nixpkgs { inherit system config overlays; }; + in + { checks = { pre-commit-check = pre-commit-hooks.lib.${system}.run { src = ./.; - hooks = { deadnix.enable = true; nixpkgs-fmt.enable = true; statix.enable = true; }; + hooks = { + deadnix.enable = true; + nixpkgs-fmt.enable = true; + statix.enable = true; + }; }; }; @@ -78,15 +141,30 @@ }; formatter = pkgs.nixpkgs-fmt; - }); + } + ); nix_configuration = { - nixpkgs = { inherit overlays config; }; + nixpkgs = { + inherit overlays config; + }; nix = { inherit (config) extraOptions; registry = { - stable = { from = { id = "stable"; type = "indirect"; }; flake = nixpkgs; }; - unstable = { from = { id = "unstable"; type = "indirect"; }; flake = nixpkgs-u; }; + stable = { + from = { + id = "stable"; + type = "indirect"; + }; + flake = nixpkgs; + }; + unstable = { + from = { + id = "unstable"; + type = "indirect"; + }; + flake = nixpkgs-u; + }; }; }; }; @@ -94,7 +172,12 @@ # Home manager configuration homeManagerModules = [ home-manager.nixosModules.default - { home-manager = { useGlobalPkgs = true; useUserPackages = true; }; } + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + }; + } ]; # homeManagerUModules = [ @@ -112,9 +195,15 @@ age.secrets = { # oauth_proxy_client_credentials.file = ./secrets/oauth_proxy_client_credentials.age; # spotify_password = { file = ./secrets/spotify_password.age; owner = "bertof"; }; - wg_psk = { file = ./secrets/wg_psk.age; }; - baldur_wg_priv = { file = ./secrets/baldur_wg_priv.age; }; - oppo_wg_priv = { file = ./secrets/oppo_wg_priv.age; }; + wg_psk = { + file = ./secrets/wg_psk.age; + }; + baldur_wg_priv = { + file = ./secrets/baldur_wg_priv.age; + }; + oppo_wg_priv = { + file = ./secrets/oppo_wg_priv.age; + }; }; } @@ -130,30 +219,32 @@ nixosConfigurations = { thor = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = commonModules ++ [ - ./modules/nixos/server + modules = + commonModules + ++ [ + ./modules/nixos/server - ./instances/thor/hardware-configuration.nix - nixos-hardware.nixosModules.common-cpu-amd - nixos-hardware.nixosModules.common-pc-ssd - ./instances/thor/configuration.nix + ./instances/thor/hardware-configuration.nix + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-pc-ssd + ./instances/thor/configuration.nix - ./modules/nixos/pro_audio.nix - ./modules/nixos/kdeconnect.nix - ./modules/nixos/steam.nix + ./modules/nixos/pro_audio.nix + ./modules/nixos/kdeconnect.nix + ./modules/nixos/steam.nix - ./modules/nixos/hyprland.nix - { - home-manager.users.bertof.imports = [ - ./modules/hm/hyprland.nix - ./modules/hm/swayidle.nix - ]; - } + ./modules/nixos/hyprland.nix + { + home-manager.users.bertof.imports = [ + ./modules/hm/hyprland.nix + ./modules/hm/swayidle.nix + ]; + } - ./modules/nixos/musa.nix - ] ++ homeManagerModules ++ [ - { home-manager.users.bertof = import ./instances/thor/hm.nix; } - ]; + ./modules/nixos/musa.nix + ] + ++ homeManagerModules + ++ [{ home-manager.users.bertof = import ./instances/thor/hm.nix; }]; }; }; }; @@ -175,28 +266,20 @@ ./modules/nixos/steam.nix ./modules/nixos/hyprland.nix - { - home-manager.users.bertof.imports = [ - ./modules/hm/hyprland.nix - ]; - } + { home-manager.users.bertof.imports = [ ./modules/hm/hyprland.nix ]; } ./modules/nixos/musa.nix - ] ++ homeManagerModules ++ [ - { home-manager.users.bertof = import ./instances/odin/hm.nix; } - ]; + ] ++ homeManagerModules ++ [{ home-manager.users.bertof = import ./instances/odin/hm.nix; }]; in rec { odin-nvidia = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = commonModules ++ odinCommonModules - ++ [ ./instances/odin/configuration-nvidia.nix ]; + modules = commonModules ++ odinCommonModules ++ [ ./instances/odin/configuration-nvidia.nix ]; }; odin-intel = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = commonModules ++ odinCommonModules - ++ [ ./instances/odin/configuration-intel.nix ]; + modules = commonModules ++ odinCommonModules ++ [ ./instances/odin/configuration-intel.nix ]; }; odin = odin-intel; @@ -207,25 +290,27 @@ nixosConfigurations = { heimdall = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = commonModules ++ [ - nixos-hardware.nixosModules.common-cpu-amd - nixos-hardware.nixosModules.common-gpu-amd - nixos-hardware.nixosModules.common-pc-ssd - ./modules/nixos/server + modules = + commonModules + ++ [ + nixos-hardware.nixosModules.common-cpu-amd + nixos-hardware.nixosModules.common-gpu-amd + nixos-hardware.nixosModules.common-pc-ssd + ./modules/nixos/server - ./instances/heimdall/hardware-configuration.nix - ./instances/heimdall/configuration.nix + ./instances/heimdall/hardware-configuration.nix + ./instances/heimdall/configuration.nix - ./modules/nixos/users/tiziano.nix + ./modules/nixos/users/tiziano.nix - ./modules/nixos/torrentbox.nix - ./modules/nixos/minio.nix - ./modules/nixos/rclone.nix - ./modules/nixos/nextcloud.nix - # ./modules/nixos/ntfy.nix - ] ++ homeManagerModules ++ [ - { home-manager.users.bertof = import ./instances/heimdall/hm.nix; } - ]; + ./modules/nixos/torrentbox.nix + ./modules/nixos/minio.nix + ./modules/nixos/rclone.nix + ./modules/nixos/nextcloud.nix + # ./modules/nixos/ntfy.nix + ] + ++ homeManagerModules + ++ [{ home-manager.users.bertof = import ./instances/heimdall/hm.nix; }]; }; }; }; @@ -234,25 +319,38 @@ nixosConfigurations = { freya = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; - modules = commonModules ++ [ - nixos-hardware.nixosModules.raspberry-pi-4 - ({ lib, ... }: { - boot.supportedFilesystems = lib.mkForce [ "btrfs" "reiserfs" "vfat" "f2fs" "xfs" "ntfs" "cifs" ]; - }) - ./modules/nixos/server + modules = + commonModules + ++ [ + nixos-hardware.nixosModules.raspberry-pi-4 + ( + { lib, ... }: + { + boot.supportedFilesystems = lib.mkForce [ + "btrfs" + "reiserfs" + "vfat" + "f2fs" + "xfs" + "ntfs" + "cifs" + ]; + } + ) + ./modules/nixos/server - ./instances/freya/hardware-configuration.nix - ./instances/freya/configuration.nix + ./instances/freya/hardware-configuration.nix + ./instances/freya/configuration.nix - ./modules/nixos/users/tiziano.nix + ./modules/nixos/users/tiziano.nix - ./modules/nixos/torrentbox.nix - ./modules/nixos/minio.nix - # ./modules/nixos/nextcloud.nix - ./modules/nixos/ntfy.nix - ] ++ homeManagerModules ++ [ - { home-manager.users.bertof = import ./instances/freya/hm.nix; } - ]; + ./modules/nixos/torrentbox.nix + ./modules/nixos/minio.nix + # ./modules/nixos/nextcloud.nix + ./modules/nixos/ntfy.nix + ] + ++ homeManagerModules + ++ [{ home-manager.users.bertof = import ./instances/freya/hm.nix; }]; }; }; }; @@ -282,54 +380,121 @@ nixosConfigurations = { loki = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = commonModules ++ [ - ./modules/nixos/server + modules = + commonModules + ++ [ + ./modules/nixos/server - nixos-hardware.nixosModules.common-cpu-intel - nixos-hardware.nixosModules.common-pc-ssd - ./instances/loki/hardware-configuration.nix - ./instances/loki/configuration.nix + nixos-hardware.nixosModules.common-cpu-intel + nixos-hardware.nixosModules.common-pc-ssd + ./instances/loki/hardware-configuration.nix + ./instances/loki/configuration.nix - ./modules/nixos/users/tiziano.nix - ] ++ homeManagerModules ++ [{ - home-manager.users.bertof = import ./instances/loki/hm.nix; - home-manager.users.tiziano = import ./instances/loki/hm_tiziano.nix; - }]; + ./modules/nixos/users/tiziano.nix + ] + ++ homeManagerModules + ++ [ + { + home-manager.users.bertof = import ./instances/loki/hm.nix; + home-manager.users.tiziano = import ./instances/loki/hm_tiziano.nix; + } + ]; }; }; }; deployments = { # Deploy-rs checks - checks = builtins.mapAttrs - (_system: deployLib: deployLib.deployChecks self.deploy) - deploy-rs.lib; + checks = builtins.mapAttrs (_system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; # Map nodes to Deploy-rs deployments deploy.nodes = { - baldur = { hostname = "baldur.bertof.net"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.baldur; }; }; - freya = { hostname = "freya.tsn"; profiles.system = { user = "root"; path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.freya; }; }; - heimdall = { hostname = "heimdall.tsn"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.heimdall; }; }; - loki = { hostname = "loki.tsn"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.loki; }; }; - odin = { hostname = "odin.tsn"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.odin; }; }; - thor = { hostname = "thor.tsn"; profiles.system = { user = "root"; path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.thor; }; }; + baldur = { + hostname = "baldur.bertof.net"; + profiles.system = { + user = "root"; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.baldur; + }; + }; + freya = { + hostname = "freya.tsn"; + profiles.system = { + user = "root"; + path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.freya; + }; + }; + heimdall = { + hostname = "heimdall.tsn"; + profiles.system = { + user = "root"; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.heimdall; + }; + }; + loki = { + hostname = "loki.tsn"; + profiles.system = { + user = "root"; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.loki; + }; + }; + odin = { + hostname = "odin.tsn"; + profiles.system = { + user = "root"; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.odin; + }; + }; + thor = { + hostname = "thor.tsn"; + profiles.system = { + user = "root"; + path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.thor; + }; + }; }; }; - images = with flake-utils.lib; eachSystem [ system.x86_64-linux system.aarch64-linux ] (system: { - packages = { - # Installer ISO - install-iso = nixos-generators.nixosGenerate { inherit system; modules = installerModules; format = "install-iso"; }; - # RAW base image - raw-base-image = nixos-generators.nixosGenerate { system = flake-utils.lib.system.x86_64-linux; modules = installerModules; format = "raw-efi"; }; - # VMDK base image - vmdk-base-image = nixos-generators.nixosGenerate { system = flake-utils.lib.system.x86_64-linux; modules = installerModules; format = "vmware"; }; - # Aarch64 base image - aarch64-base-image = nixos-generators.nixosGenerate { system = flake-utils.lib.system.aarch64-linux; modules = installerModules; format = "sd-aarch64"; }; - # Installer DigitalOcean - do-image = nixos-generators.nixosGenerate { inherit system; modules = installerModules; format = "do"; }; - }; - }); + images = + with flake-utils.lib; + eachSystem + [ + system.x86_64-linux + system.aarch64-linux + ] + (system: { + packages = { + # Installer ISO + install-iso = nixos-generators.nixosGenerate { + inherit system; + modules = installerModules; + format = "install-iso"; + }; + # RAW base image + raw-base-image = nixos-generators.nixosGenerate { + system = flake-utils.lib.system.x86_64-linux; + modules = installerModules; + format = "raw-efi"; + }; + # VMDK base image + vmdk-base-image = nixos-generators.nixosGenerate { + system = flake-utils.lib.system.x86_64-linux; + modules = installerModules; + format = "vmware"; + }; + # Aarch64 base image + aarch64-base-image = nixos-generators.nixosGenerate { + system = flake-utils.lib.system.aarch64-linux; + modules = installerModules; + format = "sd-aarch64"; + }; + # Installer DigitalOcean + do-image = nixos-generators.nixosGenerate { + inherit system; + modules = installerModules; + format = "do"; + }; + }; + }); in builtins.foldl' nixpkgs.lib.recursiveUpdate { } [ @@ -344,4 +509,3 @@ images ]; } - diff --git a/hosts.nix b/hosts.nix index 566bd53..08aff09 100644 --- a/hosts.nix +++ b/hosts.nix @@ -43,4 +43,3 @@ }; }; } - diff --git a/instances/baldur/configuration.nix b/instances/baldur/configuration.nix index 695bb91..055651d 100644 --- a/instances/baldur/configuration.nix +++ b/instances/baldur/configuration.nix @@ -7,9 +7,16 @@ boot = { growPartition = true; - kernelParams = [ "console=ttyS0" "panic=1" "boot.panic_on_fail" ]; + kernelParams = [ + "console=ttyS0" + "panic=1" + "boot.panic_on_fail" + ]; initrd.kernelModules = [ "virtio_scsi" ]; - kernelModules = [ "virtio_pci" "virtio_net" ]; + kernelModules = [ + "virtio_pci" + "virtio_net" + ]; loader = { grub.device = "/dev/sda"; timeout = 0; @@ -24,13 +31,20 @@ environment = { pathsToLink = [ "/share/zsh" ]; - systemPackages = [ pkgs.helix pkgs.zellij pkgs.kitty.terminfo ]; + systemPackages = [ + pkgs.helix + pkgs.zellij + pkgs.kitty.terminfo + ]; }; i18n.defaultLocale = "it_IT.UTF-8"; programs = { - gnupg.agent = { enable = true; enableSSHSupport = true; }; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; zsh.enable = true; }; @@ -65,29 +79,40 @@ recommendedTlsSettings = true; virtualHosts = let - ssl = { enableACME = true; forceSSL = true; }; + ssl = { + enableACME = true; + forceSSL = true; + }; in { "me.bertof.net" = ssl // { - locations."/".extraConfig = - "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; + locations."/".extraConfig = "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; }; "home-assistant.bertof.net" = ssl // { - locations."/" = { proxyPass = "http://loki.tsn:8123/"; proxyWebsockets = true; }; + locations."/" = { + proxyPass = "http://loki.tsn:8123/"; + proxyWebsockets = true; + }; extraConfig = '' proxy_pass_header Authorization; proxy_buffering off; ''; }; "s3.bertof.net" = ssl // { - locations."/" = { proxyPass = "http://heimdall.tsn:9000/"; proxyWebsockets = true; }; + locations."/" = { + proxyPass = "http://heimdall.tsn:9000/"; + proxyWebsockets = true; + }; extraConfig = '' proxy_pass_header Authorization; proxy_buffering off; ''; }; "hass.bertof.net" = ssl // { - locations."/" = { proxyPass = "http://heimdall.tsn:8123/"; proxyWebsockets = true; }; + locations."/" = { + proxyPass = "http://heimdall.tsn:8123/"; + proxyWebsockets = true; + }; extraConfig = '' proxy_pass_header Authorization; proxy_buffering off; @@ -120,14 +145,37 @@ ''; }; }; - "radarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://heimdall.tsn:7878/"; proxyWebsockets = true; }; }; - "sonarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://heimdall.tsn:8989/"; proxyWebsockets = true; }; }; - "lidarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://heimdall.tsn:8686/"; proxyWebsockets = true; }; }; + "radarr.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://heimdall.tsn:7878/"; + proxyWebsockets = true; + }; + }; + "sonarr.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://heimdall.tsn:8989/"; + proxyWebsockets = true; + }; + }; + "lidarr.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://heimdall.tsn:8686/"; + proxyWebsockets = true; + }; + }; # "ombi.bertof.net" = ssl // { locations."/" = { proxyPass = "http://heimdall.tsn:5000/"; proxyWebsockets = true; }; }; - "jellyfin.bertof.net" = ssl // { locations."/" = { proxyPass = "http://heimdall.tsn:8096/"; proxyWebsockets = true; }; }; + "jellyfin.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://heimdall.tsn:8096/"; + proxyWebsockets = true; + }; + }; }; }; - openssh = { enable = true; openFirewall = true; }; + openssh = { + enable = true; + openFirewall = true; + }; # wgautomesh = { # enable = true; # settings = { @@ -136,7 +184,10 @@ # }; }; - security.acme = { acceptTerms = true; defaults.email = "filippo.berto95@gmail.com"; }; + security.acme = { + acceptTerms = true; + defaults.email = "filippo.berto95@gmail.com"; + }; users.users.bertof = { isNormalUser = true; @@ -174,8 +225,15 @@ firewall = { enable = true; allowPing = true; - allowedTCPPorts = [ 80 443 53 ]; - allowedUDPPorts = [ 53 51820 ]; + allowedTCPPorts = [ + 80 + 443 + 53 + ]; + allowedUDPPorts = [ + 53 + 51820 + ]; # interfaces.ens3.allowedTCPPorts = [ 52123 53 ]; # interfaces.ens3.allowedUDPPorts = [ 53 ]; # extraCommands = ''iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns''; diff --git a/instances/baldur/hardware-configuration.nix b/instances/baldur/hardware-configuration.nix index 3e21d52..67d5056 100644 --- a/instances/baldur/hardware-configuration.nix +++ b/instances/baldur/hardware-configuration.nix @@ -5,7 +5,13 @@ boot = { initrd = { - availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "sd_mod" ]; + availableKernelModules = [ + "ata_piix" + "uhci_hcd" + "virtio_pci" + "virtio_scsi" + "sd_mod" + ]; kernelModules = [ ]; }; @@ -19,6 +25,9 @@ }; swapDevices = [ - { device = "/swapfile"; size = 1024 * 1; } + { + device = "/swapfile"; + size = 1024 * 1; + } ]; } diff --git a/instances/baldur/hm.nix b/instances/baldur/hm.nix index 7b9e507..162481c 100644 --- a/instances/baldur/hm.nix +++ b/instances/baldur/hm.nix @@ -1,9 +1,14 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { language.base = "it_IT.UTF-8"; keyboard = { layout = "it"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" "grp:menu_toggle" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + "grp:menu_toggle" + ]; }; packages = builtins.attrValues { inherit (pkgs) nix-prefetch-scripts; }; }; diff --git a/instances/baldur/hm_tiziano.nix b/instances/baldur/hm_tiziano.nix index a95c36a..0dc731c 100644 --- a/instances/baldur/hm_tiziano.nix +++ b/instances/baldur/hm_tiziano.nix @@ -1,9 +1,13 @@ -{ ... }: { +{ ... }: +{ home = { language.base = "it_IT.UTF-8"; keyboard = { layout = "it"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + ]; }; }; diff --git a/instances/freya/configuration.nix b/instances/freya/configuration.nix index b861152..4ea2b53 100644 --- a/instances/freya/configuration.nix +++ b/instances/freya/configuration.nix @@ -1,14 +1,24 @@ -{ pkgs, lib, config, ... }: +{ pkgs +, lib +, config +, ... +}: let hosts = import ../../hosts.nix; in { age.secrets = { - ntfy-freya = { file = ../../secrets/ntfy-freya.age; owner = "bertof"; }; + ntfy-freya = { + file = ../../secrets/ntfy-freya.age; + owner = "bertof"; + }; }; - console = { font = "Lat2-Terminus16"; keyMap = "it"; }; + console = { + font = "Lat2-Terminus16"; + keyMap = "it"; + }; environment = { pathsToLink = [ "/share/zsh" ]; @@ -20,7 +30,10 @@ in enable = true; # package = pkgs.bluezFull; }; - opengl = { enable = true; driSupport = true; }; + opengl = { + enable = true; + driSupport = true; + }; raspberry-pi."4" = { # audio.enable = true; # AUDIO fkms-3d.enable = true; # GPU @@ -52,7 +65,10 @@ in programs = { dconf.enable = true; - gnupg.agent = { enable = true; enableSSHSupport = true; }; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; zsh.enable = true; }; @@ -77,14 +93,24 @@ in blueman.enable = true; dbus.packages = [ pkgs.dconf ]; gnome.gnome-keyring.enable = true; - openssh = { enable = true; openFirewall = true; }; + openssh = { + enable = true; + openFirewall = true; + }; # xserver = { # enable = true; # desktopManager.retroarch = { enable = true; package = pkgs.retroarchFull; }; # }; - fail2ban = { enable = true; bantime-increment.enable = true; }; - plex = { enable = true; openFirewall = true; group = "users"; }; + fail2ban = { + enable = true; + bantime-increment.enable = true; + }; + plex = { + enable = true; + openFirewall = true; + group = "users"; + }; # jellyfin = { enable = true; openFirewall = true; group = "users"; }; home-assistant = { @@ -246,11 +272,13 @@ in # "!secret famiglia_t_chat_id" # ]; # }]; - tts = [{ - platform = "google_translate"; - language = "it"; - # tld = "it"; - }]; + tts = [ + { + platform = "google_translate"; + language = "it"; + # tld = "it"; + } + ]; }; configDir = "/var/lib/hass"; configWritable = true; @@ -336,12 +364,18 @@ in prometheus = { enable = true; exporters = { - node = { enable = true; enabledCollectors = [ "systemd" ]; }; + node = { + enable = true; + enabledCollectors = [ "systemd" ]; + }; process = { enable = true; settings.process_names = [ # Remove nix store path from process name - { name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; } + { + name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; + cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; + } ]; }; systemd.enable = true; @@ -352,15 +386,21 @@ in scrapeConfigs = [ { job_name = "node"; - static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } + ]; } { job_name = "process"; - static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }]; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; } + ]; } { job_name = "systemd"; - static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }]; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; } + ]; } ]; retentionTime = "15d"; @@ -368,16 +408,30 @@ in snapper.configs = let - common = { TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; }; + common = { + TIMELINE_CREATE = true; + TIMELINE_CLEANUP = true; + }; in { - bertof = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/bertof/"; ALLOW_USERS = [ "bertof" ]; }; - tiziano = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/tiziano/"; ALLOW_USERS = [ "tiziano" ]; }; - condiviso = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/condiviso"; ALLOW_USERS = [ "bertof" "tiziano" ]; }; + bertof = lib.recursiveUpdate common { + SUBVOLUME = "/mnt/raid/bertof/"; + ALLOW_USERS = [ "bertof" ]; + }; + tiziano = lib.recursiveUpdate common { + SUBVOLUME = "/mnt/raid/tiziano/"; + ALLOW_USERS = [ "tiziano" ]; + }; + condiviso = lib.recursiveUpdate common { + SUBVOLUME = "/mnt/raid/condiviso"; + ALLOW_USERS = [ + "bertof" + "tiziano" + ]; + }; }; }; - time.timeZone = "Europe/Rome"; users.users = { diff --git a/instances/freya/hardware-configuration.nix b/instances/freya/hardware-configuration.nix index 642116a..9c5873b 100644 --- a/instances/freya/hardware-configuration.nix +++ b/instances/freya/hardware-configuration.nix @@ -1,13 +1,15 @@ { lib, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { extraModulePackages = [ ]; initrd = { - availableKernelModules = [ "xhci_pci" "uas" "usb_storage" ]; + availableKernelModules = [ + "xhci_pci" + "uas" + "usb_storage" + ]; kernelModules = [ ]; }; kernelModules = [ ]; @@ -26,7 +28,10 @@ }; swapDevices = [ - { device = "/swapfile"; size = 1024 * 4; } + { + device = "/swapfile"; + size = 1024 * 4; + } ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking diff --git a/instances/freya/hm.nix b/instances/freya/hm.nix index 4e48c84..e2bd322 100644 --- a/instances/freya/hm.nix +++ b/instances/freya/hm.nix @@ -1,13 +1,22 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { language.base = "it_IT.UTF-8"; keyboard = { layout = "it"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + ]; }; packages = builtins.attrValues { inherit (pkgs) - cava gallery-dl procps wireguard-tools httpie; + cava + gallery-dl + procps + wireguard-tools + httpie + ; }; }; diff --git a/instances/heimdall/configuration.nix b/instances/heimdall/configuration.nix index 0616bcf..fd15258 100644 --- a/instances/heimdall/configuration.nix +++ b/instances/heimdall/configuration.nix @@ -1,4 +1,8 @@ -{ pkgs, lib, config, ... }: +{ pkgs +, lib +, config +, ... +}: let hosts = import ../../hosts.nix; in @@ -12,7 +16,10 @@ in efi.canTouchEfiVariables = true; }; - console = { font = "Lat2-Terminus16"; keyMap = "it"; }; + console = { + font = "Lat2-Terminus16"; + keyMap = "it"; + }; environment = { pathsToLink = [ "/share/zsh" ]; @@ -24,7 +31,10 @@ in enable = true; # package = pkgs.bluezFull; }; - opengl = { enable = true; driSupport = true; }; + opengl = { + enable = true; + driSupport = true; + }; }; i18n.defaultLocale = "it_IT.UTF-8"; @@ -52,7 +62,10 @@ in programs = { dconf.enable = true; - gnupg.agent = { enable = true; enableSSHSupport = true; }; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; zsh.enable = true; }; @@ -61,7 +74,14 @@ in ''; services = { - grafana = { enable = true; settings.server = { http_addr = "0.0.0.0"; domain = "bertof.net"; root_url = "https://grafana.bertof.net/"; }; }; + grafana = { + enable = true; + settings.server = { + http_addr = "0.0.0.0"; + domain = "bertof.net"; + root_url = "https://grafana.bertof.net/"; + }; + }; # avahi = { # enable = true; @@ -79,15 +99,29 @@ in # blueman.enable = true; # dbus.packages = [ pkgs.dconf ]; # gnome.gnome-keyring.enable = true; - openssh = { enable = true; openFirewall = true; }; + openssh = { + enable = true; + openFirewall = true; + }; # # xserver = { # # enable = true; # # desktopManager.retroarch = { enable = true; package = pkgs.retroarchFull; }; # # }; # - fail2ban = { enable = true; bantime-increment.enable = true; }; - plex = { enable = true; openFirewall = true; group = "users"; }; - jellyfin = { enable = true; openFirewall = true; group = "users"; }; + fail2ban = { + enable = true; + bantime-increment.enable = true; + }; + plex = { + enable = true; + openFirewall = true; + group = "users"; + }; + jellyfin = { + enable = true; + openFirewall = true; + group = "users"; + }; # home-assistant = { enable = true; @@ -248,11 +282,13 @@ in # "!secret famiglia_t_chat_id" # ]; # }]; - tts = [{ - platform = "google_translate"; - language = "it"; - # tld = "it"; - }]; + tts = [ + { + platform = "google_translate"; + language = "it"; + # tld = "it"; + } + ]; }; configDir = "/var/lib/hass"; configWritable = true; @@ -338,37 +374,74 @@ in prometheus = { enable = true; exporters = { - node = { enable = true; enabledCollectors = [ "systemd" ]; }; + node = { + enable = true; + enabledCollectors = [ "systemd" ]; + }; process = { enable = true; settings.process_names = [ # Remove nix store path from process name - { name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; } + { + name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; + cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; + } ]; }; systemd.enable = true; }; - globalConfig = { scrape_interval = "10s"; }; + globalConfig = { + scrape_interval = "10s"; + }; scrapeConfigs = [ - { job_name = "node"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; } - { job_name = "process"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }]; } - { job_name = "systemd"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }]; } + { + job_name = "node"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } + ]; + } + { + job_name = "process"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; } + ]; + } + { + job_name = "systemd"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; } + ]; + } ]; retentionTime = "15d"; }; snapper.configs = let - common = { TIMELINE_CREATE = true; TIMELINE_CLEANUP = true; }; + common = { + TIMELINE_CREATE = true; + TIMELINE_CLEANUP = true; + }; in { - bertof = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/bertof/"; ALLOW_USERS = [ "bertof" ]; }; - tiziano = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/tiziano/"; ALLOW_USERS = [ "tiziano" ]; }; - condiviso = lib.recursiveUpdate common { SUBVOLUME = "/mnt/raid/condiviso"; ALLOW_USERS = [ "bertof" "tiziano" ]; }; + bertof = lib.recursiveUpdate common { + SUBVOLUME = "/mnt/raid/bertof/"; + ALLOW_USERS = [ "bertof" ]; + }; + tiziano = lib.recursiveUpdate common { + SUBVOLUME = "/mnt/raid/tiziano/"; + ALLOW_USERS = [ "tiziano" ]; + }; + condiviso = lib.recursiveUpdate common { + SUBVOLUME = "/mnt/raid/condiviso"; + ALLOW_USERS = [ + "bertof" + "tiziano" + ]; + }; }; }; - time.timeZone = "Europe/Rome"; users.users = { @@ -393,4 +466,3 @@ in system.stateVersion = "24.05"; } - diff --git a/instances/heimdall/hardware-configuration.nix b/instances/heimdall/hardware-configuration.nix index 52727e7..b2ee7c5 100644 --- a/instances/heimdall/hardware-configuration.nix +++ b/instances/heimdall/hardware-configuration.nix @@ -1,14 +1,26 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, modulesPath, ... }: +{ config +, lib +, modulesPath +, ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { initrd = { - availableKernelModules = [ "xhci_pci" "ahci" "ehci_pci" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + availableKernelModules = [ + "xhci_pci" + "ahci" + "ehci_pci" + "nvme" + "usb_storage" + "usbhid" + "sd_mod" + ]; kernelModules = [ ]; }; kernelModules = [ "kvm-amd" ]; @@ -29,7 +41,10 @@ "/boot" = { device = "/dev/disk/by-uuid/7F42-D513"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = [ + "fmask=0022" + "dmask=0022" + ]; }; }; @@ -47,4 +62,3 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } - diff --git a/instances/heimdall/hm.nix b/instances/heimdall/hm.nix index 9776433..e2bd322 100644 --- a/instances/heimdall/hm.nix +++ b/instances/heimdall/hm.nix @@ -1,13 +1,22 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { language.base = "it_IT.UTF-8"; keyboard = { layout = "it"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + ]; }; packages = builtins.attrValues { inherit (pkgs) - cava gallery-dl procps wireguard-tools httpie; + cava + gallery-dl + procps + wireguard-tools + httpie + ; }; }; @@ -22,4 +31,3 @@ home.stateVersion = "22.11"; } - diff --git a/instances/loki/configuration.nix b/instances/loki/configuration.nix index fc67e48..6b71832 100644 --- a/instances/loki/configuration.nix +++ b/instances/loki/configuration.nix @@ -5,16 +5,28 @@ in { age.secrets = { - ntfy-loki = { file = ../../secrets/ntfy-loki.age; owner = "bertof"; }; + ntfy-loki = { + file = ../../secrets/ntfy-loki.age; + owner = "bertof"; + }; }; boot = { - binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; + binfmt.emulatedSystems = [ + "armv7l-linux" + "aarch64-linux" + ]; # kernelPackages = pkgs.linuxPackages_latest; - loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; }; - console = { font = "Lat2-Terminus16"; keyMap = "it"; }; + console = { + font = "Lat2-Terminus16"; + keyMap = "it"; + }; environment = { pathsToLink = [ "/share/zsh" ]; @@ -36,7 +48,12 @@ in opengl = { enable = true; extraPackages = builtins.attrValues { - inherit (pkgs) intel-media-driver libvdpau-va-gl vaapiIntel vaapiVdpau; + inherit (pkgs) + intel-media-driver + libvdpau-va-gl + vaapiIntel + vaapiVdpau + ; }; }; @@ -81,16 +98,29 @@ in }; # bazarr = { enable = true; openFirewall = true; group = "users"; }; blueman.enable = true; - dbus = { packages = [ pkgs.dconf ]; implementation = "broker"; }; - esphome = { enable = true; openFirewall = true; }; + dbus = { + packages = [ pkgs.dconf ]; + implementation = "broker"; + }; + esphome = { + enable = true; + openFirewall = true; + }; # fail2ban = { enable = true; bantime-increment.enable = true; }; gnome.gnome-keyring.enable = true; gvfs.enable = true; # jackett = { enable = true; openFirewall = true; group = "users"; }; - jellyfin = { enable = true; openFirewall = true; group = "users"; }; + jellyfin = { + enable = true; + openFirewall = true; + group = "users"; + }; logind.lidSwitch = "ignore"; # node-red = { enable = true; openFirewall = true; withNpmAndGcc = true; }; - openssh = { enable = true; openFirewall = true; }; + openssh = { + enable = true; + openFirewall = true; + }; # plex = { enable = true; openFirewall = true; group = "users"; }; power-profiles-daemon.enable = true; # prowlarr = { enable = true; openFirewall = true; }; @@ -201,7 +231,11 @@ in }; tiziano = { isNormalUser = true; - extraGroups = [ "audio" "input" "video" ]; + extraGroups = [ + "audio" + "input" + "video" + ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" ]; @@ -241,8 +275,7 @@ in 138 # SYNCTHING 3702 # SAMBA-WSDD ]; - extraCommands = - "iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns"; + extraCommands = "iptables -t raw -A OUTPUT -p udp -m udp --dport 137 -j CT --helper netbios-ns"; }; virtualisation = { @@ -306,9 +339,21 @@ in assist_pipeline = { }; # bluetooth = { }; camera = [ - { platform = "local_file"; file_path = "/tmp/doods_camera_camera_cancello.jpg"; name = "File DOODS2 Camera cancello"; } - { platform = "local_file"; file_path = "/tmp/doods_camera_camera_vialetto.jpg"; name = "File DOODS2 Camera vialetto"; } - { platform = "local_file"; file_path = "/tmp/doods_camera_camera_garage.jpg"; name = "File DOODS2 Camera garage"; } + { + platform = "local_file"; + file_path = "/tmp/doods_camera_camera_cancello.jpg"; + name = "File DOODS2 Camera cancello"; + } + { + platform = "local_file"; + file_path = "/tmp/doods_camera_camera_vialetto.jpg"; + name = "File DOODS2 Camera vialetto"; + } + { + platform = "local_file"; + file_path = "/tmp/doods_camera_camera_garage.jpg"; + name = "File DOODS2 Camera garage"; + } ]; cloud = { }; config = { }; @@ -322,14 +367,30 @@ in url = "http://localhost:8080"; detector = "default"; source = [ - { entity_id = "camera.camera_camera_cancello"; name = "DOODS2 Camera cancello"; } - { entity_id = "camera.camera_camera_vialetto"; name = "DOODS2 Camera vialetto"; } - { entity_id = "camera.camera_camera_garage"; name = "DOODS2 Camera garage"; } + { + entity_id = "camera.camera_camera_cancello"; + name = "DOODS2 Camera cancello"; + } + { + entity_id = "camera.camera_camera_vialetto"; + name = "DOODS2 Camera vialetto"; + } + { + entity_id = "camera.camera_camera_garage"; + name = "DOODS2 Camera garage"; + } ]; confidence = 60; file_out = "/tmp/doods_{{ camera_entity.split('.')[1] }}.jpg"; scan_interval = 5; - labels = [ "bicycle" "car" "cat" "dog" "person" "truck" ]; + labels = [ + "bicycle" + "car" + "cat" + "dog" + "person" + "truck" + ]; } ]; # esphome = { }; @@ -384,11 +445,13 @@ in # "!secret famiglia_t_chat_id" # ]; # }]; - tts = [{ - platform = "google_translate"; - language = "it"; - # tld = "it"; - }]; + tts = [ + { + platform = "google_translate"; + language = "it"; + # tld = "it"; + } + ]; }; configDir = "/var/lib/hass"; configWritable = true; @@ -473,21 +536,44 @@ in services.prometheus = { enable = true; exporters = { - node = { enable = true; enabledCollectors = [ "systemd" ]; }; + node = { + enable = true; + enabledCollectors = [ "systemd" ]; + }; process = { enable = true; settings.process_names = [ # Remove nix store path from process name - { name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; } + { + name = "{{.Matches.Wrapped}} {{ .Matches.Args }}"; + cmdline = [ "^/nix/store[^ ]*/(?P[^ /]*) (?P.*)" ]; + } ]; }; systemd.enable = true; }; - globalConfig = { scrape_interval = "10s"; }; + globalConfig = { + scrape_interval = "10s"; + }; scrapeConfigs = [ - { job_name = "node"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; }]; } - { job_name = "process"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; }]; } - { job_name = "systemd"; static_configs = [{ targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; }]; } + { + job_name = "node"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}" ]; } + ]; + } + { + job_name = "process"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.process.port}" ]; } + ]; + } + { + job_name = "systemd"; + static_configs = [ + { targets = [ "localhost:${toString config.services.prometheus.exporters.systemd.port}" ]; } + ]; + } ]; retentionTime = "15d"; }; diff --git a/instances/loki/hardware-configuration.nix b/instances/loki/hardware-configuration.nix index aa01cce..5c9db8d 100644 --- a/instances/loki/hardware-configuration.nix +++ b/instances/loki/hardware-configuration.nix @@ -1,14 +1,26 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, modulesPath, ... }: +{ config +, lib +, modulesPath +, ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { initrd = { - availableKernelModules = [ "xhci_pci" "ehci_pci" "ahci" "uas" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ]; + availableKernelModules = [ + "xhci_pci" + "ehci_pci" + "ahci" + "uas" + "usb_storage" + "sd_mod" + "rtsx_pci_sdmmc" + ]; kernelModules = [ ]; }; kernelModules = [ "kvm-intel" ]; @@ -46,10 +58,12 @@ # }; }; - swapDevices = [{ - device = "/swapfile"; - size = 1024 * 4; - }]; + swapDevices = [ + { + device = "/swapfile"; + size = 1024 * 4; + } + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/instances/loki/hm.nix b/instances/loki/hm.nix index 5490099..27e0ffc 100644 --- a/instances/loki/hm.nix +++ b/instances/loki/hm.nix @@ -3,7 +3,10 @@ language.base = "it_IT.UTF-8"; keyboard = { layout = "it"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + ]; }; }; diff --git a/instances/loki/hm_tiziano.nix b/instances/loki/hm_tiziano.nix index 6522c9e..2781ae9 100644 --- a/instances/loki/hm_tiziano.nix +++ b/instances/loki/hm_tiziano.nix @@ -3,7 +3,10 @@ language.base = "it_IT.UTF-8"; keyboard = { layout = "it"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + ]; }; }; diff --git a/instances/odin/common_configuration.nix b/instances/odin/common_configuration.nix index db20b37..f3f24e5 100644 --- a/instances/odin/common_configuration.nix +++ b/instances/odin/common_configuration.nix @@ -1,13 +1,18 @@ -{ config, pkgs, lib, ... }: +{ config +, pkgs +, lib +, ... +}: { - age.secrets = { - ntfy-odin = { file = ../../secrets/ntfy-odin.age; owner = "bertof"; }; + ntfy-odin = { + file = ../../secrets/ntfy-odin.age; + owner = "bertof"; + }; odin_wg_priv.file = ../../secrets/odin_wg_priv.age; }; - # Use the systemd-boot EFI boot loader. boot = { # kernelPackages = pkgs.linuxPackages_latest; @@ -15,11 +20,20 @@ # kernelPackages = pkgs.linuxPackages_6_8; kernelParams = [ "acpi_osi=Linux-Dell-Video" ]; initrd.checkJournalingFS = true; # Use same ACPI identifier as Dell Ubuntu - loader = { systemd-boot = { enable = true; editor = false; }; efi.canTouchEfiVariables = true; }; + loader = { + systemd-boot = { + enable = true; + editor = false; + }; + efi.canTouchEfiVariables = true; + }; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; # Cross-build arm - binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; + binfmt.emulatedSystems = [ + "armv7l-linux" + "aarch64-linux" + ]; }; hardware = { @@ -33,15 +47,22 @@ driSupport = true; driSupport32Bit = true; extraPackages = builtins.attrValues { - inherit (pkgs) intel-media-driver vaapiIntel vaapiVdpau libvdpau-va-gl; + inherit (pkgs) + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ; }; }; # Tablet - opentabletdriver = { enable = true; daemon.enable = true; }; + opentabletdriver = { + enable = true; + daemon.enable = true; + }; }; - networking = { hostName = "odin"; networkmanager.enable = true; @@ -113,7 +134,10 @@ options = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; }; - displayManager.gdm = { enable = true; autoSuspend = false; }; + displayManager.gdm = { + enable = true; + autoSuspend = false; + }; # displayManager.sddm = { # enable = true; # autoNumlock = true; @@ -121,7 +145,10 @@ # "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; # }; }; - displayManager = { enable = true; defaultSession = "hyprland"; }; + displayManager = { + enable = true; + defaultSession = "hyprland"; + }; libinput.enable = true; keybase.enable = true; @@ -130,7 +157,10 @@ enable = true; pulse.enable = true; jack.enable = true; - alsa = { enable = true; support32Bit = true; }; + alsa = { + enable = true; + support32Bit = true; + }; # media-session.enable = true; }; @@ -145,7 +175,10 @@ }; # Disable auto handling of power button - logind = { powerKey = "ignore"; lidSwitch = "hibernate"; }; + logind = { + powerKey = "ignore"; + lidSwitch = "hibernate"; + }; }; # Set your time zone. @@ -160,22 +193,43 @@ environment = { pathsToLink = [ "/share/zsh" ]; - sessionVariables.LD_LIBRARY_PATH = lib.mkForce - "${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK - systemPackages = builtins.attrValues { inherit (pkgs) tmux helix vim git ntfs3g; }; + sessionVariables.LD_LIBRARY_PATH = lib.mkForce "${config.services.pipewire.package.jack}/lib"; # Temporary fix for WebKitGTK + systemPackages = builtins.attrValues { + inherit (pkgs) + tmux + helix + vim + git + ntfs3g + ; + }; }; # Define a user account. Don't forget to set a password with ‘passwd’. users.users.bertof = { isNormalUser = true; - extraGroups = [ "audio" "input" "docker" "flashrom" "libvirtd" "network" "networkmanager" "usb" "video" "wheel" ]; + extraGroups = [ + "audio" + "input" + "docker" + "flashrom" + "libvirtd" + "network" + "networkmanager" + "usb" + "video" + "wheel" + ]; shell = pkgs.zsh; }; programs = { dconf.enable = true; flashrom.enable = true; - gnupg.agent = { enable = true; enableSSHSupport = true; }; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; steam = { enable = true; package = pkgs.steam.override { @@ -267,7 +321,10 @@ power-profiles-daemon.enable = true; fprintd = { enable = true; - tod = { enable = true; driver = pkgs.libfprint-2-tod1-goodix; }; + tod = { + enable = true; + driver = pkgs.libfprint-2-tod1-goodix; + }; }; }; @@ -286,7 +343,6 @@ # updater.enable = true; # }; - # services.teamviewer.enable = true; # Virtualisation @@ -294,12 +350,14 @@ # vswitch.enable = true; # docker.enable = true; kvmgt.enable = true; - libvirtd = { enable = true; qemu.swtpm.enable = true; }; + libvirtd = { + enable = true; + qemu.swtpm.enable = true; + }; podman.enable = true; # virtualbox.host.enable = true; }; - security.sudo.extraConfig = '' Defaults pwfeedback ''; @@ -308,9 +366,7 @@ nixpkgs.config = { allowUnfree = true; - packageOverrides = pkgs: { - steam = pkgs.steam.override { extraPkgs = pkgs: [ pkgs.icu ]; }; - }; + packageOverrides = pkgs: { steam = pkgs.steam.override { extraPkgs = pkgs: [ pkgs.icu ]; }; }; }; zramSwap.enable = true; @@ -323,4 +379,3 @@ # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "22.11"; # Did you read the comment? } - diff --git a/instances/odin/configuration-intel.nix b/instances/odin/configuration-intel.nix index 0c00ee4..4502a93 100644 --- a/instances/odin/configuration-intel.nix +++ b/instances/odin/configuration-intel.nix @@ -5,7 +5,10 @@ { boot = { initrd.kernelModules = [ "i915" ]; - blacklistedKernelModules = [ "nouveau" "nvidia" ]; + blacklistedKernelModules = [ + "nouveau" + "nvidia" + ]; }; # This runs only Intel and nvidia does not drain power. diff --git a/instances/odin/configuration-nvidia.nix b/instances/odin/configuration-nvidia.nix index db97abb..f36129b 100644 --- a/instances/odin/configuration-nvidia.nix +++ b/instances/odin/configuration-nvidia.nix @@ -1,9 +1,16 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ pkgs, lib, config, ... }: { +{ pkgs +, lib +, config +, ... +}: +{ - boot = { initrd.kernelModules = [ "i915" ]; }; + boot = { + initrd.kernelModules = [ "i915" ]; + }; hardware.nvidia = { # modesetting.enable = true; diff --git a/instances/odin/hardware-configuration.nix b/instances/odin/hardware-configuration.nix index 74238c0..cd0850d 100644 --- a/instances/odin/hardware-configuration.nix +++ b/instances/odin/hardware-configuration.nix @@ -1,14 +1,23 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, modulesPath, ... }: +{ config +, lib +, modulesPath +, ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { initrd = { - availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ]; + availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "sd_mod" + ]; kernelModules = [ ]; }; kernelModules = [ "kvm-intel" ]; @@ -19,52 +28,92 @@ "/" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@root" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@root" + "x-gvfs-hide" + ]; }; "/nix" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@nix" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@nix" + "x-gvfs-hide" + ]; }; "/home/bertof" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@home" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@home" + "x-gvfs-hide" + ]; }; "/home/bertof/Giochi/SSD" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@games" + "x-gvfs-hide" + ]; }; "/home/bertof/Video" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@videos" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@videos" + "x-gvfs-hide" + ]; }; "/home/bertof/Musica" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@music" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@music" + "x-gvfs-hide" + ]; }; "/home/bertof/Immagini" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@images" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@images" + "x-gvfs-hide" + ]; }; "/home/bertof/Scaricati" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@downloads" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@downloads" + "x-gvfs-hide" + ]; }; "/home/bertof/Documenti" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@documents" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@documents" + "x-gvfs-hide" + ]; }; "/home/bertof/Documenti/Git" = { device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@git" "x-gvfs-hide" ]; + options = [ + "space_cache=v2" + "subvol=@bertof/@git" + "x-gvfs-hide" + ]; }; "/boot" = { device = "/dev/disk/by-uuid/82DB-3444"; @@ -72,9 +121,7 @@ }; }; - swapDevices = [ - { device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; } - ]; + swapDevices = [{ device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; }]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -90,6 +137,5 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/instances/odin/hm.nix b/instances/odin/hm.nix index 6ad3372..60d4aa2 100644 --- a/instances/odin/hm.nix +++ b/instances/odin/hm.nix @@ -1,10 +1,15 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { language.base = "it_IT.UTF-8"; keyboard = { layout = "it,us,us"; variant = ",,colemak"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" "grp:menu_toggle" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + "grp:menu_toggle" + ]; }; packages = builtins.attrValues { inherit (pkgs) @@ -62,7 +67,9 @@ }; }; - services = { gnome-keyring.enable = true; }; + services = { + gnome-keyring.enable = true; + }; xsession = { enable = true; diff --git a/instances/thor/configuration.nix b/instances/thor/configuration.nix index 8d67bf6..313f9a7 100644 --- a/instances/thor/configuration.nix +++ b/instances/thor/configuration.nix @@ -1,14 +1,26 @@ -{ lib, config, pkgs, ... }: +{ lib +, config +, pkgs +, ... +}: { age.secrets = { - thor_wg_priv = { file = ../../secrets/thor_wg_priv.age; }; - ntfy-thor = { file = ../../secrets/ntfy-thor.age; owner = "bertof"; }; + thor_wg_priv = { + file = ../../secrets/thor_wg_priv.age; + }; + ntfy-thor = { + file = ../../secrets/ntfy-thor.age; + owner = "bertof"; + }; }; boot = { kernelModules = [ "hid-nintendo" ]; - binfmt.emulatedSystems = [ "armv7l-linux" "aarch64-linux" ]; + binfmt.emulatedSystems = [ + "armv7l-linux" + "aarch64-linux" + ]; # kernelPackages = pkgs.linuxPackages_latest; # kernelPackages = pkgs.linuxPackages_6_1; extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ]; @@ -42,7 +54,14 @@ environment = { pathsToLink = [ "/share/zsh" ]; - systemPackages = builtins.attrValues { inherit (pkgs) git helix tmux vim; }; + systemPackages = builtins.attrValues { + inherit (pkgs) + git + helix + tmux + vim + ; + }; }; hardware = { @@ -61,7 +80,6 @@ }; }; - opengl.enable = true; bluetooth = { enable = true; @@ -69,7 +87,10 @@ }; enableRedistributableFirmware = true; pulseaudio.enable = false; - opentabletdriver = { enable = true; daemon.enable = true; }; + opentabletdriver = { + enable = true; + daemon.enable = true; + }; }; i18n.defaultLocale = "it_IT.UTF-8"; @@ -100,15 +121,24 @@ wg-quick.interfaces = { wg0 = { autostart = false; - address = [ "10.0.0.4/24" "fdc9:281f:04d7:9ee9::4/64" ]; - dns = [ "10.0.0.1" "fdc9:281f:04d7:9ee9::1" ]; + address = [ + "10.0.0.4/24" + "fdc9:281f:04d7:9ee9::4/64" + ]; + dns = [ + "10.0.0.1" + "fdc9:281f:04d7:9ee9::1" + ]; privateKeyFile = config.age.secrets.thor_wg_priv.path; peers = [ { # baldur # allowedIPs = [ "10.0.0.3/32" "fdc9:281f:04d7:9ee9::3/128" ]; - allowedIPs = [ "0.0.0.0/0" "::/0" ]; + allowedIPs = [ + "0.0.0.0/0" + "::/0" + ]; endpoint = "baldur.bertof.net:51820"; presharedKeyFile = config.age.secrets.wg_psk.path; publicKey = "K57ikgFSR1O0CXWBxfQEu7uxSOsp3ePj/NMRets5pVc="; @@ -117,19 +147,28 @@ # odin publicKey = "LDBhvzeYmHJ0z5ch+N559GWjT3It1gZvGR/9WtCfURw="; presharedKeyFile = config.age.secrets.wg_psk.path; - allowedIPs = [ "10.0.0.2/24" "fdc9:281f:04d7:9ee9::2/128" ]; + allowedIPs = [ + "10.0.0.2/24" + "fdc9:281f:04d7:9ee9::2/128" + ]; } { # oppo publicKey = "OBk6bHKuIYLwD7cwjmAuMn57jXqbDwCL52jhQxiHnnA="; presharedKeyFile = config.age.secrets.wg_psk.path; - allowedIPs = [ "10.0.0.3/24" "fdc9:281f:04d7:9ee9::3/128" ]; + allowedIPs = [ + "10.0.0.3/24" + "fdc9:281f:04d7:9ee9::3/128" + ]; } { # thor publicKey = "rpwR6n4IE96VZAmQDBufsWE/a9G7d8fpkvY1OwsbOhk="; presharedKeyFile = config.age.secrets.wg_psk.path; - allowedIPs = [ "10.0.0.4/24" "fdc9:281f:04d7:9ee9::4/128" ]; + allowedIPs = [ + "10.0.0.4/24" + "fdc9:281f:04d7:9ee9::4/128" + ]; } ]; }; @@ -159,7 +198,10 @@ # daemon.enable = true; # updater.enable = true; # }; - dbus = { packages = [ pkgs.dconf ]; implementation = "broker"; }; + dbus = { + packages = [ pkgs.dconf ]; + implementation = "broker"; + }; gnome.gnome-keyring.enable = true; gvfs = { enable = true; @@ -168,10 +210,16 @@ # joycond.enable = true; keybase.enable = true; onedrive.enable = true; - openssh = { enable = true; openFirewall = true; }; + openssh = { + enable = true; + openFirewall = true; + }; pipewire = { enable = true; - alsa = { enable = true; support32Bit = true; }; + alsa = { + enable = true; + support32Bit = true; + }; jack.enable = true; pulse.enable = true; # media-session.enable = true; @@ -206,17 +254,22 @@ xserver = { enable = true; desktopManager.gnome.enable = true; - displayManager.gdm = { enable = true; autoSuspend = false; }; + displayManager.gdm = { + enable = true; + autoSuspend = false; + }; # windowManager.bspwm = { enable = true; }; videoDrivers = [ "nvidia" ]; xkb = { layout = "us,it"; options = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; }; - xrandrHeads = [{ - primary = true; - output = "DP-2"; - }]; + xrandrHeads = [ + { + primary = true; + output = "DP-2"; + } + ]; }; # gnome.gnome-remote-desktop.enable = true; }; @@ -226,7 +279,9 @@ security = { tpm2.enable = true; rtkit.enable = true; - pam.services = { autounlock_gnome_keyring.enableGnomeKeyring = true; }; + pam.services = { + autounlock_gnome_keyring.enableGnomeKeyring = true; + }; sudo.extraConfig = '' Defaults pwfeedback ''; @@ -261,9 +316,7 @@ nixpkgs.config = { allowUnfree = true; - packageOverrides = pkgs: { - steam = pkgs.steam.override { extraPkgs = pkgs: [ pkgs.icu ]; }; - }; + packageOverrides = pkgs: { steam = pkgs.steam.override { extraPkgs = pkgs: [ pkgs.icu ]; }; }; # cudaSupport = true; }; diff --git a/instances/thor/hardware-configuration.nix b/instances/thor/hardware-configuration.nix index 23e7500..c6c6fac 100644 --- a/instances/thor/hardware-configuration.nix +++ b/instances/thor/hardware-configuration.nix @@ -9,7 +9,14 @@ boot = { extraModulePackages = [ ]; initrd = { - availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + availableKernelModules = [ + "nvme" + "xhci_pci" + "ahci" + "usb_storage" + "usbhid" + "sd_mod" + ]; kernelModules = [ "dm-snapshot" ]; }; kernelModules = [ "kvm-amd" ]; @@ -19,7 +26,13 @@ "/" = { device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126"; fsType = "btrfs"; - options = [ "subvol=@root" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; + options = [ + "subvol=@root" + "x-gvfs-hide" + "space_cache=v2" + "discard" + "compress-force=zstd:1" + ]; }; "/boot" = { device = "/dev/disk/by-uuid/B9D2-255C"; @@ -28,17 +41,32 @@ "/home/bertof" = { device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126"; fsType = "btrfs"; - options = [ "subvol=@home_bertof" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; + options = [ + "subvol=@home_bertof" + "x-gvfs-hide" + "space_cache=v2" + "discard" + "compress-force=zstd:1" + ]; }; "/nix" = { device = "/dev/disk/by-uuid/6c06428e-c296-4ef1-8429-62bafb860126"; fsType = "btrfs"; - options = [ "subvol=@nix" "x-gvfs-hide" "space_cache=v2" "discard" "compress-force=zstd:1" ]; + options = [ + "subvol=@nix" + "x-gvfs-hide" + "space_cache=v2" + "discard" + "compress-force=zstd:1" + ]; }; }; swapDevices = [ { device = "/dev/disk/by-uuid/dee188e4-4ff8-417c-9419-b7f00ecb9989"; } - { device = "/swapfile"; size = 1024 * 32; } + { + device = "/swapfile"; + size = 1024 * 32; + } ]; } diff --git a/instances/thor/hm.nix b/instances/thor/hm.nix index d715594..3a3ddec 100644 --- a/instances/thor/hm.nix +++ b/instances/thor/hm.nix @@ -1,10 +1,15 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { language.base = "it_IT.UTF-8"; keyboard = { layout = "us,it"; variant = ",colemak,"; - options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" "grp:menu_toggle" ]; + options = [ + "terminate:ctrl_alt_bksp" + "compose:rctrl" + "grp:menu_toggle" + ]; }; packages = builtins.attrValues { inherit (pkgs) @@ -58,13 +63,13 @@ # seahorse totem ; - inherit (pkgs.unstable_pkgs) - heroic - ; + inherit (pkgs.unstable_pkgs) heroic; }; }; - services = { gnome-keyring.enable = true; }; + services = { + gnome-keyring.enable = true; + }; imports = [ ../../modules/hm/__basic.nix diff --git a/modules/hm/__basic.nix b/modules/hm/__basic.nix index 2cf990a..cf41372 100644 --- a/modules/hm/__basic.nix +++ b/modules/hm/__basic.nix @@ -1,10 +1,24 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { language.base = "it_IT.UTF-8"; packages = builtins.attrValues { inherit (pkgs) - fd file htop mmv-go neofetch nixos-option pv ripgrep unrar unzip wget - xclip yq zip; + fd + file + htop + mmv-go + neofetch + nixos-option + pv + ripgrep + unrar + unzip + wget + xclip + yq + zip + ; }; }; diff --git a/modules/hm/alacritty.nix b/modules/hm/alacritty.nix index d35aa29..c114b33 100644 --- a/modules/hm/alacritty.nix +++ b/modules/hm/alacritty.nix @@ -27,11 +27,13 @@ in programs.alacritty = { enable = true; settings = { - key_bindings = [{ - key = "Return"; - mods = "Control|Shift"; - action = "SpawnNewInstance"; - }]; + key_bindings = [ + { + key = "Return"; + mods = "Control|Shift"; + action = "SpawnNewInstance"; + } + ]; # env.TERM = "xterm-256color"; env = { TERM = "alacritty"; diff --git a/modules/hm/autorandr.nix b/modules/hm/autorandr.nix index 63d5d23..180377a 100644 --- a/modules/hm/autorandr.nix +++ b/modules/hm/autorandr.nix @@ -5,8 +5,7 @@ let dell-laptop = { dpi = 96; - fingerprint = - "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; + fingerprint = "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; mode = "1920x1080"; }; schermo_lab_dp = { @@ -22,7 +21,9 @@ in { odin-nvidia = { - fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; }; + fingerprint = { + "eDP-1-1" = dell-laptop.fingerprint; + }; config = { "eDP-1-1" = { inherit (dell-laptop) mode dpi; @@ -32,7 +33,9 @@ }; odin-intel = { - fingerprint = { "eDP1" = dell-laptop.fingerprint; }; + fingerprint = { + "eDP1" = dell-laptop.fingerprint; + }; config = { "eDP1" = { inherit (dell-laptop) mode dpi; @@ -111,10 +114,8 @@ thor-default = { fingerprint = { - "DP-2" = - "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; - "HDMI-0" = - "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; + "DP-2" = "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; + "HDMI-0" = "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; }; config = { "DP-2" = { diff --git a/modules/hm/bash.nix b/modules/hm/bash.nix index 71ceb40..8a83e81 100644 --- a/modules/hm/bash.nix +++ b/modules/hm/bash.nix @@ -2,7 +2,9 @@ programs.bash = { enable = true; enableVteIntegration = true; - shellAliases = { ".." = "cd .."; }; + shellAliases = { + ".." = "cd .."; + }; bashrcExtra = '' source $HOME/.profile diff --git a/modules/hm/biblio.nix b/modules/hm/biblio.nix index 2b08989..9b4dd82 100644 --- a/modules/hm/biblio.nix +++ b/modules/hm/biblio.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) calibre; inherit (pkgs.unstable_pkgs) mangal; diff --git a/modules/hm/bitwarden.nix b/modules/hm/bitwarden.nix index ec9a864..5b081d3 100644 --- a/modules/hm/bitwarden.nix +++ b/modules/hm/bitwarden.nix @@ -1,6 +1,14 @@ -{ pkgs, config, lib, ... }: { - home.packages = [ pkgs.bitwarden ] ++ - lib.optionals config.programs.rofi.enable (builtins.attrValues { - # inherit (pkgs.unstable_pkgs) rbw rofi-rbw pinentry-gtk2; - }); +{ pkgs +, config +, lib +, ... +}: +{ + home.packages = + [ pkgs.bitwarden ] + ++ lib.optionals config.programs.rofi.enable ( + builtins.attrValues { + # inherit (pkgs.unstable_pkgs) rbw rofi-rbw pinentry-gtk2; + } + ); } diff --git a/modules/hm/blender.nix b/modules/hm/blender.nix index 10ed55d..f7e34ca 100644 --- a/modules/hm/blender.nix +++ b/modules/hm/blender.nix @@ -1 +1,4 @@ -{ pkgs, ... }: { home.packages = [ pkgs.blender ]; } +{ pkgs, ... }: +{ + home.packages = [ pkgs.blender ]; +} diff --git a/modules/hm/blender_nvidia.nix b/modules/hm/blender_nvidia.nix index 2511389..e7b6451 100644 --- a/modules/hm/blender_nvidia.nix +++ b/modules/hm/blender_nvidia.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = [ (pkgs.blender.override { cudaSupport = true; }) ]; } - diff --git a/modules/hm/bottom.nix b/modules/hm/bottom.nix index d5a2b97..21c95bc 100644 --- a/modules/hm/bottom.nix +++ b/modules/hm/bottom.nix @@ -1,6 +1,8 @@ { pkgs, ... }: -let tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml"; -in { +let + tomlGenerate = (pkgs.formats.toml { }).generate "bottom-toml"; +in +{ home.packages = [ pkgs.bottom ]; xdg.configFile."bottom/bottom.toml".source = tomlGenerate { "flags" = { diff --git a/modules/hm/bspwm.nix b/modules/hm/bspwm.nix index 484804c..37e5ef1 100644 --- a/modules/hm/bspwm.nix +++ b/modules/hm/bspwm.nix @@ -1,7 +1,18 @@ { pkgs, lib, ... }: let xsetroot = "${pkgs.xorg.xsetroot}/bin/xsetroot"; - monitorPages = [ "Ⅰ" "Ⅱ" "Ⅲ" "Ⅳ" "Ⅴ" "Ⅵ" "Ⅶ" "Ⅷ" "Ⅸ" "Ⅹ" ]; + monitorPages = [ + "Ⅰ" + "Ⅱ" + "Ⅲ" + "Ⅳ" + "Ⅴ" + "Ⅵ" + "Ⅶ" + "Ⅷ" + "Ⅸ" + "Ⅹ" + ]; monitorPagesString = lib.strings.concatStringsSep " " monitorPages; monitorSetupScript = pkgs.writeShellScript "monitorSetupScript" '' for monitor in $(bspc query -M --names); do @@ -50,9 +61,15 @@ in }; # monitors = builtins.foldl' (acc: monitor: acc // { ${monitor} = monitorPages; }) { } monitors; rules = { - "*" = { follow = true; }; - "Zathura" = { state = "tiled"; }; - "Yad" = { state = "floating"; }; + "*" = { + follow = true; + }; + "Zathura" = { + state = "tiled"; + }; + "Yad" = { + state = "floating"; + }; }; startupPrograms = [ "${monitorSetupScript}" # Setup monitors diff --git a/modules/hm/development/cpp.nix b/modules/hm/development/cpp.nix index e45802f..6457ca0 100644 --- a/modules/hm/development/cpp.nix +++ b/modules/hm/development/cpp.nix @@ -1,10 +1,15 @@ -{ pkgs, config, lib, ... }: { +{ pkgs +, config +, lib +, ... +}: +{ home.packages = lib.optionals config.programs.helix.enable - (builtins.attrValues { - inherit (pkgs) clang-tools cmake-language-server; - }) ++ - lib.optionals config.programs.kakoune.enable (builtins.attrValues { - inherit (pkgs) clang-tools cmake-language-server; - }); + ( + builtins.attrValues { inherit (pkgs) clang-tools cmake-language-server; } + ) + ++ lib.optionals config.programs.kakoune.enable ( + builtins.attrValues { inherit (pkgs) clang-tools cmake-language-server; } + ); } diff --git a/modules/hm/development/data.nix b/modules/hm/development/data.nix index 29b6a37..f777292 100644 --- a/modules/hm/development/data.nix +++ b/modules/hm/development/data.nix @@ -1,10 +1,21 @@ -{ config, pkgs, lib, ... }: { - home.packages = lib.optionals config.programs.helix.enable - (builtins.attrValues { - inherit (pkgs) yaml-language-server taplo-cli; - inherit (pkgs.nodePackages) vscode-langservers-extracted; - }) ++ lib.optionals config.programs.kakoune.enable (builtins.attrValues { - inherit (pkgs) yaml-language-server; - inherit (pkgs.nodePackages) vscode-langservers-extracted; - }); +{ config +, pkgs +, lib +, ... +}: +{ + home.packages = + lib.optionals config.programs.helix.enable + ( + builtins.attrValues { + inherit (pkgs) yaml-language-server taplo-cli; + inherit (pkgs.nodePackages) vscode-langservers-extracted; + } + ) + ++ lib.optionals config.programs.kakoune.enable ( + builtins.attrValues { + inherit (pkgs) yaml-language-server; + inherit (pkgs.nodePackages) vscode-langservers-extracted; + } + ); } diff --git a/modules/hm/development/database.nix b/modules/hm/development/database.nix index e1bb92c..1e97f58 100644 --- a/modules/hm/development/database.nix +++ b/modules/hm/development/database.nix @@ -1,3 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs.unstable_pkgs.jetbrains) datagrip jdk; }; } diff --git a/modules/hm/development/docker.nix b/modules/hm/development/docker.nix index 5f62ec4..a1b4df2 100644 --- a/modules/hm/development/docker.nix +++ b/modules/hm/development/docker.nix @@ -1,6 +1,14 @@ -{ pkgs, config, lib, ... }: { - home.packages = (builtins.attrValues { inherit (pkgs) docker-compose; }) - ++ lib.optionals config.programs.helix.enable (builtins.attrValues { inherit (pkgs.nodePackages) dockerfile-language-server-nodejs; }); +{ pkgs +, config +, lib +, ... +}: +{ + home.packages = + (builtins.attrValues { inherit (pkgs) docker-compose; }) + ++ lib.optionals config.programs.helix.enable ( + builtins.attrValues { inherit (pkgs.nodePackages) dockerfile-language-server-nodejs; } + ); home.shellAliases = { "dkcd" = "docker-compose down"; "dkc" = "docker-compose"; @@ -8,4 +16,3 @@ "dk" = "docker"; }; } - diff --git a/modules/hm/development/go.nix b/modules/hm/development/go.nix index c470fb0..effd36b 100644 --- a/modules/hm/development/go.nix +++ b/modules/hm/development/go.nix @@ -1,10 +1,15 @@ -{ pkgs, lib, config, ... }: { +{ pkgs +, lib +, config +, ... +}: +{ programs.go = { enable = true; goPath = ".go"; }; home.packages = - (lib.optionals config.programs.helix.enable [ pkgs.gopls ]) ++ - (lib.optionals config.programs.kakoune.enable [ pkgs.gopls ]); + (lib.optionals config.programs.helix.enable [ pkgs.gopls ]) + ++ (lib.optionals config.programs.kakoune.enable [ pkgs.gopls ]); } diff --git a/modules/hm/development/javascript.nix b/modules/hm/development/javascript.nix index 4872926..e8fb66c 100644 --- a/modules/hm/development/javascript.nix +++ b/modules/hm/development/javascript.nix @@ -1,10 +1,16 @@ -{ pkgs, lib, config, ... }: { - home.packages = lib.optionals config.programs.helix.enable - (builtins.attrValues { - inherit (pkgs.nodePackages) typescript-language-server; - }) ++ lib.optionals config.programs.kakoune.enable (builtins.attrValues { - inherit (pkgs.nodePackages) typescript-language-server; - }); +{ pkgs +, lib +, config +, ... +}: +{ + home.packages = + lib.optionals config.programs.helix.enable + ( + builtins.attrValues { inherit (pkgs.nodePackages) typescript-language-server; } + ) + ++ lib.optionals config.programs.kakoune.enable ( + builtins.attrValues { inherit (pkgs.nodePackages) typescript-language-server; } + ); programs.neovim.withNodeJs = true; } - diff --git a/modules/hm/development/kubernetes.nix b/modules/hm/development/kubernetes.nix index 273cbf2..e18d3d9 100644 --- a/modules/hm/development/kubernetes.nix +++ b/modules/hm/development/kubernetes.nix @@ -1,6 +1,9 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { - shellAliases = { "k" = "kubectl"; }; + shellAliases = { + "k" = "kubectl"; + }; packages = [ (pkgs.wrapHelm pkgs.kubernetes-helm { plugins = builtins.attrValues { diff --git a/modules/hm/development/latex.nix b/modules/hm/development/latex.nix index 82731cb..b9b3b31 100644 --- a/modules/hm/development/latex.nix +++ b/modules/hm/development/latex.nix @@ -1,10 +1,26 @@ -{ pkgs, config, lib, ... }: { - home.packages = [ pkgs.bibtool pkgs.texlive.combined.scheme-full ] +{ pkgs +, config +, lib +, ... +}: +{ + home.packages = + [ + pkgs.bibtool + pkgs.texlive.combined.scheme-full + ] ++ lib.optionals config.programs.helix.enable [ pkgs.texlab ] - ++ lib.optionals config.programs.kakoune.enable (builtins.attrValues { - inherit (pkgs) texlab aspell; - inherit (pkgs.aspellDicts) en en-computers en-science it; - }); + ++ lib.optionals config.programs.kakoune.enable ( + builtins.attrValues { + inherit (pkgs) texlab aspell; + inherit (pkgs.aspellDicts) + en + en-computers + en-science + it + ; + } + ); home.file.".latexmkrc".text = '' $pdf_previewer = 'zathura %O %S'; diff --git a/modules/hm/development/markdown.nix b/modules/hm/development/markdown.nix index 9f6e0d1..fcc128c 100644 --- a/modules/hm/development/markdown.nix +++ b/modules/hm/development/markdown.nix @@ -1,10 +1,12 @@ -{ pkgs, lib, config, ... }: { +{ pkgs +, lib +, config +, ... +}: +{ home.packages = [ pkgs.pandoc # pkgs.pandoc-drawio-filter # pkgs.pandoc-imagine - ] - ++ lib.optionals config.programs.helix.enable [ - pkgs.marksman - ]; + ] ++ lib.optionals config.programs.helix.enable [ pkgs.marksman ]; } diff --git a/modules/hm/development/nix.nix b/modules/hm/development/nix.nix index 967b77d..a9df62a 100644 --- a/modules/hm/development/nix.nix +++ b/modules/hm/development/nix.nix @@ -1,6 +1,19 @@ -{ pkgs, config, lib, ... }: { +{ pkgs +, config +, lib +, ... +}: +{ home.packages = - (builtins.attrValues { inherit (pkgs) nixpkgs-fmt nixfmt-classic nix-prefetch-scripts nixpkgs-review nix-tree; }) + (builtins.attrValues { + inherit (pkgs) + nixpkgs-fmt + nixfmt-classic + nix-prefetch-scripts + nixpkgs-review + nix-tree + ; + }) ++ lib.optionals config.programs.helix.enable [ pkgs.nil ] ++ lib.optionals config.programs.kakoune.enable [ pkgs.rnix-lsp ]; programs.neovim.plugins = [ pkgs.vimPlugins.vim-nix ]; diff --git a/modules/hm/development/python.nix b/modules/hm/development/python.nix index 5678020..77c59e4 100644 --- a/modules/hm/development/python.nix +++ b/modules/hm/development/python.nix @@ -1,22 +1,26 @@ -{ pkgs, lib, config, ... }: +{ pkgs +, lib +, config +, ... +}: let py = pkgs.python3; pyPkgs = py.pkgs; in { - home.packages = [ py pyPkgs.black ] ++ - lib.optionals config.programs.helix.enable ((builtins.attrValues { - inherit (pyPkgs) - python-lsp-server - pyls-flake8 - pyls-isort; - }) ++ pyPkgs.python-lsp-server.optional-dependencies.all) ++ - lib.optionals config.programs.kakoune.enable ((builtins.attrValues { - inherit (pyPkgs) - python-lsp-server - pyls-flake8 - pyls-isort; - }) ++ pyPkgs.python-lsp-server.optional-dependencies.all); + home.packages = + [ + py + pyPkgs.black + ] + ++ lib.optionals config.programs.helix.enable ( + (builtins.attrValues { inherit (pyPkgs) python-lsp-server pyls-flake8 pyls-isort; }) + ++ pyPkgs.python-lsp-server.optional-dependencies.all + ) + ++ lib.optionals config.programs.kakoune.enable ( + (builtins.attrValues { inherit (pyPkgs) python-lsp-server pyls-flake8 pyls-isort; }) + ++ pyPkgs.python-lsp-server.optional-dependencies.all + ); programs.neovim.withPython3 = true; } diff --git a/modules/hm/development/rust.nix b/modules/hm/development/rust.nix index b10836c..e84aac3 100644 --- a/modules/hm/development/rust.nix +++ b/modules/hm/development/rust.nix @@ -1,21 +1,52 @@ -{ pkgs, lib, config, ... }: -let tomlGenerate = (pkgs.formats.toml { }).generate; in +{ pkgs +, lib +, config +, ... +}: +let + tomlGenerate = (pkgs.formats.toml { }).generate; +in { - home.packages = (builtins.attrValues { - inherit (pkgs) - bacon cargo cargo-audit cargo-criterion cargo-deadlinks cargo-expand - cargo-flamegraph cargo-fuzz cargo-hack cargo-hakari cargo-inspect - cargo-modules cargo-outdated cargo-profiler cargo-release cargo-show-asm - cargo-spellcheck cargo-tarpaulin cargo-udeps cargo-watch cargo-workspaces - clippy rustc rustfmt; - # cargo-about - # cargo-auditable - # cargo-deny - # cargo-deps - # cargo-feature - }) - ++ lib.optionals config.programs.helix.enable (builtins.attrValues { inherit (pkgs) lldb rust-analyzer; }) - ++ lib.optionals config.programs.kakoune.enable (builtins.attrValues { inherit (pkgs) rust-analyzer; }); + home.packages = + (builtins.attrValues { + inherit (pkgs) + bacon + cargo + cargo-audit + cargo-criterion + cargo-deadlinks + cargo-expand + cargo-flamegraph + cargo-fuzz + cargo-hack + cargo-hakari + cargo-inspect + cargo-modules + cargo-outdated + cargo-profiler + cargo-release + cargo-show-asm + cargo-spellcheck + cargo-tarpaulin + cargo-udeps + cargo-watch + cargo-workspaces + clippy + rustc + rustfmt + ; + # cargo-about + # cargo-auditable + # cargo-deny + # cargo-deps + # cargo-feature + }) + ++ lib.optionals config.programs.helix.enable ( + builtins.attrValues { inherit (pkgs) lldb rust-analyzer; } + ) + ++ lib.optionals config.programs.kakoune.enable ( + builtins.attrValues { inherit (pkgs) rust-analyzer; } + ); home.file.".cargo/config.toml".source = tomlGenerate "cargo-config" { build.rustc-wrapper = "${pkgs.sccache}/bin/sccache"; diff --git a/modules/hm/development/web.nix b/modules/hm/development/web.nix index 46dcb3d..aa2839f 100644 --- a/modules/hm/development/web.nix +++ b/modules/hm/development/web.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = [ pkgs.httpie ]; } - diff --git a/modules/hm/easyeffects.nix b/modules/hm/easyeffects.nix index 73870e0..44dda47 100644 --- a/modules/hm/easyeffects.nix +++ b/modules/hm/easyeffects.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = [ pkgs.easyeffects ]; services.easyeffects.enable = true; } diff --git a/modules/hm/exa.nix b/modules/hm/exa.nix index 7912180..36a84c1 100644 --- a/modules/hm/exa.nix +++ b/modules/hm/exa.nix @@ -5,4 +5,3 @@ enableZshIntegration = true; }; } - diff --git a/modules/hm/fonts.nix b/modules/hm/fonts.nix index ff2f2ad..5cdbed4 100644 --- a/modules/hm/fonts.nix +++ b/modules/hm/fonts.nix @@ -1,9 +1,17 @@ -{ pkgs, ... }: { - fonts.fontconfig = { enable = true; }; +{ pkgs, ... }: +{ + fonts.fontconfig = { + enable = true; + }; home.packages = builtins.attrValues { inherit (pkgs) - dejavu_fonts noto-fonts noto-fonts-extra noto-fonts-cjk-sans font-awesome + dejavu_fonts + noto-fonts + noto-fonts-extra + noto-fonts-cjk-sans + font-awesome corefonts# Microsoft fonts - vistafonts; + vistafonts + ; }; } diff --git a/modules/hm/git.nix b/modules/hm/git.nix index 15e09b1..1a0ad55 100644 --- a/modules/hm/git.nix +++ b/modules/hm/git.nix @@ -48,10 +48,8 @@ let "gfg" = "git ls-files | grep"; "gignored" = ''git ls-files -v \| grep"^[[ :lower: ]]"''; "glo" = "git log --oneline --decorate"; - "glols" = - "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat"; - "glola" = - "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"; + "glols" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --stat"; + "glola" = "git log --graph --pretty='%Cred%h%Creset -%C(auto)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --all"; "glog" = "git log --oneline --decorate --graph"; "gloga" = "git log --oneline --decorate --graph --all"; "gm" = "git merge"; @@ -140,5 +138,12 @@ in bash.shellAliases = shellAliases; zsh.shellAliases = shellAliases; }; - home.packages = builtins.attrValues { inherit (pkgs) gh git-secret glab meld; }; + home.packages = builtins.attrValues { + inherit (pkgs) + gh + git-secret + glab + meld + ; + }; } diff --git a/modules/hm/grobi.nix b/modules/hm/grobi.nix index 48f77b3..fda979f 100644 --- a/modules/hm/grobi.nix +++ b/modules/hm/grobi.nix @@ -4,8 +4,14 @@ rules = [ { name = "Nvidia2screens"; - outputs_connected = [ "HDMI-0" "eDP-1-1" ]; - configure_column = [ "HDMI-0" "eDP-1-1" ]; + outputs_connected = [ + "HDMI-0" + "eDP-1-1" + ]; + configure_column = [ + "HDMI-0" + "eDP-1-1" + ]; primary = "HDMI-0"; } { diff --git a/modules/hm/gtk_theme.nix b/modules/hm/gtk_theme.nix index 955ed11..a57718d 100644 --- a/modules/hm/gtk_theme.nix +++ b/modules/hm/gtk_theme.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ gtk = { enable = true; font = pkgs.rice.font.normal; diff --git a/modules/hm/heif.nix b/modules/hm/heif.nix index 0764462..7018821 100644 --- a/modules/hm/heif.nix +++ b/modules/hm/heif.nix @@ -1,7 +1,9 @@ { pkgs, ... }: -let thumbnailer = "${pkgs.libheif.bin}/bin/heif-thumbnailer"; -in { +let + thumbnailer = "${pkgs.libheif.bin}/bin/heif-thumbnailer"; +in +{ # home.packages = [ # pkgs.libheif.bin # ]; diff --git a/modules/hm/helix.nix b/modules/hm/helix.nix index 362ed78..50bc6e0 100644 --- a/modules/hm/helix.nix +++ b/modules/hm/helix.nix @@ -1,7 +1,13 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { - sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; }; - shellAliases = { x = "hx"; }; + sessionVariables = { + EDITOR = "hx"; + VISUAL = "hx"; + }; + shellAliases = { + x = "hx"; + }; packages = builtins.attrValues { inherit (pkgs) nil; # Nix language server # inherit desktopItem; @@ -10,10 +16,12 @@ programs.helix = { enable = true; package = pkgs.unstable_pkgs.helix; - languages.language = [{ - name = "nix"; - auto-format = true; - }]; + languages.language = [ + { + name = "nix"; + auto-format = true; + } + ]; languages.language-server = { nil.config.nil = { formatting.command = [ "nixpkgs-fmt" ]; @@ -82,24 +90,56 @@ { base16 = { "ui.menu" = transparent; - "ui.menu.selected" = { modifiers = [ "reversed" ]; }; - "ui.linenr" = { fg = gray; bg = dark-gray; }; - "ui.popup" = { modifiers = [ "reversed" ]; }; - "ui.linenr.selected" = { fg = white; bg = black; modifiers = [ "bold" ]; }; - "ui.selection" = { fg = black; bg = blue; }; - "ui.selection.primary" = { modifiers = [ "reversed" ]; }; - "comment" = { fg = gray; }; - "ui.statusline" = { fg = white; bg = dark-gray; }; - "ui.statusline.inactive" = { fg = dark-gray; bg = white; }; - "ui.help" = { fg = dark-gray; bg = white; }; - "ui.cursor" = { modifiers = [ "reversed" ]; }; + "ui.menu.selected" = { + modifiers = [ "reversed" ]; + }; + "ui.linenr" = { + fg = gray; + bg = dark-gray; + }; + "ui.popup" = { + modifiers = [ "reversed" ]; + }; + "ui.linenr.selected" = { + fg = white; + bg = black; + modifiers = [ "bold" ]; + }; + "ui.selection" = { + fg = black; + bg = blue; + }; + "ui.selection.primary" = { + modifiers = [ "reversed" ]; + }; + "comment" = { + fg = gray; + }; + "ui.statusline" = { + fg = white; + bg = dark-gray; + }; + "ui.statusline.inactive" = { + fg = dark-gray; + bg = white; + }; + "ui.help" = { + fg = dark-gray; + bg = white; + }; + "ui.cursor" = { + modifiers = [ "reversed" ]; + }; "variable" = red; "variable.builtin" = orange; "constant.numeric" = orange; "constant" = orange; "attributes" = yellow; "type" = yellow; - "ui.cursor.match" = { fg = yellow; modifiers = [ "underlined" ]; }; + "ui.cursor.match" = { + fg = yellow; + modifiers = [ "underlined" ]; + }; "string" = green; "variable.other.member" = red; "constant.character.escape" = cyan; @@ -112,8 +152,12 @@ "diff.plus" = green; "diff.delta" = yellow; "diff.minus" = red; - "diagnostic" = { modifiers = [ "underlined" ]; }; - "ui.gutter" = { bg = black; }; + "diagnostic" = { + modifiers = [ "underlined" ]; + }; + "ui.gutter" = { + bg = black; + }; "info" = blue; "hint" = dark-gray; "debug" = dark-gray; diff --git a/modules/hm/hyprland-bluetooth-keyboard.nix b/modules/hm/hyprland-bluetooth-keyboard.nix index 2f89afe..cf495a1 100644 --- a/modules/hm/hyprland-bluetooth-keyboard.nix +++ b/modules/hm/hyprland-bluetooth-keyboard.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, nixosConfig, ... }: { +{ pkgs +, lib +, nixosConfig +, ... +}: +{ systemd.user.services."bluetooth-keyboard" = { Unit = { Description = "Disable the laptop keyboard when the bluetooth keyboard is connected"; @@ -9,7 +14,14 @@ Service = { Type = "simple"; ExecStart = pkgs.writeShellScript "bluetooth-keyboard.sh" '' - PATH=$PATH:${lib.makeBinPath [pkgs.coreutils pkgs.gnugrep pkgs.libnotify nixosConfig.programs.hyprland.package]} + PATH=$PATH:${ + lib.makeBinPath [ + pkgs.coreutils + pkgs.gnugrep + pkgs.libnotify + nixosConfig.programs.hyprland.package + ] + } BLUETOOTH_DEVICE="keychron-k1-max-keyboard" LAPTOP_DEVICE="at-translated-set-2-keyboard" STATUS_FILE="$XDG_RUNTIME_DIR/bluetooth_keyboard.status" @@ -49,4 +61,3 @@ }; }; } - diff --git a/modules/hm/hyprland.nix b/modules/hm/hyprland.nix index 86aaa3e..a4d6248 100644 --- a/modules/hm/hyprland.nix +++ b/modules/hm/hyprland.nix @@ -1,4 +1,5 @@ -{ nixosConfig, pkgs, ... }: { +{ nixosConfig, pkgs, ... }: +{ imports = [ ./kitty.nix @@ -12,7 +13,29 @@ ./hyprland-bluetooth-keyboard.nix ]; - home.packages = builtins.attrValues { inherit (pkgs) blueman brillo gamescope grimblast networkmanagerapplet wireplumber playerctl swaylock swww walker way-lockscreen waybar wl-clipboard wl-clipedit wlogout wofi wofi-emoji wtype xdg-desktop-portal-gtk; }; + home.packages = builtins.attrValues { + inherit (pkgs) + blueman + brillo + gamescope + grimblast + networkmanagerapplet + wireplumber + playerctl + swaylock + swww + walker + way-lockscreen + waybar + wl-clipboard + wl-clipedit + wlogout + wofi + wofi-emoji + wtype + xdg-desktop-portal-gtk + ; + }; # wayland.windowManager.hyprland = { }; @@ -43,23 +66,26 @@ monitor=Unknown-1,disable ${ if nixosConfig.networking.hostName == "thor" then - '' - monitor=DP-2,preferred,1080x420,auto - monitor=HDMI-A-1,preferred,0x0,auto,transform,3 - '' + '' + monitor=DP-2,preferred,1080x420,auto + monitor=HDMI-A-1,preferred,0x0,auto,transform,3 + '' else if nixosConfig.networking.hostName == "odin" then - '' - monitor=eDP-1,preferred,320x1440,1 - monitor=DP-1,preferred,0x0,1 - '' - else "" + '' + monitor=eDP-1,preferred,320x1440,1 + monitor=DP-1,preferred,0x0,1 + '' + else + "" } # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch - exec-once = ${if nixosConfig.networking.hostName == "thor" then "xrandr --output DP-2 --primary" else "true"} & swww init & nm-applet & blueman-applet & systemctl --user start hyprland-login.target + exec-once = ${ + if nixosConfig.networking.hostName == "thor" then "xrandr --output DP-2 --primary" else "true" + } & swww init & nm-applet & blueman-applet & systemctl --user start hyprland-login.target # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf @@ -69,7 +95,7 @@ # For all categories, see https://wiki.hyprland.org/Configuring/Variables/ input { - kb_layout = ${if nixosConfig.networking.hostName == "thor" then "us,it,us" else "it,us,us" } + kb_layout = ${if nixosConfig.networking.hostName == "thor" then "us,it,us" else "it,us,us"} kb_variant = ,,colemak kb_model = kb_options = grp:menu_toggle,compose:rctrl diff --git a/modules/hm/info.nix b/modules/hm/info.nix index b07463d..3f0ee2a 100644 --- a/modules/hm/info.nix +++ b/modules/hm/info.nix @@ -1 +1,5 @@ -{ programs.info = { enable = true; }; } +{ + programs.info = { + enable = true; + }; +} diff --git a/modules/hm/jellyfin-player.nix b/modules/hm/jellyfin-player.nix index 875c220..6156997 100644 --- a/modules/hm/jellyfin-player.nix +++ b/modules/hm/jellyfin-player.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = [ (pkgs.jellyfin-media-player.overrideAttrs (old: { postInstall = '' diff --git a/modules/hm/joshuto.nix b/modules/hm/joshuto.nix index 1a6b6b4..3294b77 100644 --- a/modules/hm/joshuto.nix +++ b/modules/hm/joshuto.nix @@ -1,5 +1,7 @@ { pkgs, ... }: -let tomlGenerate = (pkgs.formats.toml { }).generate; in +let + tomlGenerate = (pkgs.formats.toml { }).generate; +in { # TODO: switch to module on next release @@ -16,7 +18,11 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in display = { mode = "default"; collapse_preview = true; - column_ratio = [ 1 3 4 ]; + column_ratio = [ + 1 + 3 + 4 + ]; show_borders = true; show_hidden = false; show_icons = true; @@ -44,37 +50,102 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in class = { audio_default = [ - { command = "mpv"; args = [ "--" ]; } - { command = "mediainfo"; confirm_exit = true; } + { + command = "mpv"; + args = [ "--" ]; + } + { + command = "mediainfo"; + confirm_exit = true; + } ]; image_default = [ - { command = "geeqie"; fork = true; silent = true; } - { command = "qimgv"; args = [ "--" ]; fork = true; silent = true; } - { command = "krita"; args = [ "--" ]; fork = true; silent = true; } - { command = "exiftool"; confirm_exit = true; } - { command = "swappy"; args = [ "-f" ]; fork = true; } + { + command = "geeqie"; + fork = true; + silent = true; + } + { + command = "qimgv"; + args = [ "--" ]; + fork = true; + silent = true; + } + { + command = "krita"; + args = [ "--" ]; + fork = true; + silent = true; + } + { + command = "exiftool"; + confirm_exit = true; + } + { + command = "swappy"; + args = [ "-f" ]; + fork = true; + } ]; video_default = [ - { command = "mpv"; args = [ "--" ]; fork = true; silent = true; } - { command = "mediainfo"; confirm_exit = true; } - { command = "mpv"; args = [ "--mute" "on" "--" ]; fork = true; silent = true; } + { + command = "mpv"; + args = [ "--" ]; + fork = true; + silent = true; + } + { + command = "mediainfo"; + confirm_exit = true; + } + { + command = "mpv"; + args = [ + "--mute" + "on" + "--" + ]; + fork = true; + silent = true; + } ]; text_default = [ { command = "hx"; } { command = "micro"; } - { command = "gedit"; fork = true; silent = true; } - { command = "bat"; args = [ "--paging=always" ]; } + { + command = "gedit"; + fork = true; + silent = true; + } + { + command = "bat"; + args = [ "--paging=always" ]; + } ]; reader_default = [ - { command = "evince"; fork = true; silent = true; } - { command = "zathura"; fork = true; silent = true; } + { + command = "evince"; + fork = true; + silent = true; + } + { + command = "zathura"; + fork = true; + silent = true; + } ]; - libreoffice_default = [{ command = "libreoffice"; fork = true; silent = true; }]; + libreoffice_default = [ + { + command = "libreoffice"; + fork = true; + silent = true; + } + ]; }; extension = { @@ -92,12 +163,28 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in webp."inherit" = "image_default"; svg.app_list = [ - { command = "inkview"; fork = true; silent = true; } - { command = "inkscape"; fork = true; silent = true; } + { + command = "inkview"; + fork = true; + silent = true; + } + { + command = "inkscape"; + fork = true; + silent = true; + } ]; tiff.app_list = [ - { command = "qimgv"; fork = true; silent = true; } - { command = "krita"; fork = true; silent = true; } + { + command = "qimgv"; + fork = true; + silent = true; + } + { + command = "krita"; + fork = true; + silent = true; + } ]; ## audio formats @@ -165,46 +252,122 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in # archive formats "7z".app_list = [ - { command = "7z"; args = [ "x" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "7z"; + args = [ "x" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; bz2.app_list = [ - { command = "tar"; args = [ "-xvjf" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "tar"; + args = [ "-xvjf" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; gz.app_list = [ - { command = "tar"; args = [ "-xvzf" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "tar"; + args = [ "-xvzf" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; tar.app_list = [ - { command = "tar"; args = [ "-xvf" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "tar"; + args = [ "-xvf" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; tgz.app_list = [ - { command = "tar"; args = [ "-xvzf" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "tar"; + args = [ "-xvzf" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; rar.app_list = [ - { command = "unrar"; args = [ "x" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "unrar"; + args = [ "x" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; xz.app_list = [ - { command = "tar"; args = [ "-xvJf" ]; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "tar"; + args = [ "-xvJf" ]; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; zip.app_list = [ - { command = "unzip"; confirm_exit = true; } - { command = "file-roller"; fork = true; silent = true; } + { + command = "unzip"; + confirm_exit = true; + } + { + command = "file-roller"; + fork = true; + silent = true; + } ]; # misc formats - aup.app_list = [{ command = "audacity"; fork = true; silent = true; }]; + aup.app_list = [ + { + command = "audacity"; + fork = true; + silent = true; + } + ]; m3u.app_list = [ { command = "micro"; } { command = "mpv"; } - { command = "gedit"; fork = true; silent = true; } - { command = "bat"; confirm_exit = true; } + { + command = "gedit"; + fork = true; + silent = true; + } + { + command = "bat"; + confirm_exit = true; + } ]; odt."inherit" = "libreoffice_default"; @@ -221,13 +384,32 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in pdf."inherit" = "reader_default"; - kra.app_list = [{ command = "krita"; fork = true; silent = true; }]; - kdenlive.app_list = [{ command = "kdenlive"; fork = true; silent = true; }]; + kra.app_list = [ + { + command = "krita"; + fork = true; + silent = true; + } + ]; + kdenlive.app_list = [ + { + command = "kdenlive"; + fork = true; + silent = true; + } + ]; tex.app_list = [ { command = "micro"; } - { command = "gedit"; fork = true; silent = true; } - { command = "bat"; confirm_exit = true; } + { + command = "gedit"; + fork = true; + silent = true; + } + { + command = "bat"; + confirm_exit = true; + } { command = "pdflatex"; } ]; @@ -246,10 +428,22 @@ let tomlGenerate = (pkgs.formats.toml { }).generate; in "joshuto/bookmarks.toml".source = tomlGenerate "joshuto-bookmarks.toml" { bookmark = [ - { path = "/"; key = "r"; } - { path = "~/"; key = "h"; } - { path = "~/Scaricati"; key = "d"; } - { path = "~/Syncthing"; key = "s"; } + { + path = "/"; + key = "r"; + } + { + path = "~/"; + key = "h"; + } + { + path = "~/Scaricati"; + key = "d"; + } + { + path = "~/Syncthing"; + key = "s"; + } ]; }; }; diff --git a/modules/hm/joystickwake.nix b/modules/hm/joystickwake.nix index f178502..e25b20c 100644 --- a/modules/hm/joystickwake.nix +++ b/modules/hm/joystickwake.nix @@ -1,13 +1,17 @@ { pkgs, ... }: -let joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake"; -in { +let + joystickwakeCmd = "${pkgs.joystickwake}/bin/joystickwake"; +in +{ systemd.user.services."joystickwake" = { Unit = { Description = "Keep lockscreen from activating"; After = [ "graphical-session.target" ]; PartOf = [ "graphical-session.target" ]; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; Service = { Type = "simple"; ExecStart = joystickwakeCmd; diff --git a/modules/hm/jq.nix b/modules/hm/jq.nix index 1e9d66a..9d9f199 100644 --- a/modules/hm/jq.nix +++ b/modules/hm/jq.nix @@ -1 +1,5 @@ -{ programs.jq = { enable = true; }; } +{ + programs.jq = { + enable = true; + }; +} diff --git a/modules/hm/kakoune.nix b/modules/hm/kakoune.nix index 5ed7b57..1e60bb8 100644 --- a/modules/hm/kakoune.nix +++ b/modules/hm/kakoune.nix @@ -1,7 +1,7 @@ { pkgs, ... }: let - themeBuilder = palette: - with palette; '' + themeBuilder = + palette: with palette; '' set-face global value rgb:${normal.magenta},default set-face global type rgb:${bright.white},default set-face global identifier rgb:${normal.cyan},default @@ -64,8 +64,12 @@ let in { programs = { - bash.shellAliases = { k = "kak"; }; - zsh.shellAliases = { k = "kak"; }; + bash.shellAliases = { + k = "kak"; + }; + zsh.shellAliases = { + k = "kak"; + }; kakoune = { enable = true; config = { @@ -270,8 +274,9 @@ in home.packages = packages; # THEME FILE - xdg.configFile."kak/colors/nord.kak".text = themeBuilder - (pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette); + xdg.configFile."kak/colors/nord.kak".text = themeBuilder ( + pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette + ); xdg.configFile."kak-lsp/kak-lsp.toml".text = '' snippet_support = false diff --git a/modules/hm/keepassxc.nix b/modules/hm/keepassxc.nix index a96ac50..4356bf6 100644 --- a/modules/hm/keepassxc.nix +++ b/modules/hm/keepassxc.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ config.systemd.user.services.keepassxc = { Unit = { Description = "KeePassXC password manager"; @@ -6,8 +7,12 @@ Partof = [ "graphical-session.target" ]; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; - Service = { ExecStart = "${pkgs.keepassxc}/bin/keepassxc"; }; + Service = { + ExecStart = "${pkgs.keepassxc}/bin/keepassxc"; + }; }; } diff --git a/modules/hm/keychain.nix b/modules/hm/keychain.nix index 30c39b2..4942332 100644 --- a/modules/hm/keychain.nix +++ b/modules/hm/keychain.nix @@ -2,7 +2,10 @@ programs.keychain = { enable = true; keys = [ "id_ed25519" ]; - agents = [ "gpg" "ssh" ]; + agents = [ + "gpg" + "ssh" + ]; enableBashIntegration = true; enableZshIntegration = true; enableXsessionIntegration = true; diff --git a/modules/hm/kicad.nix b/modules/hm/kicad.nix index 4f5d3b5..2818d23 100644 --- a/modules/hm/kicad.nix +++ b/modules/hm/kicad.nix @@ -1 +1,4 @@ -{ pkgs, ... }: { home.packages = [ pkgs.kicad ]; } +{ pkgs, ... }: +{ + home.packages = [ pkgs.kicad ]; +} diff --git a/modules/hm/kitty.nix b/modules/hm/kitty.nix index 0e90fd2..739a98b 100644 --- a/modules/hm/kitty.nix +++ b/modules/hm/kitty.nix @@ -2,8 +2,25 @@ let strPalette = pkgs.lib.nix-rice.palette.toRgbHex { inherit (pkgs.rice.colorPalette) - background foreground color0 color1 color2 color3 color4 color5 color6 - color7 color8 color9 color10 color11 color12 color13 color14 color15; + background + foreground + color0 + color1 + color2 + color3 + color4 + color5 + color6 + color7 + color8 + color9 + color10 + color11 + color12 + color13 + color14 + color15 + ; }; in { @@ -16,8 +33,7 @@ in update_check_interval = 0; background_opacity = toString pkgs.rice.opacity; close_on_child_death = "yes"; - clipboard_control = - "write-clipboard write-primary read-clipboard read-primary"; + clipboard_control = "write-clipboard write-primary read-clipboard read-primary"; disable_ligatures = "never"; editor = "kak"; } // strPalette; diff --git a/modules/hm/lf.nix b/modules/hm/lf.nix index 8a76271..1ae38fb 100644 --- a/modules/hm/lf.nix +++ b/modules/hm/lf.nix @@ -68,55 +68,64 @@ in source = previewer; # keybinding = "i"; }; - keybindings = { "" = "$EDITOR $(fzf)"; }; + keybindings = { + "" = "$EDITOR $(fzf)"; + }; commands = { - mkdir = ''''${{ - printf "Directory name: " - read ans - mkdir $ans - }}''; - mkfile = ''''${{ - printf "File name: " - read ans - $VISUAL $ans - }}''; + mkdir = '' + ''${{ + printf "Directory name: " + read ans + mkdir $ans + }}''; + mkfile = '' + ''${{ + printf "File name: " + read ans + $VISUAL $ans + }}''; - trash = ''''${{ - files=$(printf "$fx" | tr '\n' ';') - while [ "$files" ]; do - file=''${files%%;*} + trash = '' + ''${{ + files=$(printf "$fx" | tr '\n' ';') + while [ "$files" ]; do + file=''${files%%;*} - ${pkgs.trash-cli}/bin/trash-put "$(basename "$file")" - if [ "$files" = "$file" ]; then - files="" - else - files="''${files#*;}" - fi - done - }}''; - restore_trash = ''''${{ - trash-restore - }}''; + ${pkgs.trash-cli}/bin/trash-put "$(basename "$file")" + if [ "$files" = "$file" ]; then + files="" + else + files="''${files#*;}" + fi + done + }}''; + restore_trash = '' + ''${{ + trash-restore + }}''; - z = ''''${{ - result="$(zoxide query --exclude "$PWD" -- "$@")" - lf -remote "send $id cd '$result'" - }}''; - zi = ''''${{ - result="$(zoxide query -i -- "$@")" - lf -remote "send $id cd '$result'" - }}''; - extract = ''''${{ - set -f - case $f in - *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; - *.tar.gz|*.tgz) tar xzvf $f;; - *.tar.xz|*.txz) tar xJvf $f;; - *.zip) unzip $f;; - *.rar) unrar x $f;; - *.7z) 7z x $f;; - esac - }}''; + z = '' + ''${{ + result="$(zoxide query --exclude "$PWD" -- "$@")" + lf -remote "send $id cd '$result'" + }}''; + zi = '' + ''${{ + result="$(zoxide query -i -- "$@")" + lf -remote "send $id cd '$result'" + }}''; + extract = '' + ''${{ + set -f + case $f in + *.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;; + *.tar.gz|*.tgz) tar xzvf $f;; + *.tar.xz|*.txz) tar xJvf $f;; + *.zip) unzip $f;; + *.rar) unrar x $f;; + *.7z) 7z x $f;; + esac + }}''; "tar" = '' ''${{ set -f diff --git a/modules/hm/libinput-gestures.nix b/modules/hm/libinput-gestures.nix index 8a8c172..3b8c037 100644 --- a/modules/hm/libinput-gestures.nix +++ b/modules/hm/libinput-gestures.nix @@ -10,7 +10,9 @@ in After = [ "graphical-session-pre.target" ]; PartOf = [ "graphical-session.target" ]; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; Service = { Type = "simple"; ExecStart = libinputGesturesCmd; diff --git a/modules/hm/lutris.nix b/modules/hm/lutris.nix index acee13c..bf82131 100644 --- a/modules/hm/lutris.nix +++ b/modules/hm/lutris.nix @@ -1,3 +1,7 @@ -{ pkgs, ... }: { - home.packages = [ pkgs.lutris pkgs.winePackages.full ]; +{ pkgs, ... }: +{ + home.packages = [ + pkgs.lutris + pkgs.winePackages.full + ]; } diff --git a/modules/hm/mangohud.nix b/modules/hm/mangohud.nix index 34ec861..463f75f 100644 --- a/modules/hm/mangohud.nix +++ b/modules/hm/mangohud.nix @@ -1,6 +1,8 @@ { pkgs, ... }: -let strPalette = pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette; -in { +let + strPalette = pkgs.lib.nix-rice.palette.toRgbShortHex pkgs.rice.colorPalette; +in +{ programs.mangohud = { enable = true; # enableSessionWide = true; diff --git a/modules/hm/megasync.nix b/modules/hm/megasync.nix index f329e45..0a33835 100644 --- a/modules/hm/megasync.nix +++ b/modules/hm/megasync.nix @@ -1,6 +1,8 @@ { pkgs, ... }: -let megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server"; -in { +let + megasyncCmd = "${pkgs.megacmd}/bin/mega-cmd-server"; +in +{ home.packages = [ pkgs.megacmd ]; systemd.user.services."mega-cmd-server" = { @@ -9,7 +11,9 @@ in { After = [ "default.target" ]; PartOf = [ "default.target" ]; }; - Install = { WantedBy = [ "default.target" ]; }; + Install = { + WantedBy = [ "default.target" ]; + }; Service = { Type = "simple"; ExecStart = megasyncCmd; diff --git a/modules/hm/nautilus.nix b/modules/hm/nautilus.nix index cdac982..0ea6bfd 100644 --- a/modules/hm/nautilus.nix +++ b/modules/hm/nautilus.nix @@ -1 +1,7 @@ -{ pkgs, ... }: { home.packages = [ pkgs.gnome.nautilus pkgs.gnome.sushi ]; } +{ pkgs, ... }: +{ + home.packages = [ + pkgs.gnome.nautilus + pkgs.gnome.sushi + ]; +} diff --git a/modules/hm/nemo.nix b/modules/hm/nemo.nix index 7ea3a13..73931be 100644 --- a/modules/hm/nemo.nix +++ b/modules/hm/nemo.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs.cinnamon) nemo; }; } - diff --git a/modules/hm/noti.nix b/modules/hm/noti.nix index 2f8d940..d15112c 100644 --- a/modules/hm/noti.nix +++ b/modules/hm/noti.nix @@ -1 +1,5 @@ -{ programs.noti = { enable = true; }; } +{ + programs.noti = { + enable = true; + }; +} diff --git a/modules/hm/ntfy.nix b/modules/hm/ntfy.nix index ae8413a..d375fc7 100644 --- a/modules/hm/ntfy.nix +++ b/modules/hm/ntfy.nix @@ -1,9 +1,14 @@ -{ nixosConfig, pkgs, config, ... }: +{ nixosConfig +, pkgs +, config +, ... +}: let inherit (nixosConfig.networking) hostName; in { home.packages = [ pkgs.ntfy-sh ]; - xdg.configFile."ntfy/client.yml".source = config.lib.file.mkOutOfStoreSymlink nixosConfig.age.secrets."ntfy-${hostName}".path; + xdg.configFile."ntfy/client.yml".source = + config.lib.file.mkOutOfStoreSymlink + nixosConfig.age.secrets."ntfy-${hostName}".path; } - diff --git a/modules/hm/obs-studio.nix b/modules/hm/obs-studio.nix index 72faf36..56660d0 100644 --- a/modules/hm/obs-studio.nix +++ b/modules/hm/obs-studio.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ programs.obs-studio = { enable = true; package = pkgs.obs-studio; diff --git a/modules/hm/office.nix b/modules/hm/office.nix index 49b5824..810f5fc 100644 --- a/modules/hm/office.nix +++ b/modules/hm/office.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) hunspell libreoffice-fresh; inherit (pkgs.hunspellDicts) en_GB-large en_US-large it_IT; diff --git a/modules/hm/onedrive.nix b/modules/hm/onedrive.nix index 3d4fc54..ddfe45a 100644 --- a/modules/hm/onedrive.nix +++ b/modules/hm/onedrive.nix @@ -1,13 +1,17 @@ { pkgs, ... }: -let onedriveCmd = "${pkgs.onedrive}/bin/onedrive --monitor"; -in { +let + onedriveCmd = "${pkgs.onedrive}/bin/onedrive --monitor"; +in +{ systemd.user.services."onedrive" = { Unit = { Description = "OneDrive synchronization service"; After = [ "network.target" ]; PartOf = [ "default.target" ]; }; - Install = { WantedBy = [ "default.target" ]; }; + Install = { + WantedBy = [ "default.target" ]; + }; Service = { ExecStart = onedriveCmd; Restart = "always"; diff --git a/modules/hm/pass.nix b/modules/hm/pass.nix index 5baeb36..4e33204 100644 --- a/modules/hm/pass.nix +++ b/modules/hm/pass.nix @@ -1,14 +1,19 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ programs.password-store = { - package = pkgs.pass.withExtensions (ext: (builtins.attrValues { - inherit (ext) - # pass-audit - pass-checkup - pass-import - pass-otp - pass-tomb - pass-update; - })); + package = pkgs.pass.withExtensions ( + ext: + (builtins.attrValues { + inherit (ext) + # pass-audit + pass-checkup + pass-import + pass-otp + pass-tomb + pass-update + ; + }) + ); enable = true; }; } diff --git a/modules/hm/polybar.nix b/modules/hm/polybar.nix index 49a0999..93d76d7 100644 --- a/modules/hm/polybar.nix +++ b/modules/hm/polybar.nix @@ -1,4 +1,9 @@ -{ nixosConfig, config, pkgs, lib, ... }: +{ nixosConfig +, config +, pkgs +, lib +, ... +}: let inherit (pkgs.rice) colorPalette opacity; inherit (pkgs.lib) nix-rice; @@ -48,7 +53,13 @@ let wait ''; powermenu = pkgs.writeShellScript "powermenu" '' - PATH=$PATH:"${lib.makeBinPath [ pkgs.rofi pkgs.rofi-power-menu pkgs.zsh ]}" + PATH=$PATH:"${ + lib.makeBinPath [ + pkgs.rofi + pkgs.rofi-power-menu + pkgs.zsh + ] + }" zsh -c 'rofi -show menu -modi "menu:rofi-power-menu --choices=shutdown/reboot/hibernate/logout"' ''; colors = nix-rice.palette.toARGBHex rec { @@ -99,9 +110,7 @@ let bottom.size = 0; }; font = [ - "${pkgs.rice.font.monospace.name}:size=${ - toString pkgs.rice.font.monospace.size - };2" + "${pkgs.rice.font.monospace.name}:size=${toString pkgs.rice.font.monospace.size};2" # "Font Awesome 6 Free:size=14;0" # "Noto Color Emoji:size=2;2" "Noto Sans Symbols2:size=${toString pkgs.rice.font.monospace.size};2" @@ -116,7 +125,14 @@ let wm-restack = "bspwm"; }; - ramp = [ "▂" "▃" "▄" "▅" "▆" "▇" ]; + ramp = [ + "▂" + "▃" + "▄" + "▅" + "▆" + "▇" + ]; in { home.packages = builtins.attrValues { @@ -139,13 +155,14 @@ in ''; settings = { - "settings" = { screenchange-reload = false; }; + "settings" = { + screenchange-reload = false; + }; "bar/primary" = lib.recursiveUpdate commonBar { modules-left = "bspwm"; # modules-center = - modules-right = - "player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date"; + modules-right = "player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date"; tray = { position = "right"; padding = 1; @@ -155,8 +172,7 @@ in "bar/secondary" = lib.recursiveUpdate commonBar { modules-left = "bspwm"; # modules-center = - modules-right = - "player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date"; + modules-right = "player pulseaudio temperature cpu memory battery keyboard-switch notifications powermenu date"; }; "module/battery" = { @@ -167,14 +183,30 @@ in full.at = 98; animation = { - charging = { text = [ "" "" "" "" "" ]; framerate = "750"; }; - discharging = { text = [ "" "" "" "" "" ]; framerate = "750"; }; + charging = { + text = [ + "" + "" + "" + "" + "" + ]; + framerate = "750"; + }; + discharging = { + text = [ + "" + "" + "" + "" + "" + ]; + framerate = "750"; + }; }; format = { - charging = lib.recursiveUpdate colors.selected { - text = " "; - }; + charging = lib.recursiveUpdate colors.selected { text = " "; }; discharging = lib.recursiveUpdate colors.active { text = " "; }; @@ -204,7 +236,9 @@ in { focused = lib.recursiveUpdate common colors.selected; occupied = lib.recursiveUpdate common colors.active; - urgent = lib.recursiveUpdate (lib.recursiveUpdate common colors.active) { background = colors.alert; }; + urgent = lib.recursiveUpdate (lib.recursiveUpdate common colors.active) { + background = colors.alert; + }; empty = lib.recursiveUpdate common colors.normal; }; }; @@ -220,10 +254,16 @@ in "module/date" = { type = "internal/date"; format = colors.normal; - date = { alt = "%Y-%m-%d"; text = "%a %d/%m/%y"; }; + date = { + alt = "%Y-%m-%d"; + text = "%a %d/%m/%y"; + }; interval = "1"; label = "%date% %time%"; - time = { alt = "%H:%M:%S"; text = "%H:%M"; }; + time = { + alt = "%H:%M:%S"; + text = "%H:%M"; + }; }; "module/memory" = { @@ -237,9 +277,15 @@ in "module/pulseaudio" = { interval = 2; bar.volume = { - empty = { text = "─"; }; - fill = { text = "─"; }; - indicator = { text = "|"; }; + empty = { + text = "─"; + }; + fill = { + text = "─"; + }; + indicator = { + text = "|"; + }; width = "10"; foreground = [ colors.green @@ -252,18 +298,19 @@ in colors.red ]; }; - click.right = - "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}"; + click.right = "${pgrep} pavucontrol && ${pkill} pavucontrol || ${pavucontrol}"; format = { padding = 1; muted = colors.active; - volume = lib.recursiveUpdate colors.normal { - text = " "; - }; + volume = lib.recursiveUpdate colors.normal { text = " "; }; }; label.muted.text = "󰝟 muted"; label.volume.text = "%percentage%%"; - ramp.volume = [ "󰕿" "󰖀" "󰕾" ]; + ramp.volume = [ + "󰕿" + "󰖀" + "󰕾" + ]; type = "internal/pulseaudio"; }; @@ -279,7 +326,13 @@ in text = "%temperature-c%"; warn = "%temperature-c%"; }; - ramp.text = [ "" "" "" "" "" ]; + ramp.text = [ + "" + "" + "" + "" + "" + ]; thermal.zone = if nixosConfig.networking.hostName == "odin" then 8 else 0; type = "internal/temperature"; warn.temperature = "90"; diff --git a/modules/hm/pro_audio.nix b/modules/hm/pro_audio.nix index 727970c..7590b7f 100644 --- a/modules/hm/pro_audio.nix +++ b/modules/hm/pro_audio.nix @@ -1,12 +1,10 @@ { pkgs, ... }: let systemLibFolder = "/run/current-system/sw/lib/"; - userLibFolder = - "$HOME/.local/state/nix/profiles/home-manager/home-path/lib"; + userLibFolder = "$HOME/.local/state/nix/profiles/home-manager/home-path/lib"; variables = { DSSI_PATH = "$HOME/.dssi:${userLibFolder}/dssi:${systemLibFolder}/dssi"; - LADSPA_PATH = - "$HOME/.ladspa:${userLibFolder}/ladspa:${systemLibFolder}/ladspa"; + LADSPA_PATH = "$HOME/.ladspa:${userLibFolder}/ladspa:${systemLibFolder}/ladspa"; LV2_PATH = "$HOME/.lv2:${userLibFolder}/lv2:${systemLibFolder}/lv2"; LXVST_PATH = "$HOME/.lxvst:${userLibFolder}/lxvst:${systemLibFolder}/lxvst"; VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst"; @@ -16,12 +14,35 @@ in { home.packages = builtins.attrValues { inherit (pkgs) - ardour breeze-icons carla mixxx rnnoise + ardour + breeze-icons + carla + mixxx + rnnoise #mamba # zrythm # Plugins - aeolus artyFX autotalent boops calf cardinal fluidsynth geonkick giada lsp-plugins samplv1 sfizz surge surge-XT talentedhack vocproc x42-plugins zita-at1 zyn-fusion zynaddsubfx + aeolus + artyFX + autotalent + boops + calf + cardinal + fluidsynth + geonkick + giada + lsp-plugins + samplv1 + sfizz + surge + surge-XT + talentedhack + vocproc + x42-plugins + zita-at1 + zyn-fusion + zynaddsubfx # helm # noise-repellent # speech-denoiser diff --git a/modules/hm/pycharm.nix b/modules/hm/pycharm.nix index 39102fd..8d2aec5 100644 --- a/modules/hm/pycharm.nix +++ b/modules/hm/pycharm.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) python3; inherit (pkgs.unstable_pkgs.jetbrains) pycharm-professional jdk; diff --git a/modules/hm/research.nix b/modules/hm/research.nix index 67f1a3a..a2bfdea 100644 --- a/modules/hm/research.nix +++ b/modules/hm/research.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) # mendeley # Reference manager diff --git a/modules/hm/rofi.nix b/modules/hm/rofi.nix index 0b92775..661ba85 100644 --- a/modules/hm/rofi.nix +++ b/modules/hm/rofi.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) @@ -15,7 +16,9 @@ location = "center"; font = "${pkgs.rice.font.monospace.name} ${toString pkgs.rice.font.monospace.size}"; plugins = [ pkgs.rofi-calc ]; - extraConfig = { modi = "drun,run,ssh,window,calc"; }; + extraConfig = { + modi = "drun,run,ssh,window,calc"; + }; terminal = "alacritty"; theme = "onedark"; }; diff --git a/modules/hm/screen_locker.nix b/modules/hm/screen_locker.nix index 6439ddb..6045e4c 100644 --- a/modules/hm/screen_locker.nix +++ b/modules/hm/screen_locker.nix @@ -1,8 +1,12 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.screen-locker = { enable = true; lockCmd = "${pkgs.lockscreen}/bin/lockscreen"; inactiveInterval = 2; # minutes - xautolock.extraOptions = [ "-secure" "-lockaftersleep" ]; + xautolock.extraOptions = [ + "-secure" + "-lockaftersleep" + ]; }; } diff --git a/modules/hm/security.nix b/modules/hm/security.nix index fa17341..f875bc1 100644 --- a/modules/hm/security.nix +++ b/modules/hm/security.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) nmap# RECOGNITION @@ -8,7 +9,9 @@ # altair # burpsuite - bintools ghidra-bin radare2# REVERSING + bintools + ghidra-bin + radare2# REVERSING # cutter # INFRASTRUCTURE diff --git a/modules/hm/spotifyd.nix b/modules/hm/spotifyd.nix index 1fa258b..cef6329 100644 --- a/modules/hm/spotifyd.nix +++ b/modules/hm/spotifyd.nix @@ -1,4 +1,5 @@ -{ nixosConfig, ... }: { +{ nixosConfig, ... }: +{ services.spotifyd = { enable = true; settings.global = { diff --git a/modules/hm/ssh.nix b/modules/hm/ssh.nix index cc4e51a..5e42ea6 100644 --- a/modules/hm/ssh.nix +++ b/modules/hm/ssh.nix @@ -2,6 +2,10 @@ programs.ssh = { enable = true; compression = true; - matchBlocks = { "*" = { identityFile = "~/.ssh/id_ed25519"; }; }; + matchBlocks = { + "*" = { + identityFile = "~/.ssh/id_ed25519"; + }; + }; }; } diff --git a/modules/hm/starship.nix b/modules/hm/starship.nix index 7555b89..4aeec8b 100644 --- a/modules/hm/starship.nix +++ b/modules/hm/starship.nix @@ -9,7 +9,10 @@ hostname.format = "[$hostname]($style) "; # Disable ssh symbol # line_break.disabled = true; # Prompt in one line nix_shell.symbol = "❄️ "; # better soacing - python.python_binary = [ "python3" "python2" ]; + python.python_binary = [ + "python3" + "python2" + ]; status = { disabled = false; # enable module format = "[$symbol $status]($style) "; # nicer status format diff --git a/modules/hm/swayidle.nix b/modules/hm/swayidle.nix index 65863f6..751ec88 100644 --- a/modules/hm/swayidle.nix +++ b/modules/hm/swayidle.nix @@ -1,11 +1,18 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs) brillo; }; services.swayidle = { enable = true; events = [ - { event = "before-sleep"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; } - { event = "lock"; command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; } + { + event = "before-sleep"; + command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; + } + { + event = "lock"; + command = "${pkgs.way-lockscreen}/bin/way-lockscreen"; + } ]; timeouts = [ { diff --git a/modules/hm/swaynotificationcenter.nix b/modules/hm/swaynotificationcenter.nix index a8fcbe3..3fe83b6 100644 --- a/modules/hm/swaynotificationcenter.nix +++ b/modules/hm/swaynotificationcenter.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ systemd.user.services.swaynotificationcenter = { Unit = { After = [ "graphical-session-pre.target" ]; diff --git a/modules/hm/sxhkd.nix b/modules/hm/sxhkd.nix index 097b2bc..378d21a 100644 --- a/modules/hm/sxhkd.nix +++ b/modules/hm/sxhkd.nix @@ -1,4 +1,5 @@ -{ pkgs, lib, ... }: { +{ pkgs, lib, ... }: +{ imports = [ # ./alacritty.nix ./kitty.nix @@ -11,7 +12,11 @@ home.packages = builtins.attrValues { inherit (pkgs) bc# required by bsp-layout - bsp-layout clipedit lockscreen terminator; + bsp-layout + clipedit + lockscreen + terminator + ; }; services.sxhkd = let @@ -49,7 +54,12 @@ comm -23 <(bspc query -N | sort) <(bspc query -m primary -N | sort) | while read n; do bspc node $n -m primary; done ''; notifyVolume = pkgs.writeShellScript "notifyVolume" '' - PATH=$PATH:"${lib.makeBinPath [ pkgs.coreutils pkgs.pamixer ]}" + PATH=$PATH:"${ + lib.makeBinPath [ + pkgs.coreutils + pkgs.pamixer + ] + }" sink=`pamixer --get-default-sink | tail -n 1| sed -E 's/.+"(.+)"$/\1/'` muted=`pamixer --get-mute` volume=`pamixer --get-volume` @@ -64,7 +74,12 @@ ${notify} -r 2 -h "int:value:$level" "Luminosità $level" ''; powermenu = pkgs.writeShellScript "powermenu" '' - PATH=$PATH:"${lib.makeBinPath [ pkgs.rofi pkgs.rofi-power-menu ]}" + PATH=$PATH:"${ + lib.makeBinPath [ + pkgs.rofi + pkgs.rofi-power-menu + ] + }" rofi -show menu -modi "menu:rofi-power-menu --choices=shutdown/reboot/hibernate/logout" ''; in diff --git a/modules/hm/syncthing_tiziano.nix b/modules/hm/syncthing_tiziano.nix index 9280023..08a7f0d 100644 --- a/modules/hm/syncthing_tiziano.nix +++ b/modules/hm/syncthing_tiziano.nix @@ -4,4 +4,3 @@ extraOptions = [ "--gui-address=http://0.0.0.0:8385" ]; }; } - diff --git a/modules/hm/terminator.nix b/modules/hm/terminator.nix index a52f663..d0dd672 100644 --- a/modules/hm/terminator.nix +++ b/modules/hm/terminator.nix @@ -6,7 +6,8 @@ let }; opacity = toString pkgs.rice.opacity; font = pkgs.rice.font.monospace; - colorString = normal: bright: + colorString = + normal: bright: builtins.concatStringsSep ":" [ normal.black normal.red diff --git a/modules/hm/thunar.nix b/modules/hm/thunar.nix index 4d2650f..09cc75f 100644 --- a/modules/hm/thunar.nix +++ b/modules/hm/thunar.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = builtins.attrValues { inherit (pkgs.xfce) thunar @@ -6,6 +7,7 @@ thunar-media-tags-plugin thunar-volman tumbler - xfconf; + xfconf + ; }; } diff --git a/modules/hm/tmux.nix b/modules/hm/tmux.nix index 79342c9..1687527 100644 --- a/modules/hm/tmux.nix +++ b/modules/hm/tmux.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ programs.tmux = { enable = true; clock24 = true; diff --git a/modules/hm/update_background.nix b/modules/hm/update_background.nix index e6ac4e5..8ed927f 100644 --- a/modules/hm/update_background.nix +++ b/modules/hm/update_background.nix @@ -1,6 +1,8 @@ { pkgs, ... }: -let update_time = "10m"; -in { +let + update_time = "10m"; +in +{ home.packages = [ pkgs.update-background ]; systemd.user.services."update-background" = { @@ -10,7 +12,9 @@ in { PartOf = [ "graphical-session.target" ]; RequiresMountsFor = [ "/home/bertof/Immagini" ]; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; Service = { Type = "oneshot"; IOSchedulingClass = "idle"; @@ -19,8 +23,14 @@ in { }; systemd.user.timers."update-background" = { - Unit = { Description = "Set random desktop background using feh"; }; - Timer = { OnUnitActiveSec = update_time; }; - Install = { WantedBy = [ "timers.target" ]; }; + Unit = { + Description = "Set random desktop background using feh"; + }; + Timer = { + OnUnitActiveSec = update_time; + }; + Install = { + WantedBy = [ "timers.target" ]; + }; }; } diff --git a/modules/hm/vim.nix b/modules/hm/vim.nix index 70ef781..968f224 100644 --- a/modules/hm/vim.nix +++ b/modules/hm/vim.nix @@ -1,5 +1,8 @@ { pkgs, ... }: -let vp = pkgs.vimPlugins; in { +let + vp = pkgs.vimPlugins; +in +{ home.packages = [ pkgs.nodePackages.prettier ]; programs.neovim = { enable = true; @@ -34,8 +37,6 @@ let vp = pkgs.vimPlugins; in { # ''; # } - - vp.telescope-fzf-native-nvim { plugin = vp.telescope-nvim; @@ -361,8 +362,6 @@ let vp = pkgs.vimPlugins; in { } ]; - - # settings = { ignorecase = true; }; # coc.enable = true; # extraConfig = '' diff --git a/modules/hm/virtualization.nix b/modules/hm/virtualization.nix index 8a9ff42..2aaba95 100644 --- a/modules/hm/virtualization.nix +++ b/modules/hm/virtualization.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = [ pkgs.remmina pkgs.virt-manager diff --git a/modules/hm/vivaldi.nix b/modules/hm/vivaldi.nix index 27bf3f9..1bbbf17 100644 --- a/modules/hm/vivaldi.nix +++ b/modules/hm/vivaldi.nix @@ -1,3 +1,7 @@ -{ pkgs, ... }: { - home.packages = [ pkgs.vivaldi pkgs.vivaldi-ffmpeg-codecs ]; +{ pkgs, ... }: +{ + home.packages = [ + pkgs.vivaldi + pkgs.vivaldi-ffmpeg-codecs + ]; } diff --git a/modules/hm/waybar.nix b/modules/hm/waybar.nix index 5262009..3ddf660 100644 --- a/modules/hm/waybar.nix +++ b/modules/hm/waybar.nix @@ -68,11 +68,17 @@ in "numlock" = true; "capslock" = true; "format" = "{name} {icon}"; - "format-icons" = { "locked" = ""; "unlocked" = ""; }; + "format-icons" = { + "locked" = ""; + "unlocked" = ""; + }; }; "idle_inhibitor" = { "format" = "{status} {icon}"; - "format-icons" = { "activated" = ""; "deactivated" = ""; }; + "format-icons" = { + "activated" = ""; + "deactivated" = ""; + }; }; tray.spacing = 10; clock = { @@ -104,7 +110,17 @@ in "backlight" = { # "device"= "acpi_video1"; "format" = "{percent}% {icon}"; - "format-icons" = [ "" "" "" "" "" "" "" "" "" ]; + "format-icons" = [ + "" + "" + "" + "" + "" + "" + "" + "" + "" + ]; }; "battery" = { "states" = { @@ -118,7 +134,13 @@ in "format-alt" = "{time} {icon}"; # "format-good"= ""; # An empty format will hide the module # "format-full"= ""; - "format-icons" = [ "" "" "" "" "" ]; + "format-icons" = [ + "" + "" + "" + "" + "" + ]; }; # "battery#bat2" = { "bat" = "BAT2"; }; "network" = { @@ -145,7 +167,11 @@ in "phone" = ""; "portable" = ""; "car" = ""; - "default" = [ "" "" "" ]; + "default" = [ + "" + "" + "" + ]; }; "on-click" = "${pkgs.pavucontrol}/bin/pavucontrol"; diff --git a/modules/hm/webapp.nix b/modules/hm/webapp.nix index 49fb178..0ab2146 100644 --- a/modules/hm/webapp.nix +++ b/modules/hm/webapp.nix @@ -12,9 +12,16 @@ let , icon ? lib.toLower name , comment ? null , categories ? [ "Network" ] + , }: pkgs.makeDesktopItem { - inherit name icon desktopName comment categories; + inherit + name + icon + desktopName + comment + categories + ; exec = cmd link; }; links = [ @@ -36,7 +43,10 @@ let { link = "https://play.google.com/books"; desktopName = "Google Play Books"; - categories = [ "Office" "Viewer" ]; + categories = [ + "Office" + "Viewer" + ]; } # { # link = "https://teams.microsoft.com"; @@ -91,4 +101,6 @@ let ]; in -{ home.packages = map webAppBuilder links; } +{ + home.packages = map webAppBuilder links; +} diff --git a/modules/hm/wl_update_background.nix b/modules/hm/wl_update_background.nix index 8ea4d79..3d59611 100644 --- a/modules/hm/wl_update_background.nix +++ b/modules/hm/wl_update_background.nix @@ -23,7 +23,9 @@ in PartOf = [ "graphical-session.target" ]; RequiresMountsFor = [ "/home/bertof/Immagini" ]; }; - Install = { WantedBy = [ "graphical-session.target" ]; }; + Install = { + WantedBy = [ "graphical-session.target" ]; + }; Service = { Type = "oneshot"; IOSchedulingClass = "idle"; @@ -32,9 +34,14 @@ in }; systemd.user.timers."wl-update-background" = { - Unit = { Description = "Set random desktop background using swww"; }; - Timer = { OnUnitActiveSec = update_time; }; - Install = { WantedBy = [ "timers.target" ]; }; + Unit = { + Description = "Set random desktop background using swww"; + }; + Timer = { + OnUnitActiveSec = update_time; + }; + Install = { + WantedBy = [ "timers.target" ]; + }; }; } - diff --git a/modules/hm/xresources.nix b/modules/hm/xresources.nix index ff920a4..f7aae2b 100644 --- a/modules/hm/xresources.nix +++ b/modules/hm/xresources.nix @@ -1,6 +1,8 @@ { pkgs, ... }: let - strPalette = pkgs.lib.nix-rice.palette.toRgbHex { inherit (pkgs.rice.colorPalette) normal bright primary; }; + strPalette = pkgs.lib.nix-rice.palette.toRgbHex { + inherit (pkgs.rice.colorPalette) normal bright primary; + }; in { home.file.".Xresources" = { @@ -27,7 +29,7 @@ in *.color13: ${strPalette.bright.magenta} *.color14: ${strPalette.bright.cyan} *.color15: ${strPalette.bright.white} - + xterm*faceName: ${pkgs.rice.font.monospace.name} xterm*faceSize: ${toString pkgs.rice.font.monospace.size} ''; diff --git a/modules/hm/yazi.nix b/modules/hm/yazi.nix index 61ea57a..827c239 100644 --- a/modules/hm/yazi.nix +++ b/modules/hm/yazi.nix @@ -1,6 +1,13 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home = { - packages = [ pkgs.ffmpegthumbnailer pkgs.exiftool pkgs.mediainfo pkgs.unar pkgs.mpv ]; + packages = [ + pkgs.ffmpegthumbnailer + pkgs.exiftool + pkgs.mediainfo + pkgs.unar + pkgs.mpv + ]; shellAliases.y = "yazi"; }; @@ -18,47 +25,128 @@ opener = { folder = [ - { run = ''nautilus "$@"''; display_name = "Nautilus"; } - { run = ''xdg-open "$@"''; display_name = "Open folder"; } + { + run = ''nautilus "$@"''; + display_name = "Nautilus"; + } + { + run = ''xdg-open "$@"''; + display_name = "Open folder"; + } { run = ''$VISUAL "$@"''; } ]; archive = [ - { run = ''file-roller "$1"''; display_name = "Open with File Roller"; } - { run = ''unar "$1"''; display_name = "Extract here"; } - { run = ''xdg-open "$@"''; display_name = "Open with default"; } + { + run = ''file-roller "$1"''; + display_name = "Open with File Roller"; + } + { + run = ''unar "$1"''; + display_name = "Extract here"; + } + { + run = ''xdg-open "$@"''; + display_name = "Open with default"; + } { run = ''$VISUAL "$@"''; } ]; text = [ { run = ''$VISUAL "$@"''; } - { run = ''nvim "$@"''; block = true; display_name = "Open with NeoVIM"; } - { run = ''hx "$@"''; block = true; display_name = "Open with Helix"; } - { run = ''bat --pagin=always "$@"''; block = true; display_name = "Open with bat"; } + { + run = ''nvim "$@"''; + block = true; + display_name = "Open with NeoVIM"; + } + { + run = ''hx "$@"''; + block = true; + display_name = "Open with Helix"; + } + { + run = ''bat --pagin=always "$@"''; + block = true; + display_name = "Open with bat"; + } ]; image = [ - { run = ''xdg-open "$@"''; display_name = "Open"; } - { run = ''eog "$@"''; display_name = "Open with EOG"; } - { run = '''exiftool "$1"; echo "Press enter to exit"; read''; block = true; display_name = "Show EXIF"; } + { + run = ''xdg-open "$@"''; + display_name = "Open"; + } + { + run = ''eog "$@"''; + display_name = "Open with EOG"; + } + { + run = '''exiftool "$1"; echo "Press enter to exit"; read''; + block = true; + display_name = "Show EXIF"; + } ]; video = [ - { run = ''mpv "$@"''; display_name = "Open with MPV"; } - { run = ''umpv "$@"''; display_name = "Open with uMPV"; } - { run = ''totem "$@"''; display_name = "Open with Totem"; } - { run = ''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; display_name = "Show media info"; } - { run = ''xdg-open "$@"''; display_name = "Open with default"; } + { + run = ''mpv "$@"''; + display_name = "Open with MPV"; + } + { + run = ''umpv "$@"''; + display_name = "Open with uMPV"; + } + { + run = ''totem "$@"''; + display_name = "Open with Totem"; + } + { + run = ''mediainfo "$1"; echo "Press enter to exit"; read''; + block = true; + display_name = "Show media info"; + } + { + run = ''xdg-open "$@"''; + display_name = "Open with default"; + } { run = ''$VISUAL "$@"''; } ]; audio = [ - { run = ''mpv "$@"''; display_name = "Open with MPV"; } - { run = ''umpv "$@"''; display_name = "Open with uMPV"; } - { run = '''mediainfo "$1"; echo "Press enter to exit"; read''; block = true; display_name = "Show media info"; } - { run = ''xdg-open "$@"''; display_name = "Open with default"; } + { + run = ''mpv "$@"''; + display_name = "Open with MPV"; + } + { + run = ''umpv "$@"''; + display_name = "Open with uMPV"; + } + { + run = '''mediainfo "$1"; echo "Press enter to exit"; read''; + block = true; + display_name = "Show media info"; + } + { + run = ''xdg-open "$@"''; + display_name = "Open with default"; + } { run = ''$VISUAL "$@"''; } ]; fallback = [ - { run = ''xdg-open "$@"''; display_name = "Open"; } - { run = ''bat --pagin=always "$@"''; block = true; display_name = "Open with bat"; } - { run = ''$VISUAL "$@"''; block = true; display_name = "Open with editor"; } - { run = ''$EDITOR "$@"''; block = true; display_name = "Open with editor"; } + { + run = ''xdg-open "$@"''; + display_name = "Open"; + } + { + run = ''bat --pagin=always "$@"''; + block = true; + display_name = "Open with bat"; + } + { + run = ''$VISUAL "$@"''; + block = true; + display_name = "Open with editor"; + } + { + run = ''$EDITOR "$@"''; + block = true; + display_name = "Open with editor"; + } ]; }; }; diff --git a/modules/hm/zathura.nix b/modules/hm/zathura.nix index 7808f92..363156c 100644 --- a/modules/hm/zathura.nix +++ b/modules/hm/zathura.nix @@ -5,7 +5,9 @@ in { programs.zathura = { enable = true; - mappings = { "" = "recolor"; }; + mappings = { + "" = "recolor"; + }; options = { # completion-bg = strPalette.bright.black; # default-bg = strPalette.normal.black; @@ -55,7 +57,7 @@ in recolor-lightcolor = strPalette.primary.background; recolor-darkcolor = strPalette.bright.white; # recolor = true; - recolor-keephue = true; # keep original color + recolor-keephue = true; # keep original color }; }; diff --git a/modules/hm/zellij.nix b/modules/hm/zellij.nix index 7e6c7ce..ea4aa2a 100644 --- a/modules/hm/zellij.nix +++ b/modules/hm/zellij.nix @@ -3,7 +3,10 @@ let strPalette = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.colorPalette; in { - programs.zellij = { enable = true; package = pkgs.unstable_pkgs.zellij; }; + programs.zellij = { + enable = true; + package = pkgs.unstable_pkgs.zellij; + }; home.shellAliases = { "ze" = "zellij"; diff --git a/modules/hm/zsh.nix b/modules/hm/zsh.nix index 1caa31f..adafa55 100644 --- a/modules/hm/zsh.nix +++ b/modules/hm/zsh.nix @@ -1,6 +1,6 @@ -{ pkgs, ... }: { - home.packages = - builtins.attrValues { inherit (pkgs) nix-zsh-completions zsh-completions; }; +{ pkgs, ... }: +{ + home.packages = builtins.attrValues { inherit (pkgs) nix-zsh-completions zsh-completions; }; programs.zsh = { enable = true; @@ -17,8 +17,14 @@ oh-my-zsh = { enable = true; - plugins = - [ "common-aliases" "cp" "dirhistory" "git-auto-fetch" "git" "sudo" ]; + plugins = [ + "common-aliases" + "cp" + "dirhistory" + "git-auto-fetch" + "git" + "sudo" + ]; extraConfig = ""; }; diff --git a/modules/nixos/basics/btrfs-scrub.nix b/modules/nixos/basics/btrfs-scrub.nix index 4f1fdeb..b84ff5b 100644 --- a/modules/nixos/basics/btrfs-scrub.nix +++ b/modules/nixos/basics/btrfs-scrub.nix @@ -2,10 +2,8 @@ let inherit (builtins) mapAttrs attrValues; inherit (lib) filterAttrs unique; - btrfsFileSystems = - filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems; - btrfsDevices = - unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems)); + btrfsFileSystems = filterAttrs (_k: v: v.fsType == "btrfs") config.fileSystems; + btrfsDevices = unique (attrValues (mapAttrs (_: v: v.device) btrfsFileSystems)); in { services.btrfs.autoScrub = { diff --git a/modules/nixos/basics/distributed.nix b/modules/nixos/basics/distributed.nix index f6a06b6..ae6eec9 100644 --- a/modules/nixos/basics/distributed.nix +++ b/modules/nixos/basics/distributed.nix @@ -3,7 +3,10 @@ nix.settings = { substituters = [ "https://hyprland.cachix.org" ]; - trusted-users = [ "root" "@wheel" ]; + trusted-users = [ + "root" + "@wheel" + ]; trusted-public-keys = [ "thor:yRx3HglIxjUYocp4/jAP9dPWxWBEpgP6hqj1ofEfn1A=" diff --git a/modules/nixos/basics/fstrim.nix b/modules/nixos/basics/fstrim.nix index 84d7613..e436e51 100644 --- a/modules/nixos/basics/fstrim.nix +++ b/modules/nixos/basics/fstrim.nix @@ -1,3 +1 @@ -{ - services.fstrim.enable = true; -} +{ services.fstrim.enable = true; } diff --git a/modules/nixos/basics/fwupd.nix b/modules/nixos/basics/fwupd.nix index a62f709..fc85199 100644 --- a/modules/nixos/basics/fwupd.nix +++ b/modules/nixos/basics/fwupd.nix @@ -1,3 +1 @@ -{ - services.fwupd.enable = true; -} +{ services.fwupd.enable = true; } diff --git a/modules/nixos/basics/remote-deploy.nix b/modules/nixos/basics/remote-deploy.nix index 0a79a5f..1e4cb17 100644 --- a/modules/nixos/basics/remote-deploy.nix +++ b/modules/nixos/basics/remote-deploy.nix @@ -1,4 +1,5 @@ -{ lib, ... }: { +{ lib, ... }: +{ services.openssh = { enable = true; openFirewall = true; diff --git a/modules/nixos/basics/tailscale.nix b/modules/nixos/basics/tailscale.nix index ecbd91d..b82a214 100644 --- a/modules/nixos/basics/tailscale.nix +++ b/modules/nixos/basics/tailscale.nix @@ -1,7 +1,11 @@ { lib, ... }: let hosts = import ../../../hosts.nix; - tailscale_hosts = lib.attrsets.mapAttrs' (k: v: lib.attrsets.nameValuePair v [ k ]) hosts.tailscale.ipv4; + tailscale_hosts = lib.attrsets.mapAttrs' + ( + k: v: lib.attrsets.nameValuePair v [ k ] + ) + hosts.tailscale.ipv4; in { services.tailscale = { diff --git a/modules/nixos/basics/zerotier.nix b/modules/nixos/basics/zerotier.nix index 4935849..3f54c89 100644 --- a/modules/nixos/basics/zerotier.nix +++ b/modules/nixos/basics/zerotier.nix @@ -1,7 +1,11 @@ { lib, ... }: let hosts = import ../../../hosts.nix; - zerotier_hosts = lib.attrsets.mapAttrs' (k: v: lib.attrsets.nameValuePair v [ k ]) hosts.zerotier.ipv4; + zerotier_hosts = lib.attrsets.mapAttrs' + ( + k: v: lib.attrsets.nameValuePair v [ k ] + ) + hosts.zerotier.ipv4; in { services.zerotierone = { diff --git a/modules/nixos/big_data.nix b/modules/nixos/big_data.nix index fcecad0..57df631 100644 --- a/modules/nixos/big_data.nix +++ b/modules/nixos/big_data.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ config +, lib +, pkgs +, modulesPath +, ... +}: let # setup_script = '' # sudo mkdir -p /hdfs @@ -18,16 +23,18 @@ let # ''; hadoop_keytab_path = "/etc/hadoop.keytab"; spark_keytab_path = "/etc/spark.keytab"; - pysparkPackageSelector = p: with p; [ numpy pyspark ]; + pysparkPackageSelector = + p: with p; [ + numpy + pyspark + ]; pysparkEnv = pkgs.python3.withPackages pysparkPackageSelector; hadoopConf = import (modulesPath + "/services/cluster/hadoop/conf.nix") { inherit pkgs lib; cfg = config.services.hadoop; }; hadoopConfDir = "${hadoopConf}/"; - spark = pkgs.spark.override { - extraPythonPackages = pysparkPackageSelector pkgs.python3.pkgs; - }; + spark = pkgs.spark.override { extraPythonPackages = pysparkPackageSelector pkgs.python3.pkgs; }; sparkConfDir = pkgs.stdenv.mkDerivation { name = "spark-conf"; dontUnpack = true; @@ -81,7 +88,13 @@ in { networking = { - hosts = { "127.0.0.1" = [ "ds.my.engine" "kdc.my.engine" "my.engine" ]; }; + hosts = { + "127.0.0.1" = [ + "ds.my.engine" + "kdc.my.engine" + "my.engine" + ]; + }; }; @@ -136,14 +149,12 @@ in # NAME NODE SECURITY "dfs.namenode.keytab.file" = hadoop_keytab_path; "dfs.namenode.kerberos.principal" = "nn/my.engine@MY.ENGINE"; - "dfs.namenode.kerberos.internal.spnego.principal" = - "HTTP/my.engine@MY.ENGINE"; + "dfs.namenode.kerberos.internal.spnego.principal" = "HTTP/my.engine@MY.ENGINE"; # SECONDARY NAME NODE SECURITY "dfs.secondary.namenode.keytab.file" = hadoop_keytab_path; "dfs.secondary.namenode.kerberos.principal" = "nn/my.engine@MY.ENGINE"; - "dfs.secondary.namenode.kerberos.internal.spnego.principal" = - "HTTP/my.engine@MY.ENGINE"; + "dfs.secondary.namenode.kerberos.internal.spnego.principal" = "HTTP/my.engine@MY.ENGINE"; # DATA NODE SECURITY "dfs.datanode.keytab.file" = hadoop_keytab_path; @@ -157,8 +168,7 @@ in "dfs.webhdfs.enabled" = "true"; # WEB AUTHENTICATION CONFIG - "dfs.web.authentication.kerberos.principal" = - "HTTP/my.engine@MY.ENGINE"; + "dfs.web.authentication.kerberos.principal" = "HTTP/my.engine@MY.ENGINE"; "dfs.web.authentication.kerberos.keytab" = hadoop_keytab_path; "ignore.secure.ports.for.testing" = "true"; "dfs.http.policy" = "HTTP_ONLY"; @@ -175,20 +185,15 @@ in yarnSite = { "yarn.nodemanager.admin-env" = "PATH=$PATH"; "yarn.nodemanager.aux-services" = "mapreduce_shuffle"; - "yarn.nodemanager.aux-services.mapreduce_shuffle.class" = - "org.apache.hadoop.mapred.ShuffleHandler"; + "yarn.nodemanager.aux-services.mapreduce_shuffle.class" = "org.apache.hadoop.mapred.ShuffleHandler"; "yarn.nodemanager.bind-host" = "0.0.0.0"; - "yarn.nodemanager.container-executor.class" = - "org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor"; - "yarn.nodemanager.env-whitelist" = - "JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_HOME,LANG,TZ"; + "yarn.nodemanager.container-executor.class" = "org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor"; + "yarn.nodemanager.env-whitelist" = "JAVA_HOME,HADOOP_COMMON_HOME,HADOOP_HDFS_HOME,HADOOP_CONF_DIR,CLASSPATH_PREPEND_DISTCACHE,HADOOP_YARN_HOME,HADOOP_HOME,LANG,TZ"; "yarn.nodemanager.linux-container-executor.group" = "hadoop"; - "yarn.nodemanager.linux-container-executor.path" = - "/run/wrappers/yarn-nodemanager/bin/container-executor"; + "yarn.nodemanager.linux-container-executor.path" = "/run/wrappers/yarn-nodemanager/bin/container-executor"; "yarn.nodemanager.log-dirs" = "/var/log/hadoop/yarn/nodemanager"; "yarn.resourcemanager.bind-host" = "0.0.0.0"; - "yarn.resourcemanager.scheduler.class" = - "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler"; + "yarn.resourcemanager.scheduler.class" = "org.apache.hadoop.yarn.server.resourcemanager.scheduler.fifo.FifoScheduler"; "yarn.resourcemanager.keytab" = hadoop_keytab_path; "yarn.resourcemanager.principal" = "rm/my.engine@MY.ENGINE"; @@ -200,14 +205,12 @@ in "yarn.scheduler.capacity.root.queues" = "default"; "yarn.scheduler.capacity.root.default.capacity" = 100; # "yarn.scheduler.capacity.root.default.state" = "RUNNING"; - "yarn.scheduler.capacity.root.acl_submit_applications" = - "hadoop,yarn,mapred,hdfs"; + "yarn.scheduler.capacity.root.acl_submit_applications" = "hadoop,yarn,mapred,hdfs"; }; httpfsSite = { "kerberos.realm" = "MY.ENGINE"; "httpfs.authentication.type" = "kerberos"; - "httpfs.authentication.kerberos.principal " = - "HTTP/my.engine@MY.ENGINE"; + "httpfs.authentication.kerberos.principal " = "HTTP/my.engine@MY.ENGINE"; "httpfs.authentication.kerberos.keytab" = hadoop_keytab_path; "httpfs.hadoop.kerberos.principal " = "HTTP/my.engine@MY.ENGINE"; "httpfs.hadoop.kerberos.keytab" = hadoop_keytab_path; @@ -312,10 +315,8 @@ in User = "spark"; Group = "spark"; WorkingDirectory = "${pkgs.spark}/lib/${pkgs.spark.untarDir}"; - ExecStart = - "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/start-history-server.sh"; - ExecStop = - "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/stop-history-server.sh"; + ExecStart = "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/start-history-server.sh"; + ExecStop = "${pkgs.spark}/lib/${pkgs.spark.untarDir}/sbin/stop-history-server.sh"; TimeoutSec = 300; StartLimitBurst = 10; Restart = "always"; diff --git a/modules/nixos/defcon.nix b/modules/nixos/defcon.nix index 975de0c..d9b7bd2 100644 --- a/modules/nixos/defcon.nix +++ b/modules/nixos/defcon.nix @@ -9,11 +9,16 @@ "maitre.cb.cloud.mhackeroni.it" "accountant.cb.cloud.mhackeroni.it" ]; - "10.100.0.150" = - [ "flowgui.cloud.mhackeroni.it" "smb.cloud.mhackeroni.it" ]; + "10.100.0.150" = [ + "flowgui.cloud.mhackeroni.it" + "smb.cloud.mhackeroni.it" + ]; "10.100.0.200" = [ "tunniceddu.cloud.mhackeroni.it" ]; "10.100.0.250" = [ "rev.cloud.mhackeroni.it" ]; "10.100.0.66" = [ "attackerbackup.cloud.mhackeroni.it" ]; - "192.168.128.1" = [ "smb.hotel.mhackeroni.it" "rev.hotel.mhackeroni.it" ]; + "192.168.128.1" = [ + "smb.hotel.mhackeroni.it" + "rev.hotel.mhackeroni.it" + ]; }; } diff --git a/modules/nixos/dnsmasq.nix b/modules/nixos/dnsmasq.nix index 1a025d7..10a5402 100644 --- a/modules/nixos/dnsmasq.nix +++ b/modules/nixos/dnsmasq.nix @@ -1,8 +1,7 @@ let blocklist = builtins.fetchurl { sha256 = "sha256:16xcx2z8ziv2fbqhr4ajayxblcs4i1ckrwnf50iina9asgia18za"; - url = - "https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt"; + url = "https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt"; }; in { @@ -11,7 +10,11 @@ in services.dnsmasq = { enable = true; - servers = [ "1.1.1.1" "8.8.8.8" "8.8.4.4" ]; + servers = [ + "1.1.1.1" + "8.8.8.8" + "8.8.4.4" + ]; extraConfig = '' cache-size=10000 log-queries diff --git a/modules/nixos/garage.nix b/modules/nixos/garage.nix index 709031e..1b02127 100644 --- a/modules/nixos/garage.nix +++ b/modules/nixos/garage.nix @@ -1,7 +1,18 @@ -{ pkgs, config, lib, ... }: { +{ pkgs +, config +, lib +, ... +}: +{ users.groups.garage = { }; - users.users.garage = { isSystemUser = true; group = "garage"; }; - age.secrets.garage_rpc_secret = { file = ../../secrets/garage_rpc_secret.age; owner = "garage"; }; + users.users.garage = { + isSystemUser = true; + group = "garage"; + }; + age.secrets.garage_rpc_secret = { + file = ../../secrets/garage_rpc_secret.age; + owner = "garage"; + }; networking.firewall.allowedTCPPorts = [ 3900 diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix index 46f223f..8af45da 100644 --- a/modules/nixos/hyprland.nix +++ b/modules/nixos/hyprland.nix @@ -1,4 +1,5 @@ -{ config, pkgs, ... }: { +{ config, pkgs, ... }: +{ programs.hyprland = { enable = true; package = pkgs.unstable_pkgs.hyprland; diff --git a/modules/nixos/k3s.nix b/modules/nixos/k3s.nix index 7d929a0..43320e6 100644 --- a/modules/nixos/k3s.nix +++ b/modules/nixos/k3s.nix @@ -1,13 +1,17 @@ { - services.k3s = { enable = true; }; + services.k3s = { + enable = true; + }; networking.firewall = { allowedTCPPorts = [ 6443 # Kubernetes API ]; - allowedTCPPortRanges = [{ - from = 9000; - to = 15000; - }]; + allowedTCPPortRanges = [ + { + from = 9000; + to = 15000; + } + ]; }; } diff --git a/modules/nixos/kavita.nix b/modules/nixos/kavita.nix index 9e7d41b..454072c 100644 --- a/modules/nixos/kavita.nix +++ b/modules/nixos/kavita.nix @@ -1,8 +1,15 @@ -{ lib, config, ... }: { +{ lib, config, ... }: +{ - age.secrets.kavita_token = { file = ../../secrets/kavita_token.age; owner = "kavita"; }; + age.secrets.kavita_token = { + file = ../../secrets/kavita_token.age; + owner = "kavita"; + }; - services.kavita = { enable = true; tokenKeyFile = config.age.secrets.kavita_token.path; }; + services.kavita = { + enable = true; + tokenKeyFile = config.age.secrets.kavita_token.path; + }; networking.firewall.allowedTCPPorts = lib.optionals config.services.kavita.enable [ config.services.kavita.port diff --git a/modules/nixos/mind.nix b/modules/nixos/mind.nix index 1977763..9d71696 100644 --- a/modules/nixos/mind.nix +++ b/modules/nixos/mind.nix @@ -2,11 +2,17 @@ services.postgresql = { enable = true; ensureDatabases = [ "mfh" ]; - ensureUsers = [{ - name = "bertof"; - ensurePermissions = { "DATABASE \"mfh\"" = "ALL PRIVILEGES"; }; - }]; + ensureUsers = [ + { + name = "bertof"; + ensurePermissions = { + "DATABASE \"mfh\"" = "ALL PRIVILEGES"; + }; + } + ]; }; - services.apache-kafka = { enable = true; }; + services.apache-kafka = { + enable = true; + }; } diff --git a/modules/nixos/minio.nix b/modules/nixos/minio.nix index 78a6c96..9f6835c 100644 --- a/modules/nixos/minio.nix +++ b/modules/nixos/minio.nix @@ -1,5 +1,9 @@ -{ config, lib, ... }: { - age.secrets.minio = { file = ../../secrets/minio.age; owner = "minio"; }; +{ config, lib, ... }: +{ + age.secrets.minio = { + file = ../../secrets/minio.age; + owner = "minio"; + }; services.minio = { enable = true; @@ -11,6 +15,8 @@ }; systemd.services.minio.serviceConfig.ExecStart = - let cfg = config.services.minio; in + let + cfg = config.services.minio; + in lib.mkForce "${cfg.package}/bin/minio server --json --address ${cfg.listenAddress} --console-address ${cfg.consoleAddress} ${toString cfg.dataDir}"; } diff --git a/modules/nixos/musa.nix b/modules/nixos/musa.nix index 9e80138..cf43003 100644 --- a/modules/nixos/musa.nix +++ b/modules/nixos/musa.nix @@ -3,4 +3,3 @@ 172.20.28.150 ranger.musa.sesar.di.unimi.it ''; } - diff --git a/modules/nixos/nextcloud.nix b/modules/nixos/nextcloud.nix index c0003df..1438b73 100644 --- a/modules/nixos/nextcloud.nix +++ b/modules/nixos/nextcloud.nix @@ -5,8 +5,14 @@ in { age.secrets = { - nextcloud_admin_secret = { file = ../../secrets/nextcloud_admin_secret.age; owner = "nextcloud"; }; - nextcloud_bucket_secret = { file = ../../secrets/nextcloud_bucket_secret.age; owner = "nextcloud"; }; + nextcloud_admin_secret = { + file = ../../secrets/nextcloud_admin_secret.age; + owner = "nextcloud"; + }; + nextcloud_bucket_secret = { + file = ../../secrets/nextcloud_bucket_secret.age; + owner = "nextcloud"; + }; }; # services.nginx.virtualHosts.${config.services.nextcloud.hostName} = { @@ -24,7 +30,17 @@ in database.createLocally = true; - extraApps = { inherit (config.services.nextcloud.package.packages.apps) contacts calendar notes maps memories tasks richdocuments; }; + extraApps = { + inherit (config.services.nextcloud.package.packages.apps) + contacts + calendar + notes + maps + memories + tasks + richdocuments + ; + }; appstoreEnable = true; autoUpdateApps.enable = true; settings = { @@ -51,9 +67,7 @@ in # "baldur.zto" "baldur.tsn" ]; - trusted_domains = [ - "heimdall.tsn" - ]; + trusted_domains = [ "heimdall.tsn" ]; # overwriteprotocol = "http"; }; config = { diff --git a/modules/nixos/rclone.nix b/modules/nixos/rclone.nix index 7fe8fce..76b8798 100644 --- a/modules/nixos/rclone.nix +++ b/modules/nixos/rclone.nix @@ -1,3 +1,3 @@ -{ pkgs, ... }: { +{ # systemd.services.rclone-mounts = { }; } diff --git a/modules/nixos/server/default.nix b/modules/nixos/server/default.nix index 33fa8a3..02e13fc 100644 --- a/modules/nixos/server/default.nix +++ b/modules/nixos/server/default.nix @@ -1,5 +1 @@ -{ - imports = [ - ./automatic-upgrade.nix - ]; -} +{ imports = [ ./automatic-upgrade.nix ]; } diff --git a/modules/nixos/steam.nix b/modules/nixos/steam.nix index fed395e..15071e7 100644 --- a/modules/nixos/steam.nix +++ b/modules/nixos/steam.nix @@ -11,7 +11,13 @@ # remotePlay.openFirewall = true; # incorrect values }; networking.firewall = { - allowedTCPPorts = [ 27036 27037 ]; - allowedUDPPorts = [ 27031 27036 ]; + allowedTCPPorts = [ + 27036 + 27037 + ]; + allowedUDPPorts = [ + 27031 + 27036 + ]; }; } diff --git a/modules/nixos/torrentbox.nix b/modules/nixos/torrentbox.nix index 9db127d..de24b9b 100644 --- a/modules/nixos/torrentbox.nix +++ b/modules/nixos/torrentbox.nix @@ -1,28 +1,76 @@ { - services = - { - # ombi = { enable = true; openFirewall = true; group = "users"; }; + services = { + # ombi = { enable = true; openFirewall = true; group = "users"; }; - bazarr = { enable = true; openFirewall = true; group = "users"; }; - lidarr = { enable = true; openFirewall = true; group = "users"; }; - prowlarr = { enable = true; openFirewall = true; }; - radarr = { enable = true; openFirewall = true; group = "users"; }; - readarr = { enable = true; openFirewall = true; group = "users"; }; - sonarr = { enable = true; openFirewall = true; group = "users"; }; - - transmission = { enable = true; openFirewall = true; group = "users"; settings.download-dir = "/mnt/raid/condiviso/Torrent"; }; + bazarr = { + enable = true; + openFirewall = true; + group = "users"; }; + lidarr = { + enable = true; + openFirewall = true; + group = "users"; + }; + prowlarr = { + enable = true; + openFirewall = true; + }; + radarr = { + enable = true; + openFirewall = true; + group = "users"; + }; + readarr = { + enable = true; + openFirewall = true; + group = "users"; + }; + sonarr = { + enable = true; + openFirewall = true; + group = "users"; + }; + + transmission = { + enable = true; + openFirewall = true; + group = "users"; + settings.download-dir = "/mnt/raid/condiviso/Torrent"; + }; + }; systemd.services = { # ombi.serviceConfig = { MemoryHigh = "400M"; MemoryMax = "1G"; }; - bazarr.serviceConfig = { MemoryHigh = "600M"; MemoryMax = "2G"; }; - lidarr.serviceConfig = { MemoryHigh = "600M"; MemoryMax = "2G"; }; - prowlarr.serviceConfig = { MemoryHigh = "600M"; MemoryMax = "2G"; }; - radarr.serviceConfig = { MemoryHigh = "600M"; MemoryMax = "2G"; }; - readarr.serviceConfig = { MemoryHigh = "600M"; MemoryMax = "2G"; }; - sonarr.serviceConfig = { MemoryHigh = "600M"; MemoryMax = "2G"; }; + bazarr.serviceConfig = { + MemoryHigh = "600M"; + MemoryMax = "2G"; + }; + lidarr.serviceConfig = { + MemoryHigh = "600M"; + MemoryMax = "2G"; + }; + prowlarr.serviceConfig = { + MemoryHigh = "600M"; + MemoryMax = "2G"; + }; + radarr.serviceConfig = { + MemoryHigh = "600M"; + MemoryMax = "2G"; + }; + readarr.serviceConfig = { + MemoryHigh = "600M"; + MemoryMax = "2G"; + }; + sonarr.serviceConfig = { + MemoryHigh = "600M"; + MemoryMax = "2G"; + }; - transmission.serviceConfig = { MemoryHigh = "400M"; MemoryMax = "1G"; }; + transmission.serviceConfig = { + MemoryHigh = "400M"; + MemoryMax = "1G"; + }; }; } diff --git a/modules/nixos/users/bertof.nix b/modules/nixos/users/bertof.nix index 40bc7fc..a6dd8a3 100644 --- a/modules/nixos/users/bertof.nix +++ b/modules/nixos/users/bertof.nix @@ -1,7 +1,14 @@ { users.users.bertof = { isNormalUser = true; - extraGroups = [ "libvirtd" "kvm" "network" "networkmanager" "wheel" "tss" ]; + extraGroups = [ + "libvirtd" + "kvm" + "network" + "networkmanager" + "wheel" + "tss" + ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG bertof@thor" diff --git a/modules/nixos/users/tiziano.nix b/modules/nixos/users/tiziano.nix index 6c2051a..72c6ab5 100644 --- a/modules/nixos/users/tiziano.nix +++ b/modules/nixos/users/tiziano.nix @@ -8,4 +8,3 @@ ]; }; } - diff --git a/rice.nix b/rice.nix index ce34218..a487a9a 100644 --- a/rice.nix +++ b/rice.nix @@ -1,7 +1,9 @@ self: super: with super.lib.nix-rice; -let theme = kitty-themes.getThemeByName "Nightfox"; -in { +let + theme = kitty-themes.getThemeByName "Nightfox"; +in +{ rice = { colorPalette = rec { normal = palette.defaultPalette // { diff --git a/secrets/secrets.nix b/secrets/secrets.nix index e27e335..4a55890 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -2,7 +2,10 @@ let bertof_odin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIC3W3Btk1qtLHU69aFwseDuKU6PJMA+NxVXJXiRNhDce bertof@odin"; bertof_thor = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKT+D5QE4TkgoKw5IvSYpvnvIIRM87RBePHce1Aaz3xJ bertof@thor"; - devUsers = [ bertof_odin bertof_thor ]; + devUsers = [ + bertof_odin + bertof_thor + ]; baldur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMZKc/X9TsoN3UbEJUa0PIx96RGYoDEzDlZPZb0ctwTN"; freya = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBclEOy4xs9yBp4RgfTf1FPeqTdERM6d6nDhnMQ3WVGI"; @@ -11,7 +14,14 @@ let odin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP8bfOYmFN+KRjnAOdt9IazGeaRKm5tvGyblHD7MUhtr"; thor = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbMiGx/QZ/RKgad3UNyEzgLfqRU0zBo8n0AU3s244Zw"; - systems = [ baldur freya heimdall loki odin thor ]; + systems = [ + baldur + freya + heimdall + loki + odin + thor + ]; in { # "oauth_proxy_client_credentials.age".publicKeys = devUsers ++ systems; diff --git a/themes/catppuccin-mocha.nix b/themes/catppuccin-mocha.nix index ce398ae..a16070a 100644 --- a/themes/catppuccin-mocha.nix +++ b/themes/catppuccin-mocha.nix @@ -27,4 +27,3 @@ Mantle = "#181825"; # rgb(24, 24, 37) hsl(240, 21%, 12%) Crust = "#11111b"; # rgb(17, 17, 27) hsl(240, 23%, 9%) } -