From 5b974a203bf5fb8bfb7d0fd9bd817258385b5c5a Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Thu, 19 Jan 2023 19:53:17 +0100 Subject: [PATCH] Switch to nixfmt --- baldur/configuration.nix | 81 ++++++--- baldur/hardware-configuration.nix | 17 +- baldur/hm.nix | 4 +- custom/clipedit/default.nix | 3 +- custom/default.nix | 3 +- custom/lockscreen/default.nix | 16 +- custom/update-background/default.nix | 13 +- flake.nix | 243 ++++++++++++++++---------- freya/configuration.nix | 5 +- hm_modules/alacritty.nix | 3 +- hm_modules/autorandr.nix | 186 ++++++++++---------- hm_modules/bash.nix | 4 +- hm_modules/biblio.nix | 4 +- hm_modules/blender.nix | 4 +- hm_modules/bspwm.nix | 3 +- hm_modules/cava.nix | 3 +- hm_modules/development/cpp.nix | 17 +- hm_modules/development/data.nix | 17 +- hm_modules/development/docker.nix | 10 +- hm_modules/development/go.nix | 8 +- hm_modules/development/javascript.nix | 12 +- hm_modules/development/kubernetes.nix | 8 +- hm_modules/development/latex.nix | 25 ++- hm_modules/development/nix.nix | 16 +- hm_modules/development/python.nix | 29 ++- hm_modules/development/rust.nix | 67 ++++--- hm_modules/dunst.nix | 3 +- hm_modules/dwarf-fortress.nix | 14 +- hm_modules/git.nix | 3 +- hm_modules/gnome_shell.nix | 5 +- hm_modules/heif.nix | 4 +- hm_modules/helix.nix | 160 ++++++++--------- hm_modules/kakoune.nix | 7 +- hm_modules/kdeconnect.nix | 5 +- hm_modules/kitty.nix | 24 +-- hm_modules/lf.nix | 3 +- hm_modules/libinput-gestures.nix | 3 +- hm_modules/pass.nix | 17 +- hm_modules/polybar.nix | 125 +++++++------ hm_modules/pro_audio.nix | 3 +- hm_modules/rofi.nix | 8 +- hm_modules/sxhkd.nix | 161 +++++++++-------- hm_modules/syncthing.nix | 7 +- hm_modules/syncthing_tiziano.nix | 7 +- hm_modules/terminator.nix | 3 +- hm_modules/twmn.nix | 13 +- hm_modules/webapp.nix | 14 +- hm_modules/xidlehook.nix | 3 +- hm_modules/zathura.nix | 4 +- loki/configuration.nix | 193 ++++++++++---------- loki/hardware-configuration.nix | 7 +- nixos_modules/big_data.nix | 3 +- nixos_modules/digitalocean.nix | 4 +- nixos_modules/dnsmasq.nix | 3 +- nixos_modules/extended_registry.nix | 33 +++- nixos_modules/nix-serve.nix | 7 +- odin/common_configuration.nix | 65 +++---- odin/configuration-intel.nix | 3 +- odin/configuration-nvidia.nix | 3 +- odin/hardware-configuration.nix | 161 ++++++++--------- secrets/secrets.nix | 27 +-- thor/configuration.nix | 25 ++- thor/hardware-configuration.nix | 5 +- 63 files changed, 990 insertions(+), 946 deletions(-) diff --git a/baldur/configuration.nix b/baldur/configuration.nix index b250646..70eff7e 100644 --- a/baldur/configuration.nix +++ b/baldur/configuration.nix @@ -13,7 +13,10 @@ with lib; { }; }; - console = { font = "Lat2-Terminus16"; keyMap = "it"; }; + console = { + font = "Lat2-Terminus16"; + keyMap = "it"; + }; environment = { pathsToLink = [ "/share/zsh" ]; @@ -23,8 +26,14 @@ with lib; { i18n.defaultLocale = "it_IT.UTF-8"; programs = { - gnupg.agent = { enable = true; enableSSHSupport = true; }; - zsh = { enable = true; syntaxHighlighting.enable = true; }; + gnupg.agent = { + enable = true; + enableSSHSupport = true; + }; + zsh = { + enable = true; + syntaxHighlighting.enable = true; + }; }; networking.hostName = "baldur"; @@ -48,33 +57,61 @@ with lib; { ssh = "${pkgs.avahi}/etc/avahi/services/ssh.service"; }; }; - fail2ban = { enable = true; bantime-increment.enable = true; }; + fail2ban = { + enable = true; + bantime-increment.enable = true; + }; nginx = { enable = true; recommendedProxySettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; recommendedTlsSettings = true; - virtualHosts = - let - ssl = { enableACME = true; forceSSL = true; }; - loki = "172.23.254.55"; - in - { - "unimi.bertof.net" = ssl // { locations."/".extraConfig = "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; }; - "home-assistant.bertof.net" = ssl // { - locations."/" = { proxyPass = "http://${loki}:8123/"; proxyWebsockets = true; }; - extraConfig = '' - proxy_pass_header Authorization; - proxy_buffering off; - ''; - }; - "radarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://${loki}:7878/"; proxyWebsockets = true; }; }; - "sonarr.bertof.net" = ssl // { locations."/" = { proxyPass = "http://${loki}:8989/"; proxyWebsockets = true; }; }; - "jellyfin.bertof.net" = ssl // { locations."/" = { proxyPass = "http://${loki}:8096/"; proxyWebsockets = true; }; }; + virtualHosts = let + ssl = { + enableACME = true; + forceSSL = true; }; + loki = "172.23.254.55"; + in { + "unimi.bertof.net" = ssl // { + locations."/".extraConfig = + "rewrite ^/(.*)$ https://homes.di.unimi.it/berto/$1 redirect ;"; + }; + "home-assistant.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://${loki}:8123/"; + proxyWebsockets = true; + }; + extraConfig = '' + proxy_pass_header Authorization; + proxy_buffering off; + ''; + }; + "radarr.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://${loki}:7878/"; + proxyWebsockets = true; + }; + }; + "sonarr.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://${loki}:8989/"; + proxyWebsockets = true; + }; + }; + "jellyfin.bertof.net" = ssl // { + locations."/" = { + proxyPass = "http://${loki}:8096/"; + proxyWebsockets = true; + }; + }; + }; + }; + openssh = { + enable = true; + openFirewall = true; }; - openssh = { enable = true; openFirewall = true; }; }; security.acme = { diff --git a/baldur/hardware-configuration.nix b/baldur/hardware-configuration.nix index e630609..bf1c1e7 100644 --- a/baldur/hardware-configuration.nix +++ b/baldur/hardware-configuration.nix @@ -1,21 +1,18 @@ { modulesPath, ... }: { - imports = - [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "virtio_blk" ]; + boot.initrd.availableKernelModules = + [ "ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "virtio_blk" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/7fa05ac4-8e10-4994-bb7d-4be88e4a6696"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/7fa05ac4-8e10-4994-bb7d-4be88e4a6696"; + fsType = "ext4"; + }; swapDevices = [ ]; diff --git a/baldur/hm.nix b/baldur/hm.nix index 3a9393e..9b53210 100644 --- a/baldur/hm.nix +++ b/baldur/hm.nix @@ -5,9 +5,7 @@ layout = "it"; options = [ "terminate:ctrl_alt_bksp" "compose:rctrl" "grp:menu_toggle" ]; }; - packages = with pkgs; [ - nix-prefetch-scripts - ]; + packages = with pkgs; [ nix-prefetch-scripts ]; }; imports = [ ../hm_modules/__basic.nix diff --git a/custom/clipedit/default.nix b/custom/clipedit/default.nix index 7f28342..c465baa 100644 --- a/custom/clipedit/default.nix +++ b/custom/clipedit/default.nix @@ -1,4 +1,5 @@ -{ writeShellScriptBin, lib, xclip, coreutils, terminal-command ? "kitty sh -c", editor-command ? "hx" }: +{ writeShellScriptBin, lib, xclip, coreutils, terminal-command ? "kitty sh -c" +, editor-command ? "hx" }: # 64 │ function clipcopy() { xclip -in -selection clipboard < "${1:-/dev/stdin}"; } # 65 │ function clippaste() { xclip -out -selection clipboard; } clip writeShellScriptBin "clipedit" '' diff --git a/custom/default.nix b/custom/default.nix index 86fca84..25def88 100644 --- a/custom/default.nix +++ b/custom/default.nix @@ -8,5 +8,4 @@ let update-background = callPackage ./update-background { }; vital-synth = callPackage ./vital-synth { }; }; -in -self +in self diff --git a/custom/lockscreen/default.nix b/custom/lockscreen/default.nix index 16e1f84..d59d741 100644 --- a/custom/lockscreen/default.nix +++ b/custom/lockscreen/default.nix @@ -1,15 +1,7 @@ -{ lib -, rice -, roboto -, i3lock-color -, writeScriptBin -, font ? { - package = roboto; - name = "Roboto"; - } -, palette ? rice.palette.palette { } -, ... -}: +{ lib, rice, roboto, i3lock-color, writeScriptBin, font ? { + package = roboto; + name = "Roboto"; +}, palette ? rice.palette.palette { }, ... }: let strPalette = lib.nix-rice.palette.toRGBAHex palette; in writeScriptBin "lockscreen" '' # Using font package ${font.package} diff --git a/custom/update-background/default.nix b/custom/update-background/default.nix index 92d3c17..d57f2e8 100644 --- a/custom/update-background/default.nix +++ b/custom/update-background/default.nix @@ -1,17 +1,10 @@ -{ feh -, glib -, findutils -, gnugrep -, coreutils -, writeScriptBin -, backgrounds_directory ? "$HOME/Immagini/Sfondi" -}: +{ feh, glib, findutils, gnugrep, coreutils, writeScriptBin +, backgrounds_directory ? "$HOME/Immagini/Sfondi" }: let find = "${findutils}/bin/find"; grep = "${gnugrep}/bin/grep"; shuf = "${coreutils}/bin/shuf"; -in -writeScriptBin "update-background" '' +in writeScriptBin "update-background" '' #!/bin/sh if [ $# -eq 0 ]; then image=`${find} ${backgrounds_directory} -type f | ${grep} -v "/\." | ${shuf} -n 1` diff --git a/flake.nix b/flake.nix index fdc034f..eb8a6bc 100644 --- a/flake.nix +++ b/flake.nix @@ -4,32 +4,48 @@ inputs = { nixpkgs.url = "github:NixOS/nixpkgs/release-22.11"; nixpkgs-u.url = "github:NixOS/nixpkgs/nixos-unstable"; - home-manager = { url = "github:nix-community/home-manager/release-22.11"; inputs = { nixpkgs.follows = "nixpkgs"; utils.follows = "flake-utils"; }; }; + home-manager = { + url = "github:nix-community/home-manager/release-22.11"; + inputs = { + nixpkgs.follows = "nixpkgs"; + utils.follows = "flake-utils"; + }; + }; - 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"; - 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"; nix-rice = { url = "github:bertof/nix-rice/v0.3.1"; }; - pre-commit-hooks = { url = "github:cachix/pre-commit-hooks.nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; - tex2nix = { url = "github:Mic92/tex2nix"; inputs = { nixpkgs.follows = "nixpkgs"; flake-utils.follows = "flake-utils"; }; }; + pre-commit-hooks = { + url = "github:cachix/pre-commit-hooks.nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-utils.follows = "flake-utils"; + }; + }; + tex2nix = { + url = "github:Mic92/tex2nix"; + inputs = { + nixpkgs.follows = "nixpkgs"; + flake-utils.follows = "flake-utils"; + }; + }; }; - outputs = - { self - , nixpkgs - , nixpkgs-u - , home-manager - , agenix - , deploy-rs - , flake-utils - , nixos-generators - , nixos-hardware - , nix-rice - , pre-commit-hooks - , tex2nix - }: + outputs = { self, nixpkgs, nixpkgs-u, home-manager, agenix, deploy-rs + , flake-utils, nixos-generators, nixos-hardware, nix-rice, pre-commit-hooks + , tex2nix }: let config = { allowUnfree = true; @@ -43,8 +59,14 @@ overlays = [ # Combine stable and unstable packages (self: _: { - stable = import nixpkgs { inherit config overlays; inherit (self) system; }; - unstable = import nixpkgs-u { inherit config overlays; inherit (self) system; }; + stable = import nixpkgs { + inherit config overlays; + inherit (self) system; + }; + unstable = import nixpkgs-u { + inherit config overlays; + inherit (self) system; + }; inherit (tex2nix.packages.${self.system}) tex2nix; }) @@ -62,39 +84,41 @@ palette = self.rice.colorPalette; font = self.rice.font.normal; }; - sddm-theme-clairvoyance = self.callPackage ./custom/sddm-theme-clairvoyance { - wallpaper = ./wallpapers/comfy_waves.jpg; - }; + sddm-theme-clairvoyance = + self.callPackage ./custom/sddm-theme-clairvoyance { + wallpaper = ./wallpapers/comfy_waves.jpg; + }; }) ]; - basic = with flake-utils.lib; eachDefaultSystem (system: - let - pkgs = import nixpkgs { inherit system config overlays; }; - in - { - formatter = pkgs.nixpkgs-fmt; + basic = with flake-utils.lib; + eachDefaultSystem (system: + let pkgs = import nixpkgs { inherit system config overlays; }; + in { + formatter = pkgs.writeShellScriptBin "formatter" '' + ${pkgs.findutils}/bin/find . -name '*.nix' -exec ${pkgs.nixfmt}/bin/nixfmt {} \+ + ''; - checks = { - pre-commit-check = pre-commit-hooks.lib.${system}.run { - src = ./.; - hooks = { - deadnix.enable = true; - nixpkgs-fmt.enable = true; - nix-linter.enable = true; - statix.enable = true; + checks = { + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + hooks = { + deadnix.enable = true; + nixfmt.enable = true; + nix-linter.enable = true; + statix.enable = true; + }; }; }; - }; - devShells.default = pkgs.mkShell { - buildInputs = [ deploy-rs.packages.${system}.deploy-rs ]; - shellHook = '' - ${self.checks.${system}.pre-commit-check.shellHook} - ''; - LOCAL_KEY = "/etc/nix/key"; - }; - }); + devShells.default = pkgs.mkShell { + buildInputs = [ deploy-rs.packages.${system}.deploy-rs ]; + shellHook = '' + ${self.checks.${system}.pre-commit-check.shellHook} + ''; + LOCAL_KEY = "/etc/nix/key"; + }; + }); commonModules = [ # Nix configuration @@ -103,8 +127,20 @@ nix = { extraOptions = "experimental-features = nix-command flakes"; 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; + }; }; }; services.fstrim.enable = true; @@ -112,7 +148,12 @@ # Home manager configuration home-manager.nixosModules.home-manager - { home-manager = { useGlobalPkgs = true; useUserPackages = true; }; } + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + }; + } agenix.nixosModule { # age.secrets.oauth_proxy_client_credentials.file = ./secrets/oauth_proxy_client_credentials.age; @@ -138,8 +179,20 @@ nix = { extraOptions = "experimental-features = nix-command flakes"; 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; + }; }; }; } @@ -175,42 +228,39 @@ }; odinConfig = { - nixosConfigurations = - let - odinCommonModules = [ - nixos-hardware.nixosModules.common-cpu-intel - nixos-hardware.nixosModules.common-pc-laptop - nixos-hardware.nixosModules.common-pc-laptop-ssd - ./odin/hardware-configuration.nix - ./odin/common_configuration.nix + nixosConfigurations = let + odinCommonModules = [ + nixos-hardware.nixosModules.common-cpu-intel + nixos-hardware.nixosModules.common-pc-laptop + nixos-hardware.nixosModules.common-pc-laptop-ssd + ./odin/hardware-configuration.nix + ./odin/common_configuration.nix - ./nixos_modules/pro_audio.nix - ./nixos_modules/sesar.nix - ./nixos_modules/pentablet.nix - ./nixos_modules/steam-link.nix - ./nixos_modules/kdeconnect.nix + ./nixos_modules/pro_audio.nix + ./nixos_modules/sesar.nix + ./nixos_modules/pentablet.nix + ./nixos_modules/steam-link.nix + ./nixos_modules/kdeconnect.nix - { home-manager.users.bertof = import ./odin/hm.nix; } + { home-manager.users.bertof = import ./odin/hm.nix; } + ]; + in rec { + odin-nvidia = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = commonModules ++ odinCommonModules ++ [ + { nixpkgs.config = config // { cudaSupport = true; }; } + ./odin/configuration-nvidia.nix ]; - in - rec { - odin-nvidia = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = commonModules ++ odinCommonModules ++ [ - { nixpkgs.config = config // { cudaSupport = true; }; } - ./odin/configuration-nvidia.nix - ]; - }; - - odin-intel = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - modules = commonModules ++ odinCommonModules ++ [ - ./odin/configuration-intel.nix - ]; - }; - - odin = odin-intel; }; + + odin-intel = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = commonModules ++ odinCommonModules + ++ [ ./odin/configuration-intel.nix ]; + }; + + odin = odin-intel; + }; }; # freyaConfig = { @@ -261,7 +311,9 @@ 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 = { @@ -269,7 +321,8 @@ hostname = "thor.local"; profiles.system = { user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.thor; + path = deploy-rs.lib.x86_64-linux.activate.nixos + self.nixosConfigurations.thor; }; }; @@ -277,7 +330,8 @@ hostname = "odin.local"; profiles.system = { user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.odin; + path = deploy-rs.lib.x86_64-linux.activate.nixos + self.nixosConfigurations.odin; }; }; @@ -285,7 +339,8 @@ hostname = "loki.local"; profiles.system = { user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.loki; + path = deploy-rs.lib.x86_64-linux.activate.nixos + self.nixosConfigurations.loki; }; }; @@ -293,14 +348,15 @@ hostname = "baldur.bertof.net"; profiles.system = { user = "root"; - path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.baldur; + path = deploy-rs.lib.x86_64-linux.activate.nixos + self.nixosConfigurations.baldur; }; }; }; }; - images = with flake-utils.lib; eachSystem [ system.x86_64-linux system.aarch64-linux ] (system: - { + images = with flake-utils.lib; + eachSystem [ system.x86_64-linux system.aarch64-linux ] (system: { packages = { # Installer ISO install-iso = nixos-generators.nixosGenerate { @@ -318,8 +374,7 @@ }; }); - in - builtins.foldl' nixpkgs.lib.recursiveUpdate { } [ + in builtins.foldl' nixpkgs.lib.recursiveUpdate { } [ basic thorConfig odinConfig diff --git a/freya/configuration.nix b/freya/configuration.nix index 51e6dc0..8943fe6 100644 --- a/freya/configuration.nix +++ b/freya/configuration.nix @@ -2,7 +2,10 @@ with lib; { boot = { kernelPackages = pkgs.linuxPackages_latest; - loader = { systemd-boot.enable = true; efi.canTouchEfiVariables = true; }; + loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; }; console = { diff --git a/hm_modules/alacritty.nix b/hm_modules/alacritty.nix index 96ee39d..2100b3a 100644 --- a/hm_modules/alacritty.nix +++ b/hm_modules/alacritty.nix @@ -21,8 +21,7 @@ let }; }; }; -in -{ +in { # Include fonts packages home.packages = [ pkgs.rice.font.monospace.package ]; programs.alacritty = { diff --git a/hm_modules/autorandr.nix b/hm_modules/autorandr.nix index 83c9eb0..9d265e9 100644 --- a/hm_modules/autorandr.nix +++ b/hm_modules/autorandr.nix @@ -1,102 +1,100 @@ { programs.autorandr = { enable = true; - profiles = - let - dell-laptop = { - dpi = 96; - fingerprint = - "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; - mode = "1920x1080"; - }; - in - { - odin-nvidia = { - fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; }; - config = { - "eDP-1-1" = { - inherit (dell-laptop) mode dpi; - primary = true; - crtc = 0; - }; - }; - }; - odin-intel = { - fingerprint = { "eDP1" = dell-laptop.fingerprint; }; - config = { - "eDP1" = { - inherit (dell-laptop) mode dpi; - primary = true; - crtc = 0; - }; - }; - }; - odin-intel-laboratorio-dock-dell = { - fingerprint = { - "DP1-3" = - "00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088"; - "eDP1" = dell-laptop.fingerprint; - }; - config = { - "DP1-3" = { - crtc = 1; - mode = "1680x1050"; - position = "120x0"; - primary = true; - dpi = 96; - }; - "eDP1" = { - inherit (dell-laptop) mode dpi; - crtc = 0; - position = "0x1080"; - }; - }; - }; - odin-intel-laboratorio = { - fingerprint = { - "DP1-3" = - "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081"; - "eDP1" = dell-laptop.fingerprint; - }; - config = { - "DP1-3" = { - crtc = 1; - mode = "1920x1080"; - position = "0x0"; - primary = true; - dpi = 96; - }; - "eDP1" = { - inherit (dell-laptop) mode dpi; - crtc = 0; - position = "0x1080"; - }; - }; - }; - thor-default = { - fingerprint = { - "DP-2" = - "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; - "HDMI-0" = - "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; - }; - config = { - "DP-2" = { - crtc = 0; - mode = "2560x1440"; - position = "1080x162"; - primary = true; - dpi = 96; - }; - "HDMI-0" = { - crtc = 1; - mode = "1920x1080"; - position = "0x0"; - rotate = "right"; - dpi = 96; - }; + profiles = let + dell-laptop = { + dpi = 96; + fingerprint = + "00ffffffffffff0030e43f0500000000001a010495221378eaa1c59459578f27205054000000010101010101010101010101010101012e3680a070381f403020350058c21000001a5c2b80a070381f403020350058c21000001a000000fe0034584b3133803135365746360a000000000000413196001000000a010a202000c5"; + mode = "1920x1080"; + }; + in { + odin-nvidia = { + fingerprint = { "eDP-1-1" = dell-laptop.fingerprint; }; + config = { + "eDP-1-1" = { + inherit (dell-laptop) mode dpi; + primary = true; + crtc = 0; }; }; }; + odin-intel = { + fingerprint = { "eDP1" = dell-laptop.fingerprint; }; + config = { + "eDP1" = { + inherit (dell-laptop) mode dpi; + primary = true; + crtc = 0; + }; + }; + }; + odin-intel-laboratorio-dock-dell = { + fingerprint = { + "DP1-3" = + "00ffffffffffff0010ac10d04c36453221110103682b1b78ee8db0a2544a9c25115054a54b00714f818001010101010101010101010121399030621a274068b03600ae0e1100001c000000ff00434b3632373738413245364c0a000000fd00384b1e530f000a202020202020000000fc0044454c4c20453230375746500a0088"; + "eDP1" = dell-laptop.fingerprint; + }; + config = { + "DP1-3" = { + crtc = 1; + mode = "1680x1050"; + position = "120x0"; + primary = true; + dpi = 96; + }; + "eDP1" = { + inherit (dell-laptop) mode dpi; + crtc = 0; + position = "0x1080"; + }; + }; + }; + odin-intel-laboratorio = { + fingerprint = { + "DP1-3" = + "00ffffffffffff0010ac71404c473344281601030e331d78eadd45a3554fa027125054a54b00714f8180d1c001010101010101010101023a801871382d40582c4500fe1f1100001e000000ff004b463837593241364433474c0a000000fc0044454c4c205532333132484d0a000000fd00384c1e5311000a2020202020200081"; + "eDP1" = dell-laptop.fingerprint; + }; + config = { + "DP1-3" = { + crtc = 1; + mode = "1920x1080"; + position = "0x0"; + primary = true; + dpi = 96; + }; + "eDP1" = { + inherit (dell-laptop) mode dpi; + crtc = 0; + position = "0x1080"; + }; + }; + }; + thor-default = { + fingerprint = { + "DP-2" = + "00ffffffffffff001e6d7f5ba1c60a00011f0104b53c22789f8cb5af4f43ab260e5054254b007140818081c0a9c0b300d1c08100d1cf09ec00a0a0a0675030203a0055502100001a000000fd0030901ee63c000a202020202020000000fc004c4720554c545241474541520a000000ff003130314e5454514c533230390a017102031a7123090607e305c000e606050160592846100403011f136fc200a0a0a0555030203a0055502100001a565e00a0a0a029503020350055502100001a5aa000a0a0a0465030203a005550210000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000da"; + "HDMI-0" = + "00ffffffffffff004c2d2c0d443650302e19010380341d782a5295a556549d250e5054bb8c00b30081c0810081809500a9c001010101023a801871382d40582c450009252100001e000000fd0030481e5216000a202020202020000000fc00433234463339300a2020202020000000ff00485451483330353636370a20200163020324f14690041f131203230907078301000067030c001000802b681a00000101304800011d00bc52d01e20b828554009252100001e8c0ad090204031200c4055000925210000188c0ad08a20e02d10103e9600092521000018215280a07238304088c8350009252100001c00000000000000000000000000000000000000fa"; + }; + config = { + "DP-2" = { + crtc = 0; + mode = "2560x1440"; + position = "1080x162"; + primary = true; + dpi = 96; + }; + "HDMI-0" = { + crtc = 1; + mode = "1920x1080"; + position = "0x0"; + rotate = "right"; + dpi = 96; + }; + }; + }; + }; }; } diff --git a/hm_modules/bash.nix b/hm_modules/bash.nix index 8a83e81..71ceb40 100644 --- a/hm_modules/bash.nix +++ b/hm_modules/bash.nix @@ -2,9 +2,7 @@ programs.bash = { enable = true; enableVteIntegration = true; - shellAliases = { - ".." = "cd .."; - }; + shellAliases = { ".." = "cd .."; }; bashrcExtra = '' source $HOME/.profile diff --git a/hm_modules/biblio.nix b/hm_modules/biblio.nix index 5033ec6..3fb1372 100644 --- a/hm_modules/biblio.nix +++ b/hm_modules/biblio.nix @@ -1,3 +1 @@ -{ pkgs, ... }: { - home.packages = with pkgs;[ calibre mangal ]; -} +{ pkgs, ... }: { home.packages = with pkgs; [ calibre mangal ]; } diff --git a/hm_modules/blender.nix b/hm_modules/blender.nix index 239a4bf..28da2b6 100644 --- a/hm_modules/blender.nix +++ b/hm_modules/blender.nix @@ -1,3 +1 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ blender ]; -} +{ pkgs, ... }: { home.packages = with pkgs; [ blender ]; } diff --git a/hm_modules/bspwm.nix b/hm_modules/bspwm.nix index 102e23e..a663cc8 100644 --- a/hm_modules/bspwm.nix +++ b/hm_modules/bspwm.nix @@ -13,8 +13,7 @@ let systemctl --user restart kdeconnect-indicator # Restart polybar ''; strPalette = palette.toRGBHex pkgs.rice.colorPalette; -in -{ +in { xsession.windowManager.bspwm = { enable = true; settings = { diff --git a/hm_modules/cava.nix b/hm_modules/cava.nix index 6eeabe1..61b1059 100644 --- a/hm_modules/cava.nix +++ b/hm_modules/cava.nix @@ -2,8 +2,7 @@ let strPalette = pkgs.lib.nix-rice.palette.toRgbHex pkgs.rice.colorPalette; fmtString = str: "'${str}'"; -in -{ +in { home.packages = [ pkgs.cava ]; xdg.configFile."cava/config".text = lib.generators.toINI { } { diff --git a/hm_modules/development/cpp.nix b/hm_modules/development/cpp.nix index 998e269..be6d580 100644 --- a/hm_modules/development/cpp.nix +++ b/hm_modules/development/cpp.nix @@ -1,11 +1,12 @@ { pkgs, config, lib, ... }: { - home.packages = with pkgs; [ + home.packages = with pkgs; + [ - ] ++ lib.optionals config.programs.helix.enable [ - clang-tools # C, CPP - cmake-language-server # CMAKE - ] ++ lib.optionals config.programs.kakoune.enable [ - clang-tools # C, CPP - cmake-language-server # CMAKE - ]; + ] ++ lib.optionals config.programs.helix.enable [ + clang-tools # C, CPP + cmake-language-server # CMAKE + ] ++ lib.optionals config.programs.kakoune.enable [ + clang-tools # C, CPP + cmake-language-server # CMAKE + ]; } diff --git a/hm_modules/development/data.nix b/hm_modules/development/data.nix index 5909059..5e96fda 100644 --- a/hm_modules/development/data.nix +++ b/hm_modules/development/data.nix @@ -1,10 +1,11 @@ { config, pkgs, lib, ... }: { - home.packages = with pkgs; lib.optionals config.programs.helix.enable [ - nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS - yaml-language-server # YAML - taplo-cli # TOML - ] ++ lib.optionals config.programs.kakoune.enable [ - nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS - yaml-language-server # YAML - ]; + home.packages = with pkgs; + lib.optionals config.programs.helix.enable [ + nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS + yaml-language-server # YAML + taplo-cli # TOML + ] ++ lib.optionals config.programs.kakoune.enable [ + nodePackages.vscode-langservers-extracted # CSS, HTML, JSON, SCSS + yaml-language-server # YAML + ]; } diff --git a/hm_modules/development/docker.nix b/hm_modules/development/docker.nix index 6b8ea0d..bcdf8de 100644 --- a/hm_modules/development/docker.nix +++ b/hm_modules/development/docker.nix @@ -1,10 +1,8 @@ { pkgs, config, lib, ... }: { - home.packages = with pkgs; [ - docker-compose - docker-machine - ] ++ lib.optionals config.programs.helix.enable [ - nodePackages.dockerfile-language-server-nodejs - ]; + home.packages = with pkgs; + [ docker-compose docker-machine ] + ++ lib.optionals config.programs.helix.enable + [ nodePackages.dockerfile-language-server-nodejs ]; home.shellAliases = { "dkcd" = "docker-compose down"; "dkc" = "docker-compose"; diff --git a/hm_modules/development/go.nix b/hm_modules/development/go.nix index fa983e6..6d3d47b 100644 --- a/hm_modules/development/go.nix +++ b/hm_modules/development/go.nix @@ -4,9 +4,7 @@ goPath = ".go"; }; - home.packages = with pkgs; lib.optionals config.programs.helix.enable [ - gopls - ] ++ (lib.optionals config.programs.kakoune.enable [ - gopls - ]); + home.packages = with pkgs; + lib.optionals config.programs.helix.enable [ gopls ] + ++ (lib.optionals config.programs.kakoune.enable [ gopls ]); } diff --git a/hm_modules/development/javascript.nix b/hm_modules/development/javascript.nix index b46ec1e..dd722a2 100644 --- a/hm_modules/development/javascript.nix +++ b/hm_modules/development/javascript.nix @@ -1,10 +1,10 @@ { pkgs, lib, config, ... }: { - home.packages = with pkgs; [ + home.packages = with pkgs; + [ - ] ++ lib.optionals config.programs.helix.enable [ - nodePackages.typescript-language-server - ] ++ lib.optionals config.programs.kakoune.enable [ - nodePackages.typescript-language-server - ]; + ] ++ lib.optionals config.programs.helix.enable + [ nodePackages.typescript-language-server ] + ++ lib.optionals config.programs.kakoune.enable + [ nodePackages.typescript-language-server ]; } diff --git a/hm_modules/development/kubernetes.nix b/hm_modules/development/kubernetes.nix index d7e41e9..9f33e5a 100644 --- a/hm_modules/development/kubernetes.nix +++ b/hm_modules/development/kubernetes.nix @@ -1,7 +1 @@ -{ pkgs, ... }: { - home.packages = with pkgs; [ - kubectl - kubernetes-helm - lens - ]; -} +{ pkgs, ... }: { home.packages = with pkgs; [ kubectl kubernetes-helm lens ]; } diff --git a/hm_modules/development/latex.nix b/hm_modules/development/latex.nix index d31ca75..a698aaf 100644 --- a/hm_modules/development/latex.nix +++ b/hm_modules/development/latex.nix @@ -1,16 +1,13 @@ { pkgs, config, lib, ... }: { - home.packages = with pkgs; [ - bibtool - tex2nix - texlive.combined.scheme-medium - ] ++ lib.optionals config.programs.helix.enable [ - texlab - ] ++ lib.optionals config.programs.kakoune.enable [ - texlab - aspell - aspellDicts.en - aspellDicts.en-computers - aspellDicts.en-science - aspellDicts.it - ]; + home.packages = with pkgs; + [ bibtool tex2nix texlive.combined.scheme-medium ] + ++ lib.optionals config.programs.helix.enable [ texlab ] + ++ lib.optionals config.programs.kakoune.enable [ + texlab + aspell + aspellDicts.en + aspellDicts.en-computers + aspellDicts.en-science + aspellDicts.it + ]; } diff --git a/hm_modules/development/nix.nix b/hm_modules/development/nix.nix index 764add8..3440eaa 100644 --- a/hm_modules/development/nix.nix +++ b/hm_modules/development/nix.nix @@ -1,12 +1,6 @@ { pkgs, config, lib, ... }: { - home.packages = with pkgs; [ - nixpkgs-fmt - nix-prefetch-scripts - nix-review - nix-tree - ] ++ lib.optionals config.programs.helix.enable [ - nil - ] ++ lib.optionals config.programs.kakoune.enable [ - rnix-lsp - ]; -} + home.packages = with pkgs; + [ nixfmt nix-prefetch-scripts nix-review nix-tree ] + ++ lib.optionals config.programs.helix.enable [ nil ] + ++ lib.optionals config.programs.kakoune.enable [ rnix-lsp ]; +} diff --git a/hm_modules/development/python.nix b/hm_modules/development/python.nix index fdab7f6..849dd43 100644 --- a/hm_modules/development/python.nix +++ b/hm_modules/development/python.nix @@ -1,17 +1,16 @@ { pkgs, lib, config, ... }: { - home.packages = with pkgs; [ - black - ] ++ lib.optionals config.programs.helix.enable [ - python3Packages.python-lsp-server # PYLSP - # python3Packages.pyls-mypy # MYPY # NOT UPDATED - python3Packages.pyls-flake8 # FLAKE8 - # python3Packages.pyls-black # BLACK # NOT UPDATED - python3Packages.pyls-isort # ISORT - ] ++ lib.optionals config.programs.kakoune.enable [ - python3Packages.python-lsp-server # PYLSP - # python3Packages.pyls-mypy # MYPY # NOT UPDATED - python3Packages.pyls-flake8 # FLAKE8 - # python3Packages.pyls-black # BLACK # NOT UPDATED - python3Packages.pyls-isort # ISORT - ]; + home.packages = with pkgs; + [ black ] ++ lib.optionals config.programs.helix.enable [ + python3Packages.python-lsp-server # PYLSP + # python3Packages.pyls-mypy # MYPY # NOT UPDATED + python3Packages.pyls-flake8 # FLAKE8 + # python3Packages.pyls-black # BLACK # NOT UPDATED + python3Packages.pyls-isort # ISORT + ] ++ lib.optionals config.programs.kakoune.enable [ + python3Packages.python-lsp-server # PYLSP + # python3Packages.pyls-mypy # MYPY # NOT UPDATED + python3Packages.pyls-flake8 # FLAKE8 + # python3Packages.pyls-black # BLACK # NOT UPDATED + python3Packages.pyls-isort # ISORT + ]; } diff --git a/hm_modules/development/rust.nix b/hm_modules/development/rust.nix index 4c38e45..00d11b6 100644 --- a/hm_modules/development/rust.nix +++ b/hm_modules/development/rust.nix @@ -1,37 +1,34 @@ { pkgs, lib, config, ... }: { - home.packages = with pkgs; [ - bacon - cargo - # cargo-about - cargo-audit - # cargo-auditable - cargo-criterion - cargo-deadlinks - # cargo-deny - # cargo-deps - cargo-expand - # cargo-feature - 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 - rustfmt - ] ++ lib.optionals config.programs.helix.enable [ - rust-analyzer - ] ++ - lib.optionals config.programs.kakoune.enable [ - rust-analyzer - ]; + home.packages = with pkgs; + [ + bacon + cargo + # cargo-about + cargo-audit + # cargo-auditable + cargo-criterion + cargo-deadlinks + # cargo-deny + # cargo-deps + cargo-expand + # cargo-feature + 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 + rustfmt + ] ++ lib.optionals config.programs.helix.enable [ rust-analyzer ] + ++ lib.optionals config.programs.kakoune.enable [ rust-analyzer ]; } diff --git a/hm_modules/dunst.nix b/hm_modules/dunst.nix index d4f21cc..d7e0a07 100644 --- a/hm_modules/dunst.nix +++ b/hm_modules/dunst.nix @@ -1,8 +1,7 @@ { pkgs, ... }: with pkgs.lib.nix-rice; let strPalette = palette.toRGBHex pkgs.rice.colorPalette; -in -{ +in { home.packages = with pkgs; [ dunst rice.font.normal.package ]; services.dunst = { enable = true; diff --git a/hm_modules/dwarf-fortress.nix b/hm_modules/dwarf-fortress.nix index 415925f..1d553f6 100644 --- a/hm_modules/dwarf-fortress.nix +++ b/hm_modules/dwarf-fortress.nix @@ -1,10 +1,8 @@ { pkgs, ... }: let - package = with pkgs.dwarf-fortress-packages; dwarf-fortress-full.override { - theme = themes.ironhand; - enableFPS = true; - }; -in -{ - home.packages = [ package ]; -} + package = with pkgs.dwarf-fortress-packages; + dwarf-fortress-full.override { + theme = themes.ironhand; + enableFPS = true; + }; +in { home.packages = [ package ]; } diff --git a/hm_modules/git.nix b/hm_modules/git.nix index a642eed..d394173 100644 --- a/hm_modules/git.nix +++ b/hm_modules/git.nix @@ -87,8 +87,7 @@ let "gup" = "git pull --rebase"; "gupv" = "git pull --rebase -v"; }; -in -{ +in { programs.git = { enable = true; userName = "Filippo Berto"; diff --git a/hm_modules/gnome_shell.nix b/hm_modules/gnome_shell.nix index 5c85d98..cef0309 100644 --- a/hm_modules/gnome_shell.nix +++ b/hm_modules/gnome_shell.nix @@ -28,7 +28,4 @@ let user-themes # vitals ]; -in -{ - home.packages = [ pkgs.gnome.gnome-tweaks ] ++ gnomeExtensions; -} +in { home.packages = [ pkgs.gnome.gnome-tweaks ] ++ gnomeExtensions; } diff --git a/hm_modules/heif.nix b/hm_modules/heif.nix index 7df5ab5..0764462 100644 --- a/hm_modules/heif.nix +++ b/hm_modules/heif.nix @@ -1,7 +1,7 @@ { 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/hm_modules/helix.nix b/hm_modules/helix.nix index 4497110..85a1ea4 100644 --- a/hm_modules/helix.nix +++ b/hm_modules/helix.nix @@ -26,11 +26,13 @@ let "text/x-c++" ]; }; -in -{ +in { programs.bash.shellAliases = { x = "hx"; }; programs.zsh.shellAliases = { x = "hx"; }; - home.sessionVariables = { EDITOR = "hx"; VISUAL = "hx"; }; + home.sessionVariables = { + EDITOR = "hx"; + VISUAL = "hx"; + }; home.packages = with pkgs; [ nil # Nix language server desktopItem @@ -50,84 +52,82 @@ in "C-A-S-r" = ":reload-all"; }; }; - themes = - let - transparent = "none"; - gray = "#665c54"; - dark-gray = "#3c3836"; - white = "#fbf1c7"; - black = "#282828"; - red = "#fb4934"; - green = "#b8bb26"; - yellow = "#fabd2f"; - orange = "#fe8019"; - blue = "#83a598"; - magenta = "#d3869b"; - cyan = "#8ec07c"; - in - { - 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" ]; }; - "variable" = red; - "variable.builtin" = orange; - "constant.numeric" = orange; - "constant" = orange; - "attributes" = yellow; - "type" = yellow; - "ui.cursor.match" = { - fg = yellow; - modifiers = [ "underlined" ]; - }; - "string" = green; - "variable.other.member" = red; - "constant.character.escape" = cyan; - "function" = blue; - "constructor" = blue; - "special" = blue; - "keyword" = magenta; - "label" = magenta; - "namespace" = blue; - "diff.plus" = green; - "diff.delta" = yellow; - "diff.minus" = red; - "diagnostic" = { modifiers = [ "underlined" ]; }; - "ui.gutter" = { bg = black; }; - "info" = blue; - "hint" = dark-gray; - "debug" = dark-gray; - "warning" = yellow; - "error" = red; + themes = let + transparent = "none"; + gray = "#665c54"; + dark-gray = "#3c3836"; + white = "#fbf1c7"; + black = "#282828"; + red = "#fb4934"; + green = "#b8bb26"; + yellow = "#fabd2f"; + orange = "#fe8019"; + blue = "#83a598"; + magenta = "#d3869b"; + cyan = "#8ec07c"; + in { + 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" ]; }; + "variable" = red; + "variable.builtin" = orange; + "constant.numeric" = orange; + "constant" = orange; + "attributes" = yellow; + "type" = yellow; + "ui.cursor.match" = { + fg = yellow; + modifiers = [ "underlined" ]; + }; + "string" = green; + "variable.other.member" = red; + "constant.character.escape" = cyan; + "function" = blue; + "constructor" = blue; + "special" = blue; + "keyword" = magenta; + "label" = magenta; + "namespace" = blue; + "diff.plus" = green; + "diff.delta" = yellow; + "diff.minus" = red; + "diagnostic" = { modifiers = [ "underlined" ]; }; + "ui.gutter" = { bg = black; }; + "info" = blue; + "hint" = dark-gray; + "debug" = dark-gray; + "warning" = yellow; + "error" = red; }; + }; }; } diff --git a/hm_modules/kakoune.nix b/hm_modules/kakoune.nix index 27c49af..b50f192 100644 --- a/hm_modules/kakoune.nix +++ b/hm_modules/kakoune.nix @@ -61,8 +61,7 @@ let }) ]; -in -{ +in { programs.bash.shellAliases = { k = "kak"; }; programs.zsh.shellAliases = { k = "kak"; }; home.packages = packages; @@ -266,8 +265,8 @@ in }; # 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/hm_modules/kdeconnect.nix b/hm_modules/kdeconnect.nix index 44655c3..544c162 100644 --- a/hm_modules/kdeconnect.nix +++ b/hm_modules/kdeconnect.nix @@ -1,3 +1,6 @@ { - services.kdeconnect = { enable = true; indicator = true; }; + services.kdeconnect = { + enable = true; + indicator = true; + }; } diff --git a/hm_modules/kitty.nix b/hm_modules/kitty.nix index 2462a3e..35eb307 100644 --- a/hm_modules/kitty.nix +++ b/hm_modules/kitty.nix @@ -2,28 +2,10 @@ 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 -{ +in { programs.kitty = { enable = true; settings = { diff --git a/hm_modules/lf.nix b/hm_modules/lf.nix index 15152f7..8799236 100644 --- a/hm_modules/lf.nix +++ b/hm_modules/lf.nix @@ -17,8 +17,7 @@ let ${pkgs.pistol}/bin/pistol "$file" ''; -in -{ +in { programs.lf = { enable = true; settings = { diff --git a/hm_modules/libinput-gestures.nix b/hm_modules/libinput-gestures.nix index a8c844c..64135ca 100644 --- a/hm_modules/libinput-gestures.nix +++ b/hm_modules/libinput-gestures.nix @@ -2,8 +2,7 @@ let libinputGesturesCmd = "${pkgs.libinput-gestures}/bin/libinput-gestures"; xdotool = "${pkgs.xdotool}/bin/xdotool"; -in -{ +in { systemd.user.services."libinput-gestures" = { Unit = { Description = "Touchpad gestures"; diff --git a/hm_modules/pass.nix b/hm_modules/pass.nix index e88efac..2f5de5d 100644 --- a/hm_modules/pass.nix +++ b/hm_modules/pass.nix @@ -1,13 +1,14 @@ { pkgs, ... }: { programs.password-store = { - package = pkgs.pass.withExtensions (ext: with ext; [ - pass-audit - pass-checkup - pass-import - pass-otp - pass-tomb - pass-update - ]); + package = pkgs.pass.withExtensions (ext: + with ext; [ + pass-audit + pass-checkup + pass-import + pass-otp + pass-tomb + pass-update + ]); enable = true; }; } diff --git a/hm_modules/polybar.nix b/hm_modules/polybar.nix index a28ac80..df909cb 100644 --- a/hm_modules/polybar.nix +++ b/hm_modules/polybar.nix @@ -26,14 +26,13 @@ let playerStatus = "${playerCtl} -f '{{emoji(status)}} {{title}} - {{artist}}' metadata | ${head} -c 50"; confirm_command = { cmd, title ? null, text ? null, image ? null }: - lib.concatStringsSep " " - [ - "${pkgs.yad}/bin/yad --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom" - (if title == null then "" else ''--title "${title}"'') - (if image == null then "" else ''--image "${image}"'') - (if text == null then "" else ''--text "${text}"'') - "&& ${cmd}" - ]; + lib.concatStringsSep " " [ + "${pkgs.yad}/bin/yad --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom" + (if title == null then "" else ''--title "${title}"'') + (if image == null then "" else ''--image "${image}"'') + (if text == null then "" else ''--text "${text}"'') + "&& ${cmd}" + ]; systemctl = "${pkgs.systemd}/bin/systemctl"; loginctl = "${pkgs.systemd}/bin/loginctl"; shutdown = "${pkgs.systemd}/bin/shutdown"; @@ -43,8 +42,7 @@ let ''; colors = with pkgs.lib.nix-rice; let alpha = 255 * opacity; - in - palette.toARGBHex rec { + in palette.toARGBHex rec { normal = { foreground = color.darken 10 colorPalette.foreground; @@ -111,8 +109,7 @@ let }; ramp = [ "▂" "▃" "▄" "▅" "▆" "▇" ]; -in -{ +in { home.packages = with pkgs; [ pkgs.rice.font.monospace.package # emojione @@ -140,7 +137,8 @@ in "bar/primary" = recursiveUpdate commonBar { modules-left = "bspwm"; # modules-center = - modules-right = "player pulseaudio temperature cpu memory battery notifications powermenu date"; + modules-right = + "player pulseaudio temperature cpu memory battery notifications powermenu date"; tray = { position = "right"; padding = 1; @@ -150,7 +148,8 @@ in "bar/secondary" = recursiveUpdate commonBar { modules-left = "bspwm"; # modules-center = - modules-right = "player pulseaudio temperature cpu memory battery notifications powermenu date"; + modules-right = + "player pulseaudio temperature cpu memory battery notifications powermenu date"; }; "module/battery" = { @@ -193,22 +192,20 @@ in type = "internal/bspwm"; format = ""; - label = - let - common = { - padding = 1; - # separator = " "; - text = "%name%"; - }; - in - { - focused = recursiveUpdate common colors.selected; - occupied = recursiveUpdate common colors.active; - urgent = recursiveUpdate (recursiveUpdate common colors.active) { - background = colors.alert; - }; - empty = recursiveUpdate common colors.normal; + label = let + common = { + padding = 1; + # separator = " "; + text = "%name%"; }; + in { + focused = recursiveUpdate common colors.selected; + occupied = recursiveUpdate common colors.active; + urgent = recursiveUpdate (recursiveUpdate common colors.active) { + background = colors.alert; + }; + empty = recursiveUpdate common colors.normal; + }; }; "module/cpu" = { @@ -303,42 +300,40 @@ in open = recursiveUpdate colors.normal { text = "●"; }; close = recursiveUpdate colors.normal { text = ""; }; }; - menu = [ - [ - { - text = ""; - exec = confirm_command { - cmd = logout; - title = "Logout"; - text = "Do you want to logout?"; - }; - } - { - text = ""; - exec = confirm_command { - cmd = "${systemctl} reboot"; - title = "Reboot"; - text = "Do you want to reboot?"; - }; - } - { - text = ""; - exec = confirm_command { - cmd = "${systemctl} hibernate"; - title = "Hibernate"; - text = "Do you want to hibernate?"; - }; - } - { - text = ""; - exec = confirm_command { - cmd = "${shutdown} now"; - title = "Shutdown"; - text = "Do you want to shutdown?"; - }; - } - ] - ]; + menu = [[ + { + text = ""; + exec = confirm_command { + cmd = logout; + title = "Logout"; + text = "Do you want to logout?"; + }; + } + { + text = ""; + exec = confirm_command { + cmd = "${systemctl} reboot"; + title = "Reboot"; + text = "Do you want to reboot?"; + }; + } + { + text = ""; + exec = confirm_command { + cmd = "${systemctl} hibernate"; + title = "Hibernate"; + text = "Do you want to hibernate?"; + }; + } + { + text = ""; + exec = confirm_command { + cmd = "${shutdown} now"; + title = "Shutdown"; + text = "Do you want to shutdown?"; + }; + } + ]]; }; "module/notifications" = { diff --git a/hm_modules/pro_audio.nix b/hm_modules/pro_audio.nix index 9a00c84..c1e0b5d 100644 --- a/hm_modules/pro_audio.nix +++ b/hm_modules/pro_audio.nix @@ -13,8 +13,7 @@ let VST_PATH = "$HOME/.vst:${userLibFolder}/vst:${systemLibFolder}/vst"; VST3_PATH = "$HOME/.vst3:${userLibFolder}/vst3:${systemLibFolder}/vst3"; }; -in -{ +in { home.packages = with pkgs; [ carla rnnoise diff --git a/hm_modules/rofi.nix b/hm_modules/rofi.nix index 33a219b..258d368 100644 --- a/hm_modules/rofi.nix +++ b/hm_modules/rofi.nix @@ -10,10 +10,10 @@ programs.rofi = { enable = true; location = "center"; - font = "${pkgs.rice.font.monospace.name} ${toString pkgs.rice.font.monospace.size}"; - plugins = with pkgs; [ - rofi-calc - ]; + font = "${pkgs.rice.font.monospace.name} ${ + toString pkgs.rice.font.monospace.size + }"; + plugins = with pkgs; [ rofi-calc ]; extraConfig = { modi = "drun,run,ssh,window,calc"; }; terminal = "kitty"; theme = "onedark"; diff --git a/hm_modules/sxhkd.nix b/hm_modules/sxhkd.nix index 330548b..ef0f79f 100644 --- a/hm_modules/sxhkd.nix +++ b/hm_modules/sxhkd.nix @@ -11,82 +11,93 @@ bc # required by bsp-layout clipedit ]; - services.sxhkd = - let - primaryTerminal = "kitty"; - secondaryTerminal = "terminator"; - fileManager = "thunar"; - emojiChooser = "rofimoji --skin-tone light -a copy"; - yad = "${pkgs.yad}/bin/yad"; - notify = "${pkgs.libnotify}/bin/notify-send"; - pamixer = "${pkgs.pamixer}/bin/pamixer"; - playerctl = "${pkgs.playerctl}/bin/playerctl"; - xbacklight = "${pkgs.xorg.xbacklight}/bin/xbacklight"; - resetBspwm = pkgs.writeShellScript "resetBspwm" '' - bspc wm -r - systemctl --user restart polybar # Restart polybar + services.sxhkd = let + primaryTerminal = "kitty"; + secondaryTerminal = "terminator"; + fileManager = "thunar"; + emojiChooser = "rofimoji --skin-tone light -a copy"; + yad = "${pkgs.yad}/bin/yad"; + notify = "${pkgs.libnotify}/bin/notify-send"; + pamixer = "${pkgs.pamixer}/bin/pamixer"; + playerctl = "${pkgs.playerctl}/bin/playerctl"; + xbacklight = "${pkgs.xorg.xbacklight}/bin/xbacklight"; + resetBspwm = pkgs.writeShellScript "resetBspwm" '' + bspc wm -r + systemctl --user restart polybar # Restart polybar + ''; + moveAllNodesToPrimary = pkgs.writeShellScript "moveAllNodesToPrimary" '' + 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" '' + volume=`${pamixer} --get-volume` + ${notify} -r 1 -h "int:value:$volume" "Volume $volume%" + ''; + notifyBrightness = pkgs.writeShellScript "notifyBrightness" '' + level=`printf "%.0f" $(${xbacklight} -get)` + ${notify} -r 2 -h "int:value:$level" "Luminosità $level" + ''; + in { + enable = true; + keybindings = { + "alt + Tab" = "rofi -show window"; + "Print" = "gnome-screenshot"; + "super + alt + {h,j,k,l}" = + "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}"; + "super + alt + m" = "lockscreen"; + "super + alt + p" = "autorandr -c"; + "super + alt + shift + p" = "arandr"; + "super + alt + q" = '' + ${yad} --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom --image=gnome-shutdown --title "Shutdown" --text "Do you want to shutdown?" && bspc quit ''; - moveAllNodesToPrimary = pkgs.writeShellScript "moveAllNodesToPrimary" '' - comm -23 <(bspc query -N | sort) <(bspc query -m primary -N | sort) | while read n; do bspc node $n -m primary; done + "super + alt + o" = "${moveAllNodesToPrimary}"; + "super + alt + r" = "${resetBspwm}"; + "super + alt + shift + {h,j,k,l}" = + "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}"; + "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local"; + "super + b" = "${pkgs.update-background}/bin/update-background"; + "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; + "super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}"; + "super + ctrl + {m,x,y,z}" = + "bspc node -g {marked,locked,sticky,private}"; + "super + ctrl + shift + space" = + "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; + "super + ctrl + space" = "bspc node -p cancel"; + "super + e" = fileManager; + "super + shift + p" = "clipedit"; + "super + Escape" = "pkill -USR1 -x sxhkd"; + "super + g" = "bspc node -s biggest"; + "super + {grave,Tab}" = "bspc {node,desktop} -f last"; + "super + {h,j,k,l}" = + "dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir"; + "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; + "super + m" = "bspc desktop -l next"; + "super + n {_, + shift}" = "bsp-layout {next, previous}"; + "super + {o,i}" = + "bspc wm -h off;bspc node {older,newer} -f;bspc wm -h on"; + "super + {p,b,comma,period}" = + "bspc node -f @{parent,brother,first,second}"; + "super + {_,shift + }{1-9,0}" = + "bspc {desktop -f,node -d} 'focused:^{1-9,10}'"; + "super + {_,shift + } c" = "bspc node -f {next,prev}.local"; + "super + {_,shift + } @space" = "rofi -show {drun,run}"; + "super + shift + ctrl + d" = "rofi -show ssh"; + "super + shift + e" = emojiChooser; + "super + shift + {h,j,k,l}" = '' + dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow ''; - notifyVolume = pkgs.writeShellScript "notifyVolume" '' - volume=`${pamixer} --get-volume` - ${notify} -r 1 -h "int:value:$volume" "Volume $volume%" - ''; - notifyBrightness = pkgs.writeShellScript "notifyBrightness" '' - level=`printf "%.0f" $(${xbacklight} -get)` - ${notify} -r 2 -h "int:value:$level" "Luminosità $level" - ''; - in - { - enable = true; - keybindings = { - "alt + Tab" = "rofi -show window"; - "Print" = "gnome-screenshot"; - "super + alt + {h,j,k,l}" = "bspc node -z {left -20 0,bottom 0 20,top 0 -20,right 20 0}"; - "super + alt + m" = "lockscreen"; - "super + alt + p" = "autorandr -c"; - "super + alt + shift + p" = "arandr"; - "super + alt + q" = '' - ${yad} --question --center --on-top --sticky --timeout=30 --timeout-indicator=bottom --image=gnome-shutdown --title "Shutdown" --text "Do you want to shutdown?" && bspc quit - ''; - "super + alt + o" = "${moveAllNodesToPrimary}"; - "super + alt + r" = "${resetBspwm}"; - "super + alt + shift + {h,j,k,l}" = "bspc node -z {right -20 0,top 0 20,bottom 0 -20,left 20 0}"; - "super + bracket{left,right}" = "bspc desktop -f {prev,next}.local"; - "super + b" = "${pkgs.update-background}/bin/update-background"; - "super + ctrl + {1-9}" = "bspc node -o 0.{1-9}"; - "super + ctrl + {h,j,k,l}" = "bspc node -p {west,south,north,east}"; - "super + ctrl + {m,x,y,z}" = "bspc node -g {marked,locked,sticky,private}"; - "super + ctrl + shift + space" = "bspc query -N -d | xargs -I id -n 1 bspc node id -p cancel"; - "super + ctrl + space" = "bspc node -p cancel"; - "super + e" = fileManager; - "super + shift + p" = "clipedit"; - "super + Escape" = "pkill -USR1 -x sxhkd"; - "super + g" = "bspc node -s biggest"; - "super + {grave,Tab}" = "bspc {node,desktop} -f last"; - "super + {h,j,k,l}" = "dir={west,south,north,east}; bspc node -f $dir || bspc monitor -f $dir"; - "super + {Left,Down,Up,Right}" = "bspc node -v {-20 0,0 20,0 -20,20 0}"; - "super + m" = "bspc desktop -l next"; - "super + n {_, + shift}" = "bsp-layout {next, previous}"; - "super + {o,i}" = "bspc wm -h off;bspc node {older,newer} -f;bspc wm -h on"; - "super + {p,b,comma,period}" = "bspc node -f @{parent,brother,first,second}"; - "super + {_,shift + }{1-9,0}" = "bspc {desktop -f,node -d} 'focused:^{1-9,10}'"; - "super + {_,shift + } c" = "bspc node -f {next,prev}.local"; - "super + {_,shift + } @space" = "rofi -show {drun,run}"; - "super + shift + ctrl + d" = "rofi -show ssh"; - "super + shift + e" = emojiChooser; - "super + shift + {h,j,k,l}" = '' - dir={west,south,north,east}; bspc node -s "$dir.local" --follow || bspc node -m "$dir" --follow - ''; - "super + {_,shift + } Return" = "{${primaryTerminal} , ${secondaryTerminal}}"; - "super + {_,shift + } w" = "bspc node -{c,k}"; - "super + {t,shift + t,s,f}" = "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; - # "super + y" = "bspc node newest.marked.local -n newest.!automatic.local"; - "XF86Audio{LowerVolume,Mute,RaiseVolume}" = "${pamixer} {-d 2 -u,-t,-i 2 -u} && ${notifyVolume}"; - "XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}"; - "super + alt + {Right,Down,Left}" = "${playerctl} {next,play-pause,previous}"; - "XF86MonBrightness{Up,Down}" = " ${xbacklight} -{inc,dec} 10 && ${notifyBrightness}"; - }; + "super + {_,shift + } Return" = + "{${primaryTerminal} , ${secondaryTerminal}}"; + "super + {_,shift + } w" = "bspc node -{c,k}"; + "super + {t,shift + t,s,f}" = + "bspc node -t {tiled,pseudo_tiled,floating,fullscreen}"; + # "super + y" = "bspc node newest.marked.local -n newest.!automatic.local"; + "XF86Audio{LowerVolume,Mute,RaiseVolume}" = + "${pamixer} {-d 2 -u,-t,-i 2 -u} && ${notifyVolume}"; + "XF86Audio{Next,Play,Prev}" = "${playerctl} {next,play-pause,previous}"; + "super + alt + {Right,Down,Left}" = + "${playerctl} {next,play-pause,previous}"; + "XF86MonBrightness{Up,Down}" = + " ${xbacklight} -{inc,dec} 10 && ${notifyBrightness}"; }; + }; } diff --git a/hm_modules/syncthing.nix b/hm_modules/syncthing.nix index 18fe288..ea9d795 100644 --- a/hm_modules/syncthing.nix +++ b/hm_modules/syncthing.nix @@ -1 +1,6 @@ -{ services.syncthing = { enable = true; extraOptions = [ "--gui-address=http://0.0.0.0:8384" ]; }; } +{ + services.syncthing = { + enable = true; + extraOptions = [ "--gui-address=http://0.0.0.0:8384" ]; + }; +} diff --git a/hm_modules/syncthing_tiziano.nix b/hm_modules/syncthing_tiziano.nix index e6317e5..9280023 100644 --- a/hm_modules/syncthing_tiziano.nix +++ b/hm_modules/syncthing_tiziano.nix @@ -1,2 +1,7 @@ -{ services.syncthing = { enable = true; extraOptions = [ "--gui-address=http://0.0.0.0:8385" ]; }; } +{ + services.syncthing = { + enable = true; + extraOptions = [ "--gui-address=http://0.0.0.0:8385" ]; + }; +} diff --git a/hm_modules/terminator.nix b/hm_modules/terminator.nix index f89a165..1d1a413 100644 --- a/hm_modules/terminator.nix +++ b/hm_modules/terminator.nix @@ -26,8 +26,7 @@ let bright.cyan bright.white ]; -in -{ +in { home.packages = with pkgs; [ terminator ]; xdg.configFile."terminator/config".text = with strPalette; '' diff --git a/hm_modules/twmn.nix b/hm_modules/twmn.nix index c2ecffb..ca29b27 100644 --- a/hm_modules/twmn.nix +++ b/hm_modules/twmn.nix @@ -3,20 +3,25 @@ with pkgs.lib.nix-rice; let strPalette = palette.toRGBHex pkgs.rice.colorPalette; font = pkgs.rice.font.normal; -in -{ +in { services.twmn = { enable = true; text = { color = strPalette.primary.foreground; - font = { inherit (font) package size; family = font.name; }; + font = { + inherit (font) package size; + family = font.name; + }; }; window = { animation.bounce.enable = false; color = strPalette.primary.background; height = 32; opacity = float.round (pkgs.rice.opacity * 100); - offset = { x = -20; y = 50; }; + offset = { + x = -20; + y = 50; + }; }; }; } diff --git a/hm_modules/webapp.nix b/hm_modules/webapp.nix index d59f4fa..ee3e19e 100644 --- a/hm_modules/webapp.nix +++ b/hm_modules/webapp.nix @@ -63,17 +63,11 @@ let categories = [ "AudioVideo" ]; } ]; - webAppBuilder = - { desktopName - , name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName - , link - , icon ? lib.toLower name - , comment ? null - , categories ? [ "Network" ] - }: + webAppBuilder = { desktopName + , name ? builtins.replaceStrings [ " " ] [ "_" ] desktopName, link + , icon ? lib.toLower name, comment ? null, categories ? [ "Network" ] }: pkgs.makeDesktopItem { inherit name icon desktopName comment categories; exec = cmd link; }; -in -{ home.packages = map webAppBuilder links; } +in { home.packages = map webAppBuilder links; } diff --git a/hm_modules/xidlehook.nix b/hm_modules/xidlehook.nix index 8105c9d..674657b 100644 --- a/hm_modules/xidlehook.nix +++ b/hm_modules/xidlehook.nix @@ -19,8 +19,7 @@ let shutDownScreens = pkgs.writeShellScript "shutdown_screens" '' ${xsetCmd} dpms force off ''; -in -{ +in { services.xidlehook = { enable = true; package = pkgs.writeScriptBin "xidlehook" '' diff --git a/hm_modules/zathura.nix b/hm_modules/zathura.nix index 63a433d..b87d06c 100644 --- a/hm_modules/zathura.nix +++ b/hm_modules/zathura.nix @@ -4,9 +4,7 @@ let strPalette = palette.toRgbHex pkgs.rice.colorPalette; in { programs.zathura = { enable = true; - mappings = { - "" = "recolor"; - }; + mappings = { "" = "recolor"; }; options = { completion-bg = strPalette.bright.black; # default-bg = strPalette.normal.black; diff --git a/loki/configuration.nix b/loki/configuration.nix index 5d086f0..125e872 100644 --- a/loki/configuration.nix +++ b/loki/configuration.nix @@ -96,11 +96,23 @@ with lib; { }; gnome.gnome-keyring.enable = true; gvfs.enable = true; - jackett = { enable = true; openFirewall = true; group = "users"; }; - jellyfin = { enable = true; package = pkgs.jellyfin; openFirewall = true; group = "users"; }; + jackett = { + enable = true; + openFirewall = true; + group = "users"; + }; + jellyfin = { + enable = true; + package = pkgs.jellyfin; + 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; radarr = { @@ -122,42 +134,40 @@ with lib; { load printers = no smb encrypt = required ''; - shares = - let - common = { - "public" = "no"; - "writeable" = "yes"; - "create mask" = "0700"; - "directory mask" = "2700"; - "browseable" = "yes"; - "guest ok" = "no"; - "read only" = "no"; - "force group" = "users"; - }; - in - { - bertof = recursiveUpdate common { - path = "/home/bertof/"; - comment = "Bertof samba share"; - "force user" = "bertof"; - "valid users" = "bertof"; - }; - tiziano = recursiveUpdate common { - path = "/home/tiziano/"; - comment = "Tiziano samba share"; - "force user" = "tiziano"; - "valid users" = "tiziano"; - }; - condiviso = recursiveUpdate common { - path = "/mnt/raid0/condiviso"; - comment = "Samba share condiviso"; - "valid users" = "bertof tiziano"; - "create mask" = "0770"; - "directory mask" = "2770"; - "force create mode" = "0660"; - "force directory mode" = "2770"; - }; + shares = let + common = { + "public" = "no"; + "writeable" = "yes"; + "create mask" = "0700"; + "directory mask" = "2700"; + "browseable" = "yes"; + "guest ok" = "no"; + "read only" = "no"; + "force group" = "users"; }; + in { + bertof = recursiveUpdate common { + path = "/home/bertof/"; + comment = "Bertof samba share"; + "force user" = "bertof"; + "valid users" = "bertof"; + }; + tiziano = recursiveUpdate common { + path = "/home/tiziano/"; + comment = "Tiziano samba share"; + "force user" = "tiziano"; + "valid users" = "tiziano"; + }; + condiviso = recursiveUpdate common { + path = "/mnt/raid0/condiviso"; + comment = "Samba share condiviso"; + "valid users" = "bertof tiziano"; + "create mask" = "0770"; + "directory mask" = "2770"; + "force create mode" = "0660"; + "force directory mode" = "2770"; + }; + }; }; smartd = { enable = true; @@ -224,11 +234,7 @@ with lib; { }; tiziano = { isNormalUser = true; - extraGroups = [ - "audio" - "input" - "video" - ]; + extraGroups = [ "audio" "input" "video" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMExwtJFk6HjySrTZwJH67SOHC3hlL28NO4oe2GXsv6k" ]; @@ -238,57 +244,55 @@ with lib; { }; services.snapper = { - configs = - let - commonExtraConfig = '' - TIMELINE_CREATE=yes - TIMELINE_CLEANUP=yes + configs = let + commonExtraConfig = '' + TIMELINE_CREATE=yes + TIMELINE_CLEANUP=yes + ''; + in { + bertof_raid0 = { + subvolume = "/home/bertof/raid0"; + extraConfig = '' + ALLOW_USERS="bertof" + ${commonExtraConfig} ''; - in - { - bertof_raid0 = { - subvolume = "/home/bertof/raid0"; - extraConfig = '' - ALLOW_USERS="bertof" - ${commonExtraConfig} - ''; - }; - tiziano_raid0 = { - subvolume = "/home/tiziano/raid0"; - extraConfig = '' - ALLOW_USERS="tiziano" - ${commonExtraConfig} - ''; - }; - bertof_raid1 = { - subvolume = "/home/bertof/raid1"; - extraConfig = '' - ALLOW_USERS="bertof" - ${commonExtraConfig} - ''; - }; - tiziano_raid1 = { - subvolume = "/home/tiziano/raid1"; - extraConfig = '' - ALLOW_USERS="tiziano" - ${commonExtraConfig} - ''; - }; - condiviso_raid0 = { - subvolume = "/mnt/raid0/condiviso"; - extraConfig = '' - ALLOW_USERS="bertof tiziano" - ${commonExtraConfig} - ''; - }; - condiviso_raid1 = { - subvolume = "/mnt/raid1/condiviso"; - extraConfig = '' - ALLOW_USERS="bertof tiziano" - ${commonExtraConfig} - ''; - }; }; + tiziano_raid0 = { + subvolume = "/home/tiziano/raid0"; + extraConfig = '' + ALLOW_USERS="tiziano" + ${commonExtraConfig} + ''; + }; + bertof_raid1 = { + subvolume = "/home/bertof/raid1"; + extraConfig = '' + ALLOW_USERS="bertof" + ${commonExtraConfig} + ''; + }; + tiziano_raid1 = { + subvolume = "/home/tiziano/raid1"; + extraConfig = '' + ALLOW_USERS="tiziano" + ${commonExtraConfig} + ''; + }; + condiviso_raid0 = { + subvolume = "/mnt/raid0/condiviso"; + extraConfig = '' + ALLOW_USERS="bertof tiziano" + ${commonExtraConfig} + ''; + }; + condiviso_raid1 = { + subvolume = "/mnt/raid1/condiviso"; + extraConfig = '' + ALLOW_USERS="bertof tiziano" + ${commonExtraConfig} + ''; + }; + }; }; networking.firewall = { @@ -358,9 +362,7 @@ with lib; { }]; esphome = { }; frontend = { }; - google_assistant = { - project_id = "light-cathode-372118"; - }; + google_assistant = { project_id = "light-cathode-372118"; }; history = { }; logbook = { }; # logger.default = "debug"; @@ -380,7 +382,6 @@ with lib; { extraComponents = [ "default_config" - "accuweather" "alert" "analytics" diff --git a/loki/hardware-configuration.nix b/loki/hardware-configuration.nix index 75a69f1..04a6265 100644 --- a/loki/hardware-configuration.nix +++ b/loki/hardware-configuration.nix @@ -1,9 +1,7 @@ { config, lib, modulesPath, ... }: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" @@ -107,5 +105,6 @@ # networking.interfaces.ztmjfdwjkp.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nixos_modules/big_data.nix b/nixos_modules/big_data.nix index 86c18b4..7e3ca5f 100644 --- a/nixos_modules/big_data.nix +++ b/nixos_modules/big_data.nix @@ -77,8 +77,7 @@ let STOP ''; }; -in -{ +in { networking = { hosts = { "127.0.0.1" = [ "ds.my.engine" "kdc.my.engine" "my.engine" ]; }; diff --git a/nixos_modules/digitalocean.nix b/nixos_modules/digitalocean.nix index a47c791..d626c0c 100644 --- a/nixos_modules/digitalocean.nix +++ b/nixos_modules/digitalocean.nix @@ -1,3 +1 @@ -{ - services.do-agent.enable = true; -} +{ services.do-agent.enable = true; } diff --git a/nixos_modules/dnsmasq.nix b/nixos_modules/dnsmasq.nix index 1a025d7..df07b16 100644 --- a/nixos_modules/dnsmasq.nix +++ b/nixos_modules/dnsmasq.nix @@ -4,8 +4,7 @@ let url = "https://github.com/notracking/hosts-blocklists/raw/master/dnsmasq/dnsmasq.blacklist.txt"; }; -in -{ +in { networking.firewall.allowedTCPPorts = [ 53 ]; networking.firewall.allowedUDPPorts = [ 53 ]; diff --git a/nixos_modules/extended_registry.nix b/nixos_modules/extended_registry.nix index 973e1f6..1f231a2 100644 --- a/nixos_modules/extended_registry.nix +++ b/nixos_modules/extended_registry.nix @@ -1,16 +1,37 @@ { nix.registry = { agenix = { - from = { id = "agenix"; type = "indirect"; }; - to = { type = "github"; owner = "ryantm"; repo = "agenix"; }; + from = { + id = "agenix"; + type = "indirect"; + }; + to = { + type = "github"; + owner = "ryantm"; + repo = "agenix"; + }; }; my-templates = { - from = { id = "my-templates"; type = "indirect"; }; - to = { type = "github"; owner = "bertof"; repo = "flake-templates"; }; + from = { + id = "my-templates"; + type = "indirect"; + }; + to = { + type = "github"; + owner = "bertof"; + repo = "flake-templates"; + }; }; tex2nix = { - from = { id = "tex2nix"; type = "indirect"; }; - to = { type = "github"; owner = "Mic92"; repo = "tex2nix"; }; + from = { + id = "tex2nix"; + type = "indirect"; + }; + to = { + type = "github"; + owner = "Mic92"; + repo = "tex2nix"; + }; }; }; } diff --git a/nixos_modules/nix-serve.nix b/nixos_modules/nix-serve.nix index e936aef..739354c 100644 --- a/nixos_modules/nix-serve.nix +++ b/nixos_modules/nix-serve.nix @@ -1,11 +1,10 @@ { config, lib, ... }: let - user_keys = user: lib.optionals - (builtins.hasAttr "bertof" config.users.users) + user_keys = user: + lib.optionals (builtins.hasAttr "bertof" config.users.users) config.users.users.${user}.openssh.authorizedKeys.keys; -in -{ +in { # nix.buildMachines nix.distributedBuilds = true; diff --git a/odin/common_configuration.nix b/odin/common_configuration.nix index 87d2823..9aa5f1c 100644 --- a/odin/common_configuration.nix +++ b/odin/common_configuration.nix @@ -67,10 +67,10 @@ with lib; { # }; windowManager.bspwm.enable = true; - # Configure keymap in X11 layout = "it,us"; - xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; + xkbOptions = + "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; libinput.enable = true; }; @@ -158,41 +158,42 @@ with lib; { services.onedrive.enable = true; # Enable the OpenSSH daemon. - services.openssh = { enable = true; openFirewall = true; }; + services.openssh = { + enable = true; + openFirewall = true; + }; # Cooling management services.thermald.enable = true; services.snapper = { - configs = - let - bertofExtraConfig = '' - ALLOW_USERS="bertof" - TIMELINE_CREATE=yes - TIMELINE_CLEANUP=yes - ''; - common = { extraConfig = bertofExtraConfig; }; - in - { - bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; - bertof_music = - recursiveUpdate common { subvolume = "/home/bertof/Musica"; }; - bertof_downloads = - recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; }; - bertof_images = - recursiveUpdate common { subvolume = "/home/bertof/Immagini"; }; - bertof_videos = - recursiveUpdate common { subvolume = "/home/bertof/Video"; }; - bertof_documents = - recursiveUpdate common { subvolume = "/home/bertof/Documenti"; }; - bertof_games_ssd = - recursiveUpdate common { subvolume = "/home/bertof/Giochi/SSD"; }; - bertof_games_sata = - recursiveUpdate common { subvolume = "/home/bertof/Giochi/SATA"; }; - # bertof_games_hdd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/HDD"; }; - bertof_git = - recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; }; - }; + configs = let + bertofExtraConfig = '' + ALLOW_USERS="bertof" + TIMELINE_CREATE=yes + TIMELINE_CLEANUP=yes + ''; + common = { extraConfig = bertofExtraConfig; }; + in { + bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; + bertof_music = + recursiveUpdate common { subvolume = "/home/bertof/Musica"; }; + bertof_downloads = + recursiveUpdate common { subvolume = "/home/bertof/Scaricati"; }; + bertof_images = + recursiveUpdate common { subvolume = "/home/bertof/Immagini"; }; + bertof_videos = + recursiveUpdate common { subvolume = "/home/bertof/Video"; }; + bertof_documents = + recursiveUpdate common { subvolume = "/home/bertof/Documenti"; }; + bertof_games_ssd = + recursiveUpdate common { subvolume = "/home/bertof/Giochi/SSD"; }; + bertof_games_sata = + recursiveUpdate common { subvolume = "/home/bertof/Giochi/SATA"; }; + # bertof_games_hdd = recursiveUpdate common { subvolume = "/home/bertof/Giochi/HDD"; }; + bertof_git = + recursiveUpdate common { subvolume = "/home/bertof/Documenti/Git"; }; + }; }; services.dbus = { diff --git a/odin/configuration-intel.nix b/odin/configuration-intel.nix index 300fa5f..a2f65f8 100644 --- a/odin/configuration-intel.nix +++ b/odin/configuration-intel.nix @@ -20,7 +20,8 @@ displayManager.sddm = { enable = true; autoNumlock = true; - theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; + theme = + "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; }; }; diff --git a/odin/configuration-nvidia.nix b/odin/configuration-nvidia.nix index 1ff3946..9a5fddd 100644 --- a/odin/configuration-nvidia.nix +++ b/odin/configuration-nvidia.nix @@ -34,7 +34,8 @@ displayManager.sddm = { enable = true; autoNumlock = true; - theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; + theme = + "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; }; }; } diff --git a/odin/hardware-configuration.nix b/odin/hardware-configuration.nix index 6db6dc5..b2e952b 100644 --- a/odin/hardware-configuration.nix +++ b/odin/hardware-configuration.nix @@ -4,111 +4,97 @@ { config, lib, modulesPath, ... }: { - imports = - [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@root" "x-gvfs-hide" ]; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@root" "x-gvfs-hide" ]; + }; - fileSystems."/nix" = - { - device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@nix" "x-gvfs-hide" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@nix" "x-gvfs-hide" ]; + }; - fileSystems."/home/bertof" = - { - device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@home" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof" = { + device = "/dev/disk/by-uuid/c6e3d4df-4861-48a5-8107-d6fd1addad8c"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@home" "x-gvfs-hide" ]; + }; - fileSystems."/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" ]; - }; + fileSystems."/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" ]; + }; - fileSystems."/home/bertof/Video" = - { - device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@videos" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof/Video" = { + device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@videos" "x-gvfs-hide" ]; + }; - fileSystems."/home/bertof/Giochi/SATA" = - { - device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof/Giochi/SATA" = { + device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@games" "x-gvfs-hide" ]; + }; - fileSystems."/home/bertof/Musica" = - { - device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@music" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof/Musica" = { + device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@music" "x-gvfs-hide" ]; + }; - fileSystems."/home/bertof/Immagini" = - { - device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@images" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof/Immagini" = { + device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@images" "x-gvfs-hide" ]; + }; - fileSystems."/home/bertof/Scaricati" = - { - device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@downloads" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof/Scaricati" = { + device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@downloads" "x-gvfs-hide" ]; + }; - fileSystems."/home/bertof/Documenti" = - { - device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; - fsType = "btrfs"; - options = [ "space_cache=v2" "subvol=@bertof/@documents" "x-gvfs-hide" ]; - }; + fileSystems."/home/bertof/Documenti" = { + device = "/dev/disk/by-uuid/c2635d50-7f08-4aca-bcdd-0ac685047a64"; + fsType = "btrfs"; + options = [ "space_cache=v2" "subvol=@bertof/@documents" "x-gvfs-hide" ]; + }; - fileSystems."/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" ]; - }; + fileSystems."/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" ]; + }; - fileSystems."/boot" = - { - device = "/dev/disk/by-uuid/82DB-3444"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/82DB-3444"; + fsType = "vfat"; + }; - fileSystems."/var/lib/docker/btrfs" = - { - device = "/home/bertof/Documenti/Git/@root/var/lib/docker/btrfs"; - fsType = "none"; - options = [ "bind" "x-gvfs-hide" ]; - }; + fileSystems."/var/lib/docker/btrfs" = { + device = "/home/bertof/Documenti/Git/@root/var/lib/docker/btrfs"; + fsType = "none"; + options = [ "bind" "x-gvfs-hide" ]; + }; - swapDevices = - [ - { device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; } - { device = "/swapfile"; size = 1024 * 32; } - ]; + swapDevices = [ + { device = "/dev/disk/by-uuid/5f3cf424-2bd8-4352-a778-1bb067cb5700"; } + { + device = "/swapfile"; + size = 1024 * 32; + } + ]; # 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 @@ -124,5 +110,6 @@ 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/secrets/secrets.nix b/secrets/secrets.nix index 0330bca..229b2f8 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,17 +1,24 @@ let - bertof_baldur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbG791lSOl8Rqoy+KkdKiOJnOMRg02+HZ/VrlrWMYAX"; - bertof_odin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhxOjo9Ac9hVd3eOR56F6sClUMUh1m7VpcmzA18dslj"; - bertof_thor = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG"; - bertof_loki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPbbgBCzRsIO6giIVCgTUMgBCrexgvHmq8pis5A4ievH"; + bertof_baldur = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKbG791lSOl8Rqoy+KkdKiOJnOMRg02+HZ/VrlrWMYAX"; + bertof_odin = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAhxOjo9Ac9hVd3eOR56F6sClUMUh1m7VpcmzA18dslj"; + bertof_thor = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO7mcf8fbMo1eXqSJeVFWaweB+JOU+67dFuf8laZKZZG"; + bertof_loki = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPbbgBCzRsIO6giIVCgTUMgBCrexgvHmq8pis5A4ievH"; users = [ bertof_odin bertof_thor bertof_loki bertof_baldur ]; - baldur = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF9G8I75gOfB1QJhZU9z+UaYovWq05OfK2FVKtCb8Xxh"; - odin = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP8bfOYmFN+KRjnAOdt9IazGeaRKm5tvGyblHD7MUhtr"; - thor = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbMiGx/QZ/RKgad3UNyEzgLfqRU0zBo8n0AU3s244Zw"; - loki = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICeomEH/27XFlOjQ/GTO2mo8qPMHTbzLIsX0dloxXfhb"; + baldur = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIF9G8I75gOfB1QJhZU9z+UaYovWq05OfK2FVKtCb8Xxh"; + odin = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIP8bfOYmFN+KRjnAOdt9IazGeaRKm5tvGyblHD7MUhtr"; + thor = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJbMiGx/QZ/RKgad3UNyEzgLfqRU0zBo8n0AU3s244Zw"; + loki = + "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICeomEH/27XFlOjQ/GTO2mo8qPMHTbzLIsX0dloxXfhb"; systems = [ odin thor baldur loki ]; -in -{ +in { # "oauth_proxy_client_credentials.age".publicKeys = users ++ systems; "spotify_password.age".publicKeys = users ++ systems; } diff --git a/thor/configuration.nix b/thor/configuration.nix index 000b109..09359f5 100644 --- a/thor/configuration.nix +++ b/thor/configuration.nix @@ -126,19 +126,17 @@ with lib; { notifications.x11.enable = true; }; snapper = { - configs = - let - common = { - extraConfig = '' - ALLOW_USERS="bertof" - TIMELINE_CREATE=yes - TIMELINE_CLEANUP=yes - ''; - }; - in - { - bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; + configs = let + common = { + extraConfig = '' + ALLOW_USERS="bertof" + TIMELINE_CREATE=yes + TIMELINE_CLEANUP=yes + ''; }; + in { + bertof_home = recursiveUpdate common { subvolume = "/home/bertof"; }; + }; }; thermald.enable = true; xserver = { @@ -158,7 +156,8 @@ with lib; { videoDrivers = [ "nvidia" ]; layout = "us,it"; - xkbOptions = "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; + xkbOptions = + "eurosign:e,terminate:ctrl_alt_bksp,compose:rctrl,grp:menu_toggle"; xrandrHeads = [{ primary = true; output = "DP-4"; diff --git a/thor/hardware-configuration.nix b/thor/hardware-configuration.nix index df7ede4..49296e1 100644 --- a/thor/hardware-configuration.nix +++ b/thor/hardware-configuration.nix @@ -55,7 +55,10 @@ swapDevices = [ { device = "/dev/disk/by-uuid/dee188e4-4ff8-417c-9419-b7f00ecb9989"; } - { device = "/swapfile"; size = 1024 * 32; } + { + device = "/swapfile"; + size = 1024 * 32; + } ]; }