From e08f66d2869b8625587285aaa98fc5667cd2aef6 Mon Sep 17 00:00:00 2001 From: blahai Date: Fri, 20 Dec 2024 15:11:42 +0200 Subject: [PATCH] Format with alejandra --- flake.lock | 8 +- flake.nix | 80 +++++++------ hosts/epimetheus/configuration.nix | 25 ++-- hosts/nyx/configuration.nix | 20 ++-- hosts/nyx/hardware-configuration.nix | 53 ++++++--- hosts/nyx/home.nix | 27 +++-- hosts/theia/configuration.nix | 80 +++++++------ hosts/theia/disk-config.nix | 3 +- modules/home-manager/ags/default.nix | 9 +- .../home-manager/cli/alacritty/default.nix | 8 +- .../home-manager/cli/fastfetch/fastfetch.nix | 9 +- modules/home-manager/cli/fish/default.nix | 12 +- modules/home-manager/cli/foot/default.nix | 9 +- modules/home-manager/cli/starship.nix | 6 +- modules/home-manager/cli/wezterm/default.nix | 9 +- modules/home-manager/default.nix | 2 +- modules/home-manager/hypr/default.nix | 19 +-- modules/home-manager/hypr/hyprland/execs.nix | 7 +- .../home-manager/hypr/hyprland/keybinds.nix | 108 ++++++++++-------- modules/home-manager/hypr/hyprland/rules.nix | 12 +- modules/home-manager/hypr/hyprlock.nix | 46 ++++---- modules/home-manager/spotify/default.nix | 41 ++++--- modules/nixos/catppuccin.nix | 5 +- modules/nixos/games/default.nix | 12 +- modules/nixos/services/bluetooth.nix | 8 +- modules/nixos/services/default.nix | 3 +- modules/nixos/services/jellyfin.nix | 2 +- modules/nixos/services/pipewire.nix | 17 ++- modules/nixos/services/tailscale.nix | 2 +- modules/nixos/virtualisation.nix | 26 +++-- secrets/secrets.nix | 8 +- 31 files changed, 398 insertions(+), 278 deletions(-) diff --git a/flake.lock b/flake.lock index b333874..3c9f7fa 100644 --- a/flake.lock +++ b/flake.lock @@ -434,11 +434,11 @@ "nixvim": "nixvim" }, "locked": { - "lastModified": 1734646427, - "narHash": "sha256-+OxSwGt6O6qzGvUTAlZgLivHnYPlrZF2JybyTfdsOP0=", + "lastModified": 1734699281, + "narHash": "sha256-pjlbWc1bgrlk5amtIOFoj5g1pHAMOWKWoYlIok8NAIs=", "ref": "refs/heads/main", - "rev": "6809b030bcdad17e2007a03b8ca5ccf772c072ed", - "revCount": 467, + "rev": "81db83c82f89b5db7095b2288e5d8fc21fd254d5", + "revCount": 469, "type": "git", "url": "ssh://git@github.com/blahai/haivim" }, diff --git a/flake.nix b/flake.nix index 5d76832..c3f8739 100644 --- a/flake.nix +++ b/flake.nix @@ -32,7 +32,7 @@ # as that is where I *borrowed* the base from haivim = { url = "git+ssh://git@github.com/blahai/haivim"; - inputs = { nixpkgs.follows = "nixpkgs"; }; + inputs = {nixpkgs.follows = "nixpkgs";}; }; deploy-rs = { @@ -67,54 +67,58 @@ wezterm.url = "github:wez/wezterm?dir=nix"; - catppuccin = { url = "github:catppuccin/nix"; }; + catppuccin = {url = "github:catppuccin/nix";}; hyprland.url = "github:hyprwm/Hyprland"; zen-browser.url = "github:ch4og/zen-browser-flake"; - }; - outputs = { nixpkgs, nixpkgs-smol, chaotic, home-manager, disko, ... }@inputs: - let system = "x86_64-linux"; - in { - nixosConfigurations = { - nyx = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs; - pkgs-smol = import nixpkgs-smol { - inherit system; - config.allowUnfree = true; - }; + outputs = { + nixpkgs, + nixpkgs-smol, + chaotic, + home-manager, + disko, + ... + } @ inputs: let + system = "x86_64-linux"; + in { + nixosConfigurations = { + nyx = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + pkgs-smol = import nixpkgs-smol { + inherit system; + config.allowUnfree = true; }; - modules = [ - ./hosts/nyx/configuration.nix - inputs.home-manager.nixosModules.default - chaotic.nixosModules.default - ]; }; + modules = [ + ./hosts/nyx/configuration.nix + inputs.home-manager.nixosModules.default + chaotic.nixosModules.default + ]; + }; - # helios = nixpkgs.lib.nixosSystem { - # modules = [ - # ./hosts/helios/configuration.nix - # # inputs.home-manager.nixosModules.default - # chaotic.nixosModules.default - # ]; - # }; + # helios = nixpkgs.lib.nixosSystem { + # modules = [ + # ./hosts/helios/configuration.nix + # # inputs.home-manager.nixosModules.default + # chaotic.nixosModules.default + # ]; + # }; - theia = nixpkgs.lib.nixosSystem { - modules = - [ ./hosts/theia/configuration.nix disko.nixosModules.disko ]; - }; - - epimetheus = nixpkgs.lib.nixosSystem { - specialArgs = { - inherit inputs; - pkgs-smol = import nixpkgs-smol { inherit system; }; - }; - modules = - [ ./hosts/epimetheus/configuration.nix disko.nixosModules.disko ]; + theia = nixpkgs.lib.nixosSystem { + modules = [./hosts/theia/configuration.nix disko.nixosModules.disko]; + }; + + epimetheus = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + pkgs-smol = import nixpkgs-smol {inherit system;}; }; + modules = [./hosts/epimetheus/configuration.nix disko.nixosModules.disko]; }; }; + }; } diff --git a/hosts/epimetheus/configuration.nix b/hosts/epimetheus/configuration.nix index 8d02719..dffea4a 100644 --- a/hosts/epimetheus/configuration.nix +++ b/hosts/epimetheus/configuration.nix @@ -1,15 +1,21 @@ -{ pkgs, pkgs-smol, lib, modulesPath, config, ... }: { - - imports = [ "${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix" ]; +{ + pkgs, + pkgs-smol, + lib, + modulesPath, + config, + ... +}: { + imports = ["${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"]; boot = { - supportedFilesystems = [ "zfs" ]; + supportedFilesystems = ["zfs"]; zfs = { forceImportRoot = false; package = pkgs-smol.zfs; }; kernelPackages = pkgs-smol.linuxPackages_6_12; - kernelParams = lib.mkAfter [ "noquiet" "toram" ]; + kernelParams = lib.mkAfter ["noquiet" "toram"]; enableContainers = false; }; @@ -30,7 +36,6 @@ dnf5 # Fedora debootstrap # Debin and ubuntu apt # Ubuntu - ]; documentation = { @@ -56,7 +61,7 @@ environment = { stub-ld.enable = lib.mkForce false; - defaultPackages = [ ]; + defaultPackages = []; }; xdg = { @@ -68,10 +73,10 @@ nix = { package = pkgs.lix; - nixPath = [ "nixpkgs=${config.nix.registry.nixpkgs.to.path}" ]; + nixPath = ["nixpkgs=${config.nix.registry.nixpkgs.to.path}"]; channel.enable = false; settings = { - experimental-features = [ "nix-command" "flakes" "auto-allocate-uids" ]; + experimental-features = ["nix-command" "flakes" "auto-allocate-uids"]; max-jobs = "auto"; sandbox = true; auto-optimise-store = true; @@ -92,10 +97,8 @@ "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" "wezterm.cachix.org-1:kAbhjYUC9qvblTE+s7S+kl5XM1zVa4skO+E/1IDWdH0=" ]; - }; }; hardware.enableRedistributableFirmware = true; - } diff --git a/hosts/nyx/configuration.nix b/hosts/nyx/configuration.nix index 2e87a54..637aa14 100644 --- a/hosts/nyx/configuration.nix +++ b/hosts/nyx/configuration.nix @@ -1,6 +1,4 @@ -{ config, pkgs, pkgs-smol, inputs, system, lib, ... }: - -{ +{ config, pkgs, pkgs-smol, inputs, lib, ... }: { imports = [ ./hardware-configuration.nix ../../modules/nixos/default.nix @@ -28,8 +26,8 @@ }; kernelPackages = pkgs.linuxPackages_6_12; kernel = { sysctl = { "vm.max_map_count" = 2147483642; }; }; - kernelParams = [ - "elevator=none" # for zfs + kernelParams = [ + "elevator=none" # for zfs "zfs.zfs_arc_max=8589934592" "nvme.noacpi=1" ]; @@ -84,7 +82,6 @@ }; gnome.gnome-keyring.enable = true; - }; hardware.pulseaudio.enable = false; @@ -131,7 +128,6 @@ TimeoutStopSec = 10; }; }; - }; programs = { @@ -248,7 +244,8 @@ lua-language-server nil nixd - nixfmt-classic + nix-output-monitor + alejandra zip nodejs typescript @@ -274,7 +271,6 @@ imagemagick wireguard-tools mission-center - nix-output-monitor speedcrunch geogebra ]; @@ -298,6 +294,11 @@ enableSSHSupport = true; }; + programs.localsend = { + enable = true; + openFirewall = true; + }; + services.openssh = { enable = true; settings = { @@ -307,5 +308,4 @@ }; system.stateVersion = "24.05"; - } diff --git a/hosts/nyx/hardware-configuration.nix b/hosts/nyx/hardware-configuration.nix index af02597..c0e443a 100644 --- a/hosts/nyx/hardware-configuration.nix +++ b/hosts/nyx/hardware-configuration.nix @@ -1,78 +1,95 @@ -{ config, lib, pkgs, modulesPath, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; - boot.initrd.availableKernelModules = [ "nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod" ]; - boot.initrd.kernelModules = [ "amdgpu" ]; - boot.kernelModules = [ "kvm-amd" "amd-pstate" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["nvme" "ahci" "xhci_pci" "usbhid" "hid_generic" "uas" "sd_mod"]; + boot.initrd.kernelModules = ["amdgpu"]; + boot.kernelModules = ["kvm-amd" "amd-pstate"]; + boot.extraModulePackages = []; fileSystems."/" = { device = "zpool/root"; fsType = "zfs"; - options = [ "zfsutil" ]; + options = ["zfsutil"]; }; fileSystems."/nix" = { device = "zpool/nix"; fsType = "zfs"; - options = [ "zfsutil" ]; + options = ["zfsutil"]; }; fileSystems."/var" = { device = "zpool/var"; fsType = "zfs"; - options = [ "zfsutil" ]; + options = ["zfsutil"]; }; fileSystems."/home" = { device = "zpool/home"; fsType = "zfs"; - options = [ "zfsutil" ]; + options = ["zfsutil"]; + }; + + fileSystems."/var/lib/virt/images" = { + device = "zpool/virt/images"; + fsType = "zfs"; + options = ["zfsutil"]; + }; + + fileSystems."/var/lib/virt/disks" = { + device = "zpool/virt/disks"; + fsType = "zfs"; + options = ["zfsutil"]; }; fileSystems."/mnt/zootfs/Storage" = { device = "zootfs/Storage"; fsType = "zfs"; - options = [ "zfsutil" ]; + options = ["zfsutil"]; }; fileSystems."/mnt/zootfs/Media" = { device = "zootfs/Media"; fsType = "zfs"; - options = [ "zfsutil" ]; + options = ["zfsutil"]; }; # https://github.com/atuinsh/atuin/issues/952#issuecomment-1902164562 fileSystems."/home/pingu/.local/share/atuin" = { device = "/dev/zvol/zpool/nixos/atuin"; fsType = "ext4"; - options = [ "async" "auto" "nofail" ]; + options = ["async" "auto" "nofail"]; }; fileSystems."/boot" = { device = "/dev/disk/by-label/BOOT"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = ["fmask=0022" "dmask=0022"]; }; fileSystems."/mnt/ssd" = { device = "/dev/disk/by-uuid/e4c31e1c-6667-4582-8d6a-d142d6118ce2"; fsType = "btrfs"; - options = [ "async" "auto" "noatime" "rw" ]; + options = ["async" "auto" "noatime" "rw"]; }; fileSystems."/mnt/ext" = { device = "/dev/disk/by-uuid/43280a82-cf9a-452e-9bdc-a8cc66ccd7c8"; fsType = "btrfs"; - options = [ "async" "auto" "nofail" "noatime" ]; + options = ["async" "auto" "nofail" "noatime"]; }; - swapDevices = [{ device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac"; }]; + swapDevices = [{device = "/dev/disk/by-uuid/04281bd7-784a-4287-b4f2-ce406d2ab6ac";}]; # networking.useDHCP = lib.mkDefault true; + hardware.enableRedistributableFirmware = true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.amd.updateMicrocode = true; } diff --git a/hosts/nyx/home.nix b/hosts/nyx/home.nix index c52fd72..c815e1f 100644 --- a/hosts/nyx/home.nix +++ b/hosts/nyx/home.nix @@ -1,4 +1,9 @@ -{ inputs, config, pkgs, ... }: { +{ + inputs, + config, + pkgs, + ... +}: { imports = [ ../../modules/home-manager/default.nix inputs.catppuccin.homeManagerModules.catppuccin @@ -23,10 +28,10 @@ autocrlf = "input"; }; url = { - "ssh://git@github.com/" = { insteadOf = "https://github.com/"; }; + "ssh://git@github.com/" = {insteadOf = "https://github.com/";}; }; - gpg = { format = "ssh"; }; - init = { defaultBranch = "main"; }; + gpg = {format = "ssh";}; + init = {defaultBranch = "main";}; }; }; @@ -45,12 +50,15 @@ gtk = { enable = true; - catppuccin = { + }; + + catppuccin = { + gtk = { enable = true; flavor = "mocha"; accent = "pink"; size = "standard"; - tweaks = [ "normal" ]; + tweaks = ["normal"]; icon.enable = true; }; }; @@ -64,9 +72,12 @@ home.stateVersion = "24.11"; - home.packages = with pkgs; [ obsidian ]; + home.packages = with pkgs; [ + obsidian + inputs.haivim.packages.${pkgs.system}.default + ]; - home.sessionVariables = { EDITOR = "nvim"; }; + home.sessionVariables = {EDITOR = "nvim";}; # Let Home Manager install and manage itself. programs.home-manager.enable = true; diff --git a/hosts/theia/configuration.nix b/hosts/theia/configuration.nix index ceec1fd..5f1d085 100644 --- a/hosts/theia/configuration.nix +++ b/hosts/theia/configuration.nix @@ -1,7 +1,13 @@ -{ config, modulesPath, lib, pkgs, ... }: { +{ + config, + modulesPath, + lib, + pkgs, + ... +}: { system.stateVersion = "24.11"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + imports = [(modulesPath + "/profiles/qemu-guest.nix")]; boot = { initrd.availableKernelModules = [ @@ -14,9 +20,9 @@ "sr_mod" "virtio_blk" ]; - initrd.kernelModules = [ ]; + initrd.kernelModules = []; kernelPackages = pkgs.linuxPackages_6_12; - kernelModules = [ "kvm-amd" ]; + kernelModules = ["kvm-amd"]; kernel = { sysctl = { "vm.max_map_count" = 2147483642; @@ -28,7 +34,7 @@ "net.ipv6.conf.all.forwarding" = 1; }; }; - extraModulePackages = [ ]; + extraModulePackages = []; loader.grub = { enable = true; device = "/dev/vda"; @@ -38,7 +44,7 @@ nix = { package = pkgs.lix; settings = { - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = ["nix-command" "flakes"]; auto-optimise-store = true; sandbox = true; }; @@ -58,13 +64,15 @@ fileSystems."/boot" = { device = "/dev/disk/by-uuid/FED3-A372"; fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; + options = ["fmask=0022" "dmask=0022"]; }; - swapDevices = [{ - device = "/var/lib/swapfile"; - size = 16 * 1024; - }]; + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 16 * 1024; + } + ]; networking = { enableIPv6 = false; # Had to disable for now due to problems with resolving @@ -82,7 +90,7 @@ ]; }; hostName = "theia"; - nameservers = [ "1.1.1.1" "8.8.8.8" "9.9.9.9" ]; + nameservers = ["1.1.1.1" "8.8.8.8" "9.9.9.9"]; domain = "theia.blahai.gay"; useDHCP = lib.mkDefault false; defaultGateway = { @@ -93,15 +101,19 @@ interfaces = { ens3 = { ipv4 = { - addresses = [{ - address = "178.63.118.252"; - prefixLength = 32; - }]; + addresses = [ + { + address = "178.63.118.252"; + prefixLength = 32; + } + ]; - routes = [{ - address = "178.63.247.183"; - prefixLength = 32; - }]; + routes = [ + { + address = "178.63.247.183"; + prefixLength = 32; + } + ]; }; }; }; @@ -117,7 +129,7 @@ networkd-dispatcher = { enable = true; rules."50-tailscale" = { - onState = [ "routable" ]; + onState = ["routable"]; script = '' ${ lib.getExe pkgs.ethtool @@ -142,13 +154,12 @@ "n?vim" ]; prefer = - lib.concatStringsSep "|" [ "dotnet" "java.*" "nix" "npm" "node" ]; + lib.concatStringsSep "|" ["dotnet" "java.*" "nix" "npm" "node"]; in [ "-g" "--avoid '(^|/)(${avoid})'" # things that we want to avoid killing "--prefer '(^|/)(${prefer})'" # things we want to remove fast ]; - }; caddy = { @@ -184,7 +195,7 @@ uptime-kuma = { enable = true; - settings = { PORT = "3001"; }; + settings = {PORT = "3001";}; }; forgejo = { @@ -227,10 +238,9 @@ use_default_settings = true; server = { port = 8888; - secret_key = - "7360d3df7c08ce681cf6d5122e3e182de2c5205e962766abd3e6dfc8dec1b683"; + secret_key = "7360d3df7c08ce681cf6d5122e3e182de2c5205e962766abd3e6dfc8dec1b683"; }; - ui = { infinite_scroll = true; }; + ui = {infinite_scroll = true;}; general = { instance_name = "searchai"; @@ -247,7 +257,7 @@ openssh = { enable = true; openFirewall = true; - settings = { PasswordAuthentication = false; }; + settings = {PasswordAuthentication = false;}; }; fail2ban = { @@ -261,26 +271,24 @@ }; }; - programs = { nix-ld.enable = true; }; + programs = {nix-ld.enable = true;}; users.users.root = { openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLqPq70t6RbnI8UejEshYcfBP66I4OrLFjvGLLfIEXD" ]; - initialHashedPassword = - "$y$j9T$TzqbL4iMGLjli6EEXfRCZ0$AhFJ4iCFxRlstth5owic3M5nq74Sp1qhtctjSBcgAl8"; + initialHashedPassword = "$y$j9T$TzqbL4iMGLjli6EEXfRCZ0$AhFJ4iCFxRlstth5owic3M5nq74Sp1qhtctjSBcgAl8"; }; users.users.pingu = { isNormalUser = true; - extraGroups = [ "wheel" ]; + extraGroups = ["wheel"]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILPbmiNqoyeKXk/VopFm2cFfEnV4cKCFBhbhyYB69Fuu" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILLqPq70t6RbnI8UejEshYcfBP66I4OrLFjvGLLfIEXD" ]; - initialHashedPassword = - "$y$j9T$cxwKGmzYyC1eLeIysr8r/.$dsxxxV4NvXY.Wpd9LO.RiuMQuy2lYyy2HGrk52BJX08"; + initialHashedPassword = "$y$j9T$cxwKGmzYyC1eLeIysr8r/.$dsxxxV4NvXY.Wpd9LO.RiuMQuy2lYyy2HGrk52BJX08"; }; users.users.minecraft = { @@ -295,10 +303,8 @@ openjdk21 openjdk17 screen - ]; - initialHashedPassword = - "$y$j9T$KpQYYLB6eWfHAUo9.o/uy1$gnj/UlWLrx5XBZDm2GNdjHs2G5D3XxxqqtrCIf5MX43"; + initialHashedPassword = "$y$j9T$KpQYYLB6eWfHAUo9.o/uy1$gnj/UlWLrx5XBZDm2GNdjHs2G5D3XxxqqtrCIf5MX43"; }; environment.systemPackages = with pkgs; [ diff --git a/hosts/theia/disk-config.nix b/hosts/theia/disk-config.nix index a51111a..ff82562 100644 --- a/hosts/theia/disk-config.nix +++ b/hosts/theia/disk-config.nix @@ -1,5 +1,4 @@ -{ lib, ... }: -{ +{lib, ...}: { disko.devices = { disk.disk1 = { device = lib.mkDefault "/dev/vda"; diff --git a/modules/home-manager/ags/default.nix b/modules/home-manager/ags/default.nix index 76411aa..a1a770a 100644 --- a/modules/home-manager/ags/default.nix +++ b/modules/home-manager/ags/default.nix @@ -1,6 +1,11 @@ -{ inputs, pkgs, lib, ... }: { +{ + inputs, + pkgs, + lib, + ... +}: { # add the home manager module - imports = [ inputs.ags.homeManagerModules.default ]; + imports = [inputs.ags.homeManagerModules.default]; home.packages = with pkgs; [ bun diff --git a/modules/home-manager/cli/alacritty/default.nix b/modules/home-manager/cli/alacritty/default.nix index 1fa8aa2..12921e4 100644 --- a/modules/home-manager/cli/alacritty/default.nix +++ b/modules/home-manager/cli/alacritty/default.nix @@ -1,8 +1,12 @@ -{ pkgs, lib, config, ... } : { + pkgs, + lib, + config, + ... +}: { programs.alacritty = { enable = true; - + settings = { window = { opacity = 0.9; diff --git a/modules/home-manager/cli/fastfetch/fastfetch.nix b/modules/home-manager/cli/fastfetch/fastfetch.nix index 76b1217..bb84ea6 100644 --- a/modules/home-manager/cli/fastfetch/fastfetch.nix +++ b/modules/home-manager/cli/fastfetch/fastfetch.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + ... +}: { home.file."Pictures/gay.png".source = ./gay.png; programs.fastfetch = { enable = true; @@ -9,7 +14,7 @@ width = 32; }; - display = { separator = "  "; }; + display = {separator = "  ";}; modules = [ { diff --git a/modules/home-manager/cli/fish/default.nix b/modules/home-manager/cli/fish/default.nix index a76766d..2ca45c6 100644 --- a/modules/home-manager/cli/fish/default.nix +++ b/modules/home-manager/cli/fish/default.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: { +{ + config, + lib, + pkgs, + ... +}: { home.packages = with pkgs; [ neofetch ]; @@ -63,8 +68,8 @@ ''; build-iso = '' - cd ~/.config/nixos - nix build .#nixosConfigurations.epimetheus.config.system.build.isoImage + cd ~/.config/nixos + nix build .#nixosConfigurations.epimetheus.config.system.build.isoImage ''; # Credit for these 3 @@ -80,7 +85,6 @@ mkcd = '' mkdir -p -- $argv[1] && cd $argv; or return $status ''; - }; }; diff --git a/modules/home-manager/cli/foot/default.nix b/modules/home-manager/cli/foot/default.nix index 4eac292..8456503 100644 --- a/modules/home-manager/cli/foot/default.nix +++ b/modules/home-manager/cli/foot/default.nix @@ -1,4 +1,9 @@ -{ pkgs, lib, config, ... }: { +{ + pkgs, + lib, + config, + ... +}: { programs.foot = { enable = true; settings = { @@ -15,7 +20,7 @@ style = "beam"; beam-thickness = 1.5; }; - colors = { alpha = 0.9; }; + colors = {alpha = 0.9;}; }; }; } diff --git a/modules/home-manager/cli/starship.nix b/modules/home-manager/cli/starship.nix index 817e67d..5f006ca 100644 --- a/modules/home-manager/cli/starship.nix +++ b/modules/home-manager/cli/starship.nix @@ -1,5 +1,9 @@ -{ config, lib, pkgs, ... }: { + config, + lib, + pkgs, + ... +}: { programs.starship = { enable = true; enableFishIntegration = true; diff --git a/modules/home-manager/cli/wezterm/default.nix b/modules/home-manager/cli/wezterm/default.nix index 02a8c41..543288d 100644 --- a/modules/home-manager/cli/wezterm/default.nix +++ b/modules/home-manager/cli/wezterm/default.nix @@ -1,9 +1,14 @@ -{ inputs, pkgs, lib, config, ... }: { + inputs, + pkgs, + lib, + config, + ... +}: { home.packages = with pkgs; [ inputs.wezterm.packages.${pkgs.system}.default ]; - + xdg.configFile."wezterm" = { source = config.lib.file.mkOutOfStoreSymlink "/home/pingu/.config/nixos/modules/home-manager/cli/wezterm"; recursive = true; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index 24c2957..4921c6e 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,4 +1,4 @@ -{ ... }: { +{...}: { imports = [ ./cli/default.nix ./hypr/default.nix diff --git a/modules/home-manager/hypr/default.nix b/modules/home-manager/hypr/default.nix index 91ca4a0..73db461 100644 --- a/modules/home-manager/hypr/default.nix +++ b/modules/home-manager/hypr/default.nix @@ -1,5 +1,10 @@ -{ pkgs, config, inputs, lib, ... }: { - +{ + pkgs, + config, + inputs, + lib, + ... +}: { imports = [ ./hyprland/rules.nix ./hyprland/keybinds.nix @@ -22,7 +27,7 @@ xdg.portal = { enable = true; - configPackages = [ config.wayland.windowManager.hyprland.package ]; + configPackages = [config.wayland.windowManager.hyprland.package]; extraPortals = [ pkgs.xdg-desktop-portal-gtk inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland @@ -35,7 +40,6 @@ package = inputs.hyprland.packages."${pkgs.system}".hyprland; settings = { - monitor = [ ",prefered,auto,1" ]; @@ -144,7 +148,7 @@ misc = { vfr = 1; vrr = 2; - + middle_click_paste = false; focus_on_activate = true; animate_manual_resizes = false; @@ -159,9 +163,6 @@ initial_workspace_tracking = false; }; - }; - - }; - + }; } diff --git a/modules/home-manager/hypr/hyprland/execs.nix b/modules/home-manager/hypr/hyprland/execs.nix index 288b22c..bac9a6d 100644 --- a/modules/home-manager/hypr/hyprland/execs.nix +++ b/modules/home-manager/hypr/hyprland/execs.nix @@ -1,4 +1,9 @@ -{ pkgs, config, inputs, ... }: { +{ + pkgs, + config, + inputs, + ... +}: { wayland.windowManager.hyprland.settings = { exec-once = [ "${pkgs.swww}/bin/swww-daemon --format xrgb" diff --git a/modules/home-manager/hypr/hyprland/keybinds.nix b/modules/home-manager/hypr/hyprland/keybinds.nix index 5201bca..0a5b3a5 100644 --- a/modules/home-manager/hypr/hyprland/keybinds.nix +++ b/modules/home-manager/hypr/hyprland/keybinds.nix @@ -1,72 +1,84 @@ -{ pkgs, config, inputs, ... }: { +{ + pkgs, + config, + inputs, + ... +}: { wayland.windowManager.hyprland.settings = { - bindle = [ ",XF86AudioMute, exec, playerctl --player=spotify,%any play-pause" ",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+" ",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-" ]; - bindm = [ "Super, mouse:272, movewindow" "Super, mouse:273, resizewindow" ]; + bindm = ["Super, mouse:272, movewindow" "Super, mouse:273, resizewindow"]; - bindn = [ " , up, pass, JKPS" ]; + bindn = [" , up, pass, JKPS"]; - binde = [ # Window split ratio + binde = [ + # Window split ratio "Super, Semicolon, splitratio, -0.1" "Super, Apostrophe, splitratio, 0.1" ]; - bind = [ - "Super, mouse_up, workspace, +1" - "Super, mouse_down, workspace, -1" - "Super, Page_up, workspace, -1" - "Super, Page_down, workspace, +1" + bind = + [ + "Super, mouse_up, workspace, +1" + "Super, mouse_down, workspace, -1" + "Super, Page_up, workspace, -1" + "Super, Page_down, workspace, +1" - "Super+Shift, S, togglespecialworkspace" + "Super+Shift, S, togglespecialworkspace" - "Super, R, exec, ${pkgs.anyrun}/bin/anyrun" - "Super, W, exec, ${pkgs.floorp}/bin/floorp" - "Super, Q, exec, wezterm" - "Super, C, killactive" - "Super, V, togglefloating" - "Super, E, exec, ${pkgs.nautilus}/bin/nautilus -w" - "SUPERALT, V, exec, pkill fuzzel || cliphist list | fuzzel --icon-theme=candy-icons --background-color=1A1513dd --text-color=F8D4D2ff --match-color=FFB3B1ff --border-width=2 --border-radius=15 --border-color=EB8A89ff --selection-color=585b70ff --selection-text-color=F8D4D2ff --selection-match-color=FFB3B1ff --font='Lexend' --prompt='>> ' --dmenu | cliphist decode | wl-copy" + "Super, R, exec, ${pkgs.anyrun}/bin/anyrun" + "Super, W, exec, ${pkgs.floorp}/bin/floorp" + "Super, Q, exec, wezterm" + "Super, C, killactive" + "Super, V, togglefloating" + "Super, E, exec, ${pkgs.nautilus}/bin/nautilus -w" + "SUPERALT, V, exec, pkill fuzzel || cliphist list | fuzzel --icon-theme=candy-icons --background-color=1A1513dd --text-color=F8D4D2ff --match-color=FFB3B1ff --border-width=2 --border-radius=15 --border-color=EB8A89ff --selection-color=585b70ff --selection-text-color=F8D4D2ff --selection-match-color=FFB3B1ff --font='Lexend' --prompt='>> ' --dmenu | cliphist decode | wl-copy" - "Super, L, exec, ${pkgs.hyprlock}/bin/hyprlock" + "Super, L, exec, ${pkgs.hyprlock}/bin/hyprlock" - # recording and ss stuff - "Super, S, exec, pkill slurp || grimblast --freeze copy area" + # recording and ss stuff + "Super, S, exec, pkill slurp || grimblast --freeze copy area" - # ags stuff - "Super + Control, R, exec, pkill ags; ags" - "Super, Tab, exec, ags -t launcher" - "Super, X, exec, ags -t powermenu" + # ags stuff + "Super + Control, R, exec, pkill ags; ags" + "Super, Tab, exec, ags -t launcher" + "Super, X, exec, ags -t powermenu" - ## Hyprland stuff - "Super, Z, movewindow" + ## Hyprland stuff + "Super, Z, movewindow" - # Swap windows - "Super+Shift, left, movewindow, l" - "Super+Shift, right, movewindow, r" - "Super+Shift, up, movewindow, u" - "Super+Shift, down, movewindow, d" + # Swap windows + "Super+Shift, left, movewindow, l" + "Super+Shift, right, movewindow, r" + "Super+Shift, up, movewindow, u" + "Super+Shift, down, movewindow, d" - # Move focus - "Super, left, movefocus, l" - "Super, right, movefocus, r" - "Super, up, movefocus, u" - "Super, down, movefocus, d" - - # Fullscreen - "Super+Shift, F, fullscreen, 0" - - ] ++ map (n: - "Alt, ${toString n}, movetoworkspacesilent, ${ - toString (if n == 0 then 10 else n) - }") [ 1 2 3 4 5 6 7 8 9 0 ] ++ map (n: - "Super, ${toString n}, workspace, ${ - toString (if n == 0 then 10 else n) - }") [ 1 2 3 4 5 6 7 8 9 0 ]; + # Move focus + "Super, left, movefocus, l" + "Super, right, movefocus, r" + "Super, up, movefocus, u" + "Super, down, movefocus, d" + # Fullscreen + "Super+Shift, F, fullscreen, 0" + ] + ++ map (n: "Alt, ${toString n}, movetoworkspacesilent, ${ + toString ( + if n == 0 + then 10 + else n + ) + }") [1 2 3 4 5 6 7 8 9 0] + ++ map (n: "Super, ${toString n}, workspace, ${ + toString ( + if n == 0 + then 10 + else n + ) + }") [1 2 3 4 5 6 7 8 9 0]; }; } diff --git a/modules/home-manager/hypr/hyprland/rules.nix b/modules/home-manager/hypr/hyprland/rules.nix index 6c2d23e..d96ad51 100644 --- a/modules/home-manager/hypr/hyprland/rules.nix +++ b/modules/home-manager/hypr/hyprland/rules.nix @@ -1,7 +1,11 @@ -{ pkgs, config, inputs, lib, ... }: { + pkgs, + config, + inputs, + lib, + ... +}: { wayland.windowManager.hyprland.settings = { - workspace = [ "special:special, on-created-empty:exec spotify" ]; @@ -22,7 +26,6 @@ ]; windowrulev2 = [ - ]; layerrule = [ @@ -47,7 +50,7 @@ "ignorealpha 0.5, launcher" "blur, notifications" "ignorealpha 0.69, notifications" - + "animation slide top, sideleft.*" "animation slide top, sideright.*" "blur, session" @@ -73,6 +76,5 @@ "blur, osk" "ignorealpha 0.20, osk" ]; - }; } diff --git a/modules/home-manager/hypr/hyprlock.nix b/modules/home-manager/hypr/hyprlock.nix index a752785..10fb579 100644 --- a/modules/home-manager/hypr/hyprlock.nix +++ b/modules/home-manager/hypr/hyprlock.nix @@ -1,5 +1,4 @@ -{ config, ... }: { - +{config, ...}: { programs.hyprlock = { enable = true; settings = { @@ -10,25 +9,28 @@ no_fade_out = true; }; - backgruond = { color = "rgba(000000FF)"; }; + backgruond = {color = "rgba(000000FF)";}; - input-field = [{ - monitor = ""; - size = "250, 50"; - outline_thickness = 2; - dots_size = 0.1; - dots_spacing = 0.3; - outer_color = "rgba(8C909F55)"; - inner_color = "rgba(0F131C11)"; - font_color = "rgba(C2C6D6FF)"; + input-field = [ + { + monitor = ""; + size = "250, 50"; + outline_thickness = 2; + dots_size = 0.1; + dots_spacing = 0.3; + outer_color = "rgba(8C909F55)"; + inner_color = "rgba(0F131C11)"; + font_color = "rgba(C2C6D6FF)"; - position = "0, 20"; - halign = "center"; - valign = "center"; - }]; + position = "0, 20"; + halign = "center"; + valign = "center"; + } + ]; label = [ - { # Clock + { + # Clock monitor = ""; text = "$TIME"; shadow_passes = 1; @@ -40,7 +42,8 @@ position = "0, 300"; } - { # Greeting + { + # Greeting monitor = ""; text = "Hi $USER !!!"; shadow_passes = 1; @@ -54,7 +57,8 @@ valign = "center"; } - { # lock icon + { + # lock icon monitor = ""; text = "lock"; shadow_passes = 1; @@ -68,7 +72,8 @@ valign = "center"; } - { # "locked" text + { + # "locked" text monitor = ""; text = "locked"; shadow_passes = 1; @@ -91,7 +96,6 @@ # font_family = "Rubik Light"; #} ]; - }; }; } diff --git a/modules/home-manager/spotify/default.nix b/modules/home-manager/spotify/default.nix index 99a5f1e..d47a4d4 100644 --- a/modules/home-manager/spotify/default.nix +++ b/modules/home-manager/spotify/default.nix @@ -1,24 +1,27 @@ -{ pkgs, lib, config, inputs, ... }: { - +{ + pkgs, + lib, + config, + inputs, + ... +}: { imports = [ inputs.spicetify-nix.homeManagerModules.default ]; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "spotify" - ]; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ + "spotify" + ]; - programs.spicetify = - let - spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; - in - { - enable = true; - enabledExtensions = with spicePkgs.extensions; [ - - hidePodcasts - ]; - theme = spicePkgs.themes.comfy; - colorScheme = "Hikari"; - }; -} \ No newline at end of file + programs.spicetify = let + spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; + in { + enable = true; + enabledExtensions = with spicePkgs.extensions; [ + hidePodcasts + ]; + theme = spicePkgs.themes.comfy; + colorScheme = "Hikari"; + }; +} diff --git a/modules/nixos/catppuccin.nix b/modules/nixos/catppuccin.nix index e842872..d673bbd 100644 --- a/modules/nixos/catppuccin.nix +++ b/modules/nixos/catppuccin.nix @@ -1,6 +1,5 @@ -{ inputs, ... }: -{ - imports = [ inputs.catppuccin.nixosModules.catppuccin ]; +{inputs, ...}: { + imports = [inputs.catppuccin.nixosModules.catppuccin]; config.catppuccin = { enable = true; diff --git a/modules/nixos/games/default.nix b/modules/nixos/games/default.nix index a87b37a..8d2298f 100644 --- a/modules/nixos/games/default.nix +++ b/modules/nixos/games/default.nix @@ -1,8 +1,12 @@ -{ config, pkgs, inputs, ... }: { - +{ + config, + pkgs, + inputs, + ... +}: { nixpkgs = { - overlays = [ inputs.nur.overlays.default ]; - config = { allowUnfree = true; }; + overlays = [inputs.nur.overlays.default]; + config = {allowUnfree = true;}; }; environment.systemPackages = with pkgs; [ diff --git a/modules/nixos/services/bluetooth.nix b/modules/nixos/services/bluetooth.nix index 5008bfa..ecd3e80 100644 --- a/modules/nixos/services/bluetooth.nix +++ b/modules/nixos/services/bluetooth.nix @@ -1,7 +1,11 @@ -{ pkgs, config, ... }: { +{ + pkgs, + config, + ... +}: { hardware.bluetooth = { enable = true; - settings = { General = { Experimental = true; }; }; + settings = {General = {Experimental = true;};}; }; services.blueman.enable = true; } diff --git a/modules/nixos/services/default.nix b/modules/nixos/services/default.nix index e3bb1e9..2bb835a 100644 --- a/modules/nixos/services/default.nix +++ b/modules/nixos/services/default.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{...}: { imports = [ ./pipewire.nix ./tailscale.nix diff --git a/modules/nixos/services/jellyfin.nix b/modules/nixos/services/jellyfin.nix index 316c654..c613188 100644 --- a/modules/nixos/services/jellyfin.nix +++ b/modules/nixos/services/jellyfin.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { services.jellyfin = { enable = true; openFirewall = true; diff --git a/modules/nixos/services/pipewire.nix b/modules/nixos/services/pipewire.nix index 89a22da..62d1372 100644 --- a/modules/nixos/services/pipewire.nix +++ b/modules/nixos/services/pipewire.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: { +{ + config, + lib, + pkgs, + ... +}: { services = { pipewire = { enable = true; @@ -17,10 +22,12 @@ }; }; pipewire-pulse."92-low-latency" = { - "context.properties" = [{ - name = "libpipewire-module-protocol-pulse"; - args = { }; - }]; + "context.properties" = [ + { + name = "libpipewire-module-protocol-pulse"; + args = {}; + } + ]; "pulse.properties" = { "pulse.min.req" = "32/48000"; "pulse.default.req" = "32/48000"; diff --git a/modules/nixos/services/tailscale.nix b/modules/nixos/services/tailscale.nix index d466f3e..d8f4bad 100644 --- a/modules/nixos/services/tailscale.nix +++ b/modules/nixos/services/tailscale.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { services.tailscale = { enable = true; useRoutingFeatures = "client"; diff --git a/modules/nixos/virtualisation.nix b/modules/nixos/virtualisation.nix index 6531d55..28389e6 100644 --- a/modules/nixos/virtualisation.nix +++ b/modules/nixos/virtualisation.nix @@ -1,12 +1,17 @@ -{ pkgs, lib, config, ... }: -let enableIOMMU = true; +{ + pkgs, + lib, + config, + ... +}: let + enableIOMMU = true; in { boot = lib.mkIf enableIOMMU { - initrd.kernelModules = lib.mkBefore [ - "kvm-amd" - "vfio_pci" - "vfio_iommu_type1" - "vfio" + initrd.kernelModules = lib.mkBefore [ + "kvm-amd" + "vfio_pci" + "vfio_iommu_type1" + "vfio" ]; kernelParams = [ "amd_iommu=on" @@ -35,13 +40,12 @@ in { }; }; - docker = { enable = true; }; + docker = {enable = true;}; }; - programs = { virt-manager = { enable = true; }; }; + programs = {virt-manager = {enable = true;};}; - users.users.pingu.extraGroups = - [ "qemu-libvirtd" "libvirtd" "disk" "kvm" "docker" ]; + users.users.pingu.extraGroups = ["qemu-libvirtd" "libvirtd" "disk" "kvm" "docker"]; environment.systemPackages = with pkgs; [ python3 # scripts, cba to use nix shell all the time diff --git a/secrets/secrets.nix b/secrets/secrets.nix index ac2de43..9a7c29b 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -1,5 +1,9 @@ -{ inputs, config, ... }: { - imports = [ inputs.sops-nix.nixosModules.sops ]; +{ + inputs, + config, + ... +}: { + imports = [inputs.sops-nix.nixosModules.sops]; sops = { defaultSopsFile = ./secrets.yaml;