diff --git a/common/global/default.nix b/common/global/default.nix index 67f0009..d7ffcdc 100644 --- a/common/global/default.nix +++ b/common/global/default.nix @@ -31,7 +31,7 @@ home-manager = { useGlobalPkgs = true; useUserPackages = true; - extraSpecialArgs = {inherit inputs outputs;}; + extraSpecialArgs = { inherit inputs outputs; }; backupFileExtension = "backup"; }; diff --git a/common/global/nix.nix b/common/global/nix.nix index b28379e..77780ee 100644 --- a/common/global/nix.nix +++ b/common/global/nix.nix @@ -2,9 +2,11 @@ inputs, lib, ... -}: let +}: +let flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs; -in { +in +{ nix = { settings = { trusted-users = [ @@ -37,7 +39,7 @@ in { }; # Add each flake input as a registry and nix_path - registry = lib.mapAttrs (_: flake: {inherit flake;}) flakeInputs; + registry = lib.mapAttrs (_: flake: { inherit flake; }) flakeInputs; nixPath = lib.mapAttrsToList (n: _: "${n}=flake:${n}") flakeInputs; }; } diff --git a/common/global/snapshot_manager.nix b/common/global/snapshot_manager.nix index 553e4c5..ba04243 100644 --- a/common/global/snapshot_manager.nix +++ b/common/global/snapshot_manager.nix @@ -1,4 +1,10 @@ -{ inputs, pkgs, lib, config, ... }: +{ + inputs, + pkgs, + lib, + config, + ... +}: let cfg = config.services.snapshot_manager; in @@ -41,4 +47,4 @@ in }; }; }; -} \ No newline at end of file +} diff --git a/common/global/ssh.nix b/common/global/ssh.nix index 3b3ae8f..a0fb06e 100644 --- a/common/global/ssh.nix +++ b/common/global/ssh.nix @@ -67,5 +67,5 @@ }; }; - networking.firewall.allowedTCPPorts = [ 22 ]; + networking.firewall.allowedTCPPorts = [ 22 ]; } diff --git a/common/optional/printing.nix b/common/optional/printing.nix index cfd3146..e66b154 100644 --- a/common/optional/printing.nix +++ b/common/optional/printing.nix @@ -2,6 +2,9 @@ { services.printing = { enable = true; - drivers = with pkgs; [ gutenprint hplip ]; + drivers = with pkgs; [ + gutenprint + hplip + ]; }; } diff --git a/common/optional/steam.nix b/common/optional/steam.nix index 9344505..112e4d9 100644 --- a/common/optional/steam.nix +++ b/common/optional/steam.nix @@ -1,6 +1,9 @@ { pkgs, ... }: { - environment.systemPackages = with pkgs; [mangohud steam-run]; + environment.systemPackages = with pkgs; [ + mangohud + steam-run + ]; hardware.steam-hardware.enable = true; programs = { @@ -11,7 +14,7 @@ remotePlay.openFirewall = true; localNetworkGameTransfers.openFirewall = true; protontricks.enable = true; - extraCompatPackages = with pkgs; [proton-ge-bin]; + extraCompatPackages = with pkgs; [ proton-ge-bin ]; extest.enable = true; }; gamescope = { diff --git a/flake.nix b/flake.nix index 2b7e3c8..ef3daee 100644 --- a/flake.nix +++ b/flake.nix @@ -49,51 +49,54 @@ }; }; - outputs = { - self, - nixpkgs, - home-manager, - systems, - nixos-cosmic, - sops-nix, - ... - } @ inputs: let - inherit (self) outputs; - lib = nixpkgs.lib // home-manager.lib; - forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); - pkgsFor = lib.genAttrs (import systems) ( - system: + outputs = + { + self, + nixpkgs, + home-manager, + systems, + nixos-cosmic, + sops-nix, + ... + }@inputs: + let + inherit (self) outputs; + lib = nixpkgs.lib // home-manager.lib; + forEachSystem = f: lib.genAttrs (import systems) (system: f pkgsFor.${system}); + pkgsFor = lib.genAttrs (import systems) ( + system: import nixpkgs { inherit system; config.allowUnfree = true; } - ); - in { - inherit lib; - overlays = import ./overlays {inherit inputs outputs;}; + ); + in + { + inherit lib; + overlays = import ./overlays { inherit inputs outputs; }; - devShells = forEachSystem (pkgs: import ./shell.nix {inherit pkgs;}); - formatter = forEachSystem (pkgs: pkgs.treefmt); + devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; }); + formatter = forEachSystem (pkgs: pkgs.treefmt); - nixosConfigurations = { - bob = lib.nixosSystem { - modules = [ - ./systems/bob - ]; - specialArgs = {inherit inputs outputs;}; - }; - jeeves = lib.nixosSystem { - modules = [ - ./systems/jeeves - ]; - specialArgs = {inherit inputs outputs;}; - }; - rhapsody-in-green = lib.nixosSystem { - modules = [ - ./systems/rhapsody-in-green - ]; - specialArgs = {inherit inputs outputs;}; + nixosConfigurations = { + bob = lib.nixosSystem { + modules = [ + ./systems/bob + ]; + specialArgs = { inherit inputs outputs; }; + }; + jeeves = lib.nixosSystem { + modules = [ + ./systems/jeeves + ]; + specialArgs = { inherit inputs outputs; }; + }; + rhapsody-in-green = lib.nixosSystem { + modules = [ + ./systems/rhapsody-in-green + ]; + specialArgs = { inherit inputs outputs; }; + }; }; }; - }; } diff --git a/overlays/default.nix b/overlays/default.nix index 5a8de2f..943263b 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ # When applied, the stable nixpkgs set (declared in the flake inputs) will be accessible through 'pkgs.stable' stable = final: _prev: { stable = import inputs.nixpkgs-stable { diff --git a/shell.nix b/shell.nix index d9b159e..9f42968 100644 --- a/shell.nix +++ b/shell.nix @@ -1,4 +1,8 @@ -{pkgs ? import {}, ...}: { +{ + pkgs ? import { }, + ... +}: +{ default = pkgs.mkShell { NIX_CONFIG = "extra-experimental-features = nix-command flakes ca-derivations"; nativeBuildInputs = with pkgs; [ diff --git a/systems/bob/hardware.nix b/systems/bob/hardware.nix index 7ce1f73..c278c69 100644 --- a/systems/bob/hardware.nix +++ b/systems/bob/hardware.nix @@ -66,4 +66,4 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; -} \ No newline at end of file +} diff --git a/systems/bob/llms.nix b/systems/bob/llms.nix index 2b2b439..98a52a7 100644 --- a/systems/bob/llms.nix +++ b/systems/bob/llms.nix @@ -2,7 +2,7 @@ services = { ollama = { enable = true; - loadModels = [ + loadModels = [ "codellama:7b" "deepseek-r1:1.5b" "deepseek-r1:7b" @@ -19,6 +19,6 @@ enable = true; openFirewall = true; host = "192.168.90.25"; - }; - }; -} \ No newline at end of file + }; + }; +} diff --git a/systems/bob/syncthing.nix b/systems/bob/syncthing.nix index 2bb85a9..7621b9c 100644 --- a/systems/bob/syncthing.nix +++ b/systems/bob/syncthing.nix @@ -1,4 +1,4 @@ -{ +{ services.syncthing.settings.folders = { "dotfiles" = { path = "/home/richie/dotfiles"; diff --git a/systems/jeeves/docker/qbit.nix b/systems/jeeves/docker/qbit.nix index 935e36e..1cd25f5 100644 --- a/systems/jeeves/docker/qbit.nix +++ b/systems/jeeves/docker/qbit.nix @@ -3,8 +3,15 @@ let in { networking.firewall = { - allowedTCPPorts = [ 6881 8082 29432 ]; - allowedUDPPorts = [ 6881 29432 ]; + allowedTCPPorts = [ + 6881 + 8082 + 29432 + ]; + allowedUDPPorts = [ + 6881 + 29432 + ]; }; virtualisation.oci-containers.containers.qbit = { image = "ghcr.io/linuxserver/qbittorrent:5.0.2"; diff --git a/systems/jeeves/docker/qbitvpn.nix b/systems/jeeves/docker/qbitvpn.nix index 12ca53f..a02c906 100644 --- a/systems/jeeves/docker/qbitvpn.nix +++ b/systems/jeeves/docker/qbitvpn.nix @@ -3,7 +3,11 @@ let in { networking.firewall = { - allowedTCPPorts = [ 6882 8081 8118 ]; + allowedTCPPorts = [ + 6882 + 8081 + 8118 + ]; allowedUDPPorts = [ 6882 ]; }; virtualisation.oci-containers.containers.qbitvpn = { @@ -36,7 +40,7 @@ in DELUGE_DAEMON_LOG_LEVEL = "debug"; DELUGE_WEB_LOG_LEVEL = "debug"; }; - environmentFiles = ["${vars.storage_secrets}/docker/qbitvpn"]; + environmentFiles = [ "${vars.storage_secrets}/docker/qbitvpn" ]; autoStart = true; }; } diff --git a/systems/jeeves/hardware.nix b/systems/jeeves/hardware.nix index 2a2fee0..9427d45 100644 --- a/systems/jeeves/hardware.nix +++ b/systems/jeeves/hardware.nix @@ -1,6 +1,11 @@ -{ config, lib, modulesPath, ... }: { - imports =[ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + modulesPath, + ... +}: +{ + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; boot = { loader = { @@ -88,22 +93,32 @@ bypassWorkqueues = true; allowDiscards = true; }; - "luks-storage_pool-wwn-0x5000cca23bc438dd-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bc438dd-part1"; - "luks-storage_pool-wwn-0x5000cca23bd035f5-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd035f5-part1"; - "luks-storage_pool-wwn-0x5000cca23bd00ad6-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd00ad6-part1"; - "luks-storage_pool-wwn-0x5000cca23bcf313e-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bcf313e-part1"; - "luks-storage_pool-wwn-0x5000cca23bcdf3b8-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bcdf3b8-part1"; - "luks-storage_pool-wwn-0x5000cca23bd02746-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd02746-part1"; - "luks-storage_pool-wwn-0x5000cca23bcf9f89-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bcf9f89-part1"; - "luks-storage_pool-wwn-0x5000cca23bd00ae9-part1".device = "/dev/disk/by-id/wwn-0x5000cca23bd00ae9-part1"; + "luks-storage_pool-wwn-0x5000cca23bc438dd-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bc438dd-part1"; + "luks-storage_pool-wwn-0x5000cca23bd035f5-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bd035f5-part1"; + "luks-storage_pool-wwn-0x5000cca23bd00ad6-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bd00ad6-part1"; + "luks-storage_pool-wwn-0x5000cca23bcf313e-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bcf313e-part1"; + "luks-storage_pool-wwn-0x5000cca23bcdf3b8-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bcdf3b8-part1"; + "luks-storage_pool-wwn-0x5000cca23bd02746-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bd02746-part1"; + "luks-storage_pool-wwn-0x5000cca23bcf9f89-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bcf9f89-part1"; + "luks-storage_pool-wwn-0x5000cca23bd00ae9-part1".device = + "/dev/disk/by-id/wwn-0x5000cca23bd00ae9-part1"; # Torrenting pool "luks-torrenting_pool-wwn-0x500a0751e6c3c01e-part1" = { device = "/dev/disk/by-id/wwn-0x500a0751e6c3c01e-part1"; bypassWorkqueues = true; allowDiscards = true; }; - "luks-torrenting_pool-wwn-0x5000cca264f080a3-part1".device = "/dev/disk/by-id/wwn-0x5000cca264f080a3-part1"; - "luks-torrenting_pool-wwn-0x5000cca298c33ae5-part1".device = "/dev/disk/by-id/wwn-0x5000cca298c33ae5-part1"; + "luks-torrenting_pool-wwn-0x5000cca264f080a3-part1".device = + "/dev/disk/by-id/wwn-0x5000cca264f080a3-part1"; + "luks-torrenting_pool-wwn-0x5000cca298c33ae5-part1".device = + "/dev/disk/by-id/wwn-0x5000cca298c33ae5-part1"; # cspell:enable }; }; @@ -122,8 +137,8 @@ fsType = "zfs"; }; - "/nix" = - { device = "root_pool/nix"; + "/nix" = { + device = "root_pool/nix"; fsType = "zfs"; }; @@ -146,7 +161,7 @@ options = [ "fmask=0077" "dmask=0077" - ]; + ]; }; }; diff --git a/systems/jeeves/networking.nix b/systems/jeeves/networking.nix index ae4ed96..2375cf4 100644 --- a/systems/jeeves/networking.nix +++ b/systems/jeeves/networking.nix @@ -12,7 +12,7 @@ "10-1GB_Primary" = { matchConfig.Name = "enp98s0f0"; address = [ "192.168.95.14/24" ]; - routes = [{ Gateway = "192.168.95.1"; }]; + routes = [ { Gateway = "192.168.95.1"; } ]; linkConfig.RequiredForOnline = "routable"; }; "10-1GB_Secondary" = { diff --git a/systems/jeeves/runners/default.nix b/systems/jeeves/runners/default.nix index 6c5dc30..ebde72c 100644 --- a/systems/jeeves/runners/default.nix +++ b/systems/jeeves/runners/default.nix @@ -14,7 +14,6 @@ }; groups.github-runners.gid = 601; }; - services.nix_builder.containers = { nix-builder-0.enable = true; diff --git a/systems/jeeves/runners/nix_builder.nix b/systems/jeeves/runners/nix_builder.nix index 69cf27b..739b704 100644 --- a/systems/jeeves/runners/nix_builder.nix +++ b/systems/jeeves/runners/nix_builder.nix @@ -7,14 +7,20 @@ let in { options.services.nix_builder.containers = mkOption { - type = types.attrsOf (types.submodule ({ name, ... }: { - options.enable = mkEnableOption "GitHub runner container"; - })); - default = {}; + type = types.attrsOf ( + types.submodule ( + { name, ... }: + { + options.enable = mkEnableOption "GitHub runner container"; + } + ) + ); + default = { }; description = "GitHub runner container configurations"; }; - config.containers = mapAttrs (name: cfg: + config.containers = mapAttrs ( + name: cfg: mkIf cfg.enable { autoStart = true; bindMounts = { @@ -25,7 +31,14 @@ in "/secrets".mountPoint = "${vars.storage_secrets}/services/github-runners/${name}"; "ssh-keys".mountPoint = "${vars.storage_secrets}/services/github-runners/id_ed25519_github-runners"; }; - config = { config, pkgs, lib, ... }: { + config = + { + config, + pkgs, + lib, + ... + }: + { nix.settings = { trusted-substituters = [ "https://cache.nixos.org" @@ -65,7 +78,10 @@ in tokenFile = "${vars.storage_secrets}/services/github-runners/${name}"; user = "github-runners"; group = "github-runners"; - extraPackages = with pkgs; [ nixos-rebuild openssh ]; + extraPackages = with pkgs; [ + nixos-rebuild + openssh + ]; }; users = { users.github-runners = { @@ -77,7 +93,7 @@ in groups.github-runners.gid = 601; }; system.stateVersion = "24.11"; - }; + }; } ) config.services.nix_builder.containers; } diff --git a/systems/jeeves/services/audiobookshelf.nix b/systems/jeeves/services/audiobookshelf.nix index 29a2737..4a7a920 100644 --- a/systems/jeeves/services/audiobookshelf.nix +++ b/systems/jeeves/services/audiobookshelf.nix @@ -8,6 +8,7 @@ in openFirewall = true; host = "192.168.90.40"; }; - systemd.services.audiobookshelf.serviceConfig.WorkingDirectory = lib.mkForce "${vars.media_docker_configs}/audiobookshelf"; + systemd.services.audiobookshelf.serviceConfig.WorkingDirectory = + lib.mkForce "${vars.media_docker_configs}/audiobookshelf"; users.users.audiobookshelf.home = lib.mkForce "${vars.media_docker_configs}/audiobookshelf"; } diff --git a/systems/jeeves/services/cloud_flare_tunnel.nix b/systems/jeeves/services/cloud_flare_tunnel.nix index 199e713..056ecb2 100644 --- a/systems/jeeves/services/cloud_flare_tunnel.nix +++ b/systems/jeeves/services/cloud_flare_tunnel.nix @@ -15,4 +15,3 @@ in }; }; } - diff --git a/systems/jeeves/services/haproxy.nix b/systems/jeeves/services/haproxy.nix index ae75804..cf87e3f 100644 --- a/systems/jeeves/services/haproxy.nix +++ b/systems/jeeves/services/haproxy.nix @@ -1,8 +1,11 @@ { - networking.firewall.allowedTCPPorts = [ 80 443 ]; + networking.firewall.allowedTCPPorts = [ + 80 + 443 + ]; services.haproxy = { enable = true; config = builtins.readFile ./haproxy.cfg; }; -} \ No newline at end of file +} diff --git a/systems/jeeves/services/home_assistant.nix b/systems/jeeves/services/home_assistant.nix index 45f4bfc..1a982c4 100644 --- a/systems/jeeves/services/home_assistant.nix +++ b/systems/jeeves/services/home_assistant.nix @@ -2,7 +2,7 @@ let vars = import ../vars.nix; in { - services ={ + services = { home-assistant = { enable = true; openFirewall = true; @@ -62,9 +62,9 @@ in extraComponents = [ "isal" ]; }; esphome = { - enable = true; - openFirewall = true; - address = "192.168.90.40"; + enable = true; + openFirewall = true; + address = "192.168.90.40"; }; }; } diff --git a/systems/jeeves/services/postgress.nix b/systems/jeeves/services/postgress.nix index 6bcb279..26a927e 100644 --- a/systems/jeeves/services/postgress.nix +++ b/systems/jeeves/services/postgress.nix @@ -16,7 +16,7 @@ in #type database DBuser origin-address auth-method local all all trust - + # ipv4 host all all 127.0.0.1/32 trust host all all 192.168.90.1/24 trust diff --git a/systems/jeeves/syncthing.nix b/systems/jeeves/syncthing.nix index 949bd25..45c5f2b 100644 --- a/systems/jeeves/syncthing.nix +++ b/systems/jeeves/syncthing.nix @@ -2,8 +2,8 @@ let vars = import ./vars.nix; in { - networking.firewall.allowedTCPPorts = [ 8384 ]; - + networking.firewall.allowedTCPPorts = [ 8384 ]; + services.syncthing = { guiAddress = "192.168.90.40:8384"; settings = { @@ -77,7 +77,7 @@ in ]; fsWatcherEnabled = true; }; - # + # "davids-backup1" = { id = "8229p-8z3tm"; # cspell:disable-line path = "${vars.storage_syncthing}/davids_backups/1"; diff --git a/systems/jeeves/vars.nix b/systems/jeeves/vars.nix index a205696..3c5c923 100644 --- a/systems/jeeves/vars.nix +++ b/systems/jeeves/vars.nix @@ -11,7 +11,7 @@ in media_docker_configs = "${zfs_media}/docker/configs"; media_mirror = "${zfs_media}/mirror"; media_share = "${zfs_media}/share"; - media_services = "${zfs_media}/services"; + media_services = "${zfs_media}/services"; media_notes = "${zfs_media}/notes"; media_plex = "${zfs_media}/plex"; media_home_assistant = "${zfs_media}/home_assistant"; diff --git a/systems/rhapsody-in-green/default.nix b/systems/rhapsody-in-green/default.nix index 0966d57..e3f1d80 100644 --- a/systems/rhapsody-in-green/default.nix +++ b/systems/rhapsody-in-green/default.nix @@ -26,7 +26,7 @@ services = { openssh.ports = [ 922 ]; - desktopManager.cosmic.enable = true; + desktopManager.cosmic.enable = true; }; system.stateVersion = "24.05"; diff --git a/systems/rhapsody-in-green/hardware.nix b/systems/rhapsody-in-green/hardware.nix index b61653a..7b15c5e 100644 --- a/systems/rhapsody-in-green/hardware.nix +++ b/systems/rhapsody-in-green/hardware.nix @@ -1,4 +1,9 @@ -{ config, lib, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; diff --git a/systems/rhapsody-in-green/syncthing.nix b/systems/rhapsody-in-green/syncthing.nix index 6953760..4071d47 100644 --- a/systems/rhapsody-in-green/syncthing.nix +++ b/systems/rhapsody-in-green/syncthing.nix @@ -1,4 +1,4 @@ -{ +{ services.syncthing.settings.folders = { "dotfiles" = { path = "/home/richie/dotfiles"; diff --git a/tools/installer.py b/tools/installer.py index ec94873..6b2bf91 100644 --- a/tools/installer.py +++ b/tools/installer.py @@ -266,7 +266,7 @@ def installer( if encrypt_key: pool_disks = [ - f'/dev/mapper/luks-root-pool-{disk.split("/")[-1]}-part2' for disk in disks + f"/dev/mapper/luks-root-pool-{disk.split('/')[-1]}-part2" for disk in disks ] else: pool_disks = [f"{disk}-part2" for disk in disks] @@ -448,7 +448,7 @@ def draw_device_menu( type_padding = calculate_device_menu_padding(devices, "type", padding) mountpoints_padding = calculate_device_menu_padding(devices, "mountpoints", padding) - device_header = f"{"Name":{name_padding}}{"Size":{size_padding}}{"Type":{type_padding}}{"Mountpoints":{mountpoints_padding}}" + device_header = f"{'Name':{name_padding}}{'Size':{size_padding}}{'Type':{type_padding}}{'Mountpoints':{mountpoints_padding}}" menu_width = range(menu_start_x, len(device_header) + menu_start_x) diff --git a/users/gaming/default.nix b/users/gaming/default.nix index a08be72..beec115 100644 --- a/users/gaming/default.nix +++ b/users/gaming/default.nix @@ -2,7 +2,7 @@ pkgs, config, ... -}: +}: { sops.secrets.gaming_password = { sopsFile = ../secrets.yaml; @@ -16,8 +16,7 @@ shell = pkgs.zsh; group = "gaming"; - extraGroups = - [ + extraGroups = [ "audio" "video" "users" @@ -27,5 +26,5 @@ groups.gaming.gid = 1100; }; - home-manager.users.gaming = import ./systems/${config.networking.hostName}.nix; + home-manager.users.gaming = import ./systems/${config.networking.hostName}.nix; } diff --git a/users/gaming/home/firefox.nix b/users/gaming/home/firefox.nix index 9150391..08fb917 100644 --- a/users/gaming/home/firefox.nix +++ b/users/gaming/home/firefox.nix @@ -137,7 +137,8 @@ "permissions.default.desktop-notification" = 0; # allow websites to ask # PREF: allow websites to ask you for your location "permissions.default.geo" = 0; - "geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; + "geo.provider.network.url" = + "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; "permissions.manager.defaultsUrl" = ""; "webchannel.allowObject.urlWhitelist" = ""; diff --git a/users/richie/default.nix b/users/richie/default.nix index 5db10be..2245677 100644 --- a/users/richie/default.nix +++ b/users/richie/default.nix @@ -2,9 +2,11 @@ pkgs, config, ... -}: let +}: +let ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups; -in { +in +{ sops.secrets.richie_password = { sopsFile = ../secrets.yaml; @@ -23,28 +25,28 @@ in { "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJYZFsc9CSH03ZUP7y81AHwSyjLwFmcshVFCyxDcYhBT rhapsody-in-green" # cspell:disable-line ]; extraGroups = - [ - "audio" - "video" - "wheel" - "users" - ] - ++ ifTheyExist [ - "dialout" - "docker" - "hass" - "libvirtd" - "networkmanager" - "plugdev" - "scanner" - "uaccess" - "wireshark" - ]; + [ + "audio" + "video" + "wheel" + "users" + ] + ++ ifTheyExist [ + "dialout" + "docker" + "hass" + "libvirtd" + "networkmanager" + "plugdev" + "scanner" + "uaccess" + "wireshark" + ]; uid = 1000; }; groups.richie.gid = 1000; }; - home-manager.users.richie = import ./systems/${config.networking.hostName}.nix; + home-manager.users.richie = import ./systems/${config.networking.hostName}.nix; } diff --git a/users/richie/home/gui/firefox/default.nix b/users/richie/home/gui/firefox/default.nix index 77c0512..b3f42b4 100644 --- a/users/richie/home/gui/firefox/default.nix +++ b/users/richie/home/gui/firefox/default.nix @@ -17,7 +17,11 @@ search = { force = true; default = "kagi"; - order = [ "kagi" "DuckDuckGo" "Google" ]; + order = [ + "kagi" + "DuckDuckGo" + "Google" + ]; }; settings = { # SECTION: FASTFOX @@ -138,7 +142,8 @@ "permissions.default.desktop-notification" = 0; # allow websites to ask # PREF: allow websites to ask you for your location "permissions.default.geo" = 0; - "geo.provider.network.url" = "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; + "geo.provider.network.url" = + "https://location.services.mozilla.com/v1/geolocate?key=%MOZILLA_API_KEY%"; "permissions.manager.defaultsUrl" = ""; "webchannel.allowObject.urlWhitelist" = ""; diff --git a/users/richie/home/gui/kitty.nix b/users/richie/home/gui/kitty.nix index 176ba00..5072583 100644 --- a/users/richie/home/gui/kitty.nix +++ b/users/richie/home/gui/kitty.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ programs.kitty = { enable = true; font.name = "IntoneMono Nerd Font"; diff --git a/users/richie/home/gui/vscode/default.nix b/users/richie/home/gui/vscode/default.nix index 68b71b7..eb3d599 100644 --- a/users/richie/home/gui/vscode/default.nix +++ b/users/richie/home/gui/vscode/default.nix @@ -4,8 +4,10 @@ let in { # mutable symlinks to key binds and settings - xdg.configFile."Code/User/settings.json".source = config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/settings.json"; - xdg.configFile."Code/User/keybindings.json".source = config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/keybindings.json"; + xdg.configFile."Code/User/settings.json".source = + config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/settings.json"; + xdg.configFile."Code/User/keybindings.json".source = + config.lib.file.mkOutOfStoreSymlink "${vscode_dir}/keybindings.json"; home.packages = with pkgs; [ nil ];