diff --git a/config/config.nix b/config/config.nix index ba3d958..7362dcb 100644 --- a/config/config.nix +++ b/config/config.nix @@ -18,6 +18,8 @@ in experimental-features = nix-command flakes ca-derivations restrict-eval = false ''; + + nixpkgs.system = if isMobile then "aarch64-linux" else "x86_64-linux"; nixpkgs.config.allowUnfree = true; # Use the systemd-boot EFI boot loader. @@ -25,6 +27,7 @@ in boot.loader.efi.canTouchEfiVariables = !isMobile; networking.hostName = "toki-${machine}"; + networking.wireless.enable = false; networking.networkmanager.enable = true; # Power button settings diff --git a/config/packages.nix b/config/packages.nix index 4b8f079..9bf0da5 100644 --- a/config/packages.nix +++ b/config/packages.nix @@ -1,5 +1,14 @@ -{ pkgs, lib, ... }: -{ +{ pkgs, lib, macos-hyprcursor-src, ... }: +let + macos-hyprcursor = pkgs.stdenv.mkDerivation { + name = "macos-hyprcursor"; + src = macos-hyprcursor-src; + installPhase = '' + mkdir -p $out/share/icons + cp -R themes/SVG/"macOS (SVG)" $out/share/icons/macos + ''; + }; +in { environment.systemPackages = with pkgs; let aspell' = aspellWithDicts.override { aspell = aspell.overrideAttrs (super: { @@ -29,6 +38,7 @@ playerctl pamixer ffmpeg + macos-hyprcursor # System management htop-vim @@ -50,12 +60,6 @@ ]; - programs.steam.enable = true; - programs.steam.remotePlay.openFirewall = true; - programs.steam.gamescopeSession.enable = true; - programs.steam.extest.enable = true; - programs.steam.protontricks.enable = true; - programs.hyprland.enable = true; security.pam.services.hyprlock = {}; diff --git a/flake.lock b/flake.lock index 0c48442..c6b37c8 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1769723138, - "narHash": "sha256-kgkwjs33YfJasADIrHjHcTIDs3wNX0xzJhnUP+oldEw=", + "lastModified": 1761005073, + "narHash": "sha256-r6qbieh8iC1q1eCaWv15f4UIp8SeGffwswhNSA1Qk3s=", "owner": "nix-community", "repo": "home-manager", - "rev": "175532b6275b34598a0ceb1aef4b9b4006dd4073", + "rev": "84e1adb0cdd13f5f29886091c7234365e12b1e7f", "type": "github" }, "original": { @@ -40,11 +40,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1763065138, - "narHash": "sha256-46lJeUYH8YrfTccAoKQbO9lprq4dlo9VVLk+StPBSWM=", + "lastModified": 1759261417, + "narHash": "sha256-TjuoBb8+isL3KTdGgtYh90XPyeUMFbgNAOG9l23CB3A=", "owner": "mobile-nixos", "repo": "mobile-nixos", - "rev": "1943b7b06fcd1a2c87f4b89df58231915cc2ca44", + "rev": "e6f6d527bf6abf94dd52fbba3143a720cef96431", "type": "github" }, "original": { @@ -55,26 +55,26 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1769724555, - "narHash": "sha256-aH00WqZJmnefVAXZSV2I46KwIm6b960oUeoQMRjROno=", - "owner": "tokinanpa", + "lastModified": 1760958188, + "narHash": "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU=", + "owner": "NixOS", "repo": "nixos-hardware", - "rev": "1b68ec5cdf683546c904bf763a6ff38f81345f94", + "rev": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", "type": "github" }, "original": { - "owner": "tokinanpa", + "owner": "NixOS", "repo": "nixos-hardware", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1769461804, - "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", + "lastModified": 1760878510, + "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", + "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", "type": "github" }, "original": { @@ -112,11 +112,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1769736324, - "narHash": "sha256-byOA1tbnxteN/0bSG4ezx0/GyG79wOEgDA2imeGmSKg=", - "rev": "24d4c6cc3bc3dd52d5921511d90bf887e42fc7df", + "lastModified": 1762840613, + "narHash": "sha256-Gda8Ewcs/V4p1Ek18BU+/J874a+KkSm8bA6m9zTsLqU=", + "rev": "589aaaf95f487a5f939a2bc4ae0b7ee0b71e0f4c", "type": "tarball", - "url": "https://git.tokinanpa.dev/api/v1/repos/toki/quickshell-toki-night/archive/24d4c6cc3bc3dd52d5921511d90bf887e42fc7df.tar.gz" + "url": "https://git.tokinanpa.dev/api/v1/repos/toki/quickshell-toki-night/archive/589aaaf95f487a5f939a2bc4ae0b7ee0b71e0f4c.tar.gz" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index 6ca3f4f..7b4c9ac 100644 --- a/flake.nix +++ b/flake.nix @@ -3,9 +3,7 @@ description = "System conf"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - # TODO: Move back to origin when merged - nixos-hardware.url = "github:tokinanpa/nixos-hardware"; - + nixos-hardware.url = "github:NixOS/nixos-hardware"; mobile-nixos.url = "github:mobile-nixos/mobile-nixos"; mobile-nixos.flake = false; diff --git a/hardware-configuration/air.nix b/hardware-configuration/air.nix index 1604d65..5c8614b 100644 --- a/hardware-configuration/air.nix +++ b/hardware-configuration/air.nix @@ -5,6 +5,5 @@ fsType = "ext4"; }; - nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; nix.settings.max-jobs = lib.mkDefault 3; } diff --git a/hardware-configuration/earth.nix b/hardware-configuration/earth.nix index ad2bc43..8b0ad3d 100644 --- a/hardware-configuration/earth.nix +++ b/hardware-configuration/earth.nix @@ -18,7 +18,6 @@ swapDevices = [ ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.enableRedistributableFirmware = lib.mkDefault true; hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hardware-configuration/fire.nix b/hardware-configuration/fire.nix index 2442818..d0f73d2 100644 --- a/hardware-configuration/fire.nix +++ b/hardware-configuration/fire.nix @@ -1,15 +1,12 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - + boot.loader.grub.useOSProber = true; hardware.enableRedistributableFirmware = true; hardware.enableAllFirmware = true; hardware.microsoft-surface.kernelVersion = "stable"; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -29,6 +26,6 @@ [ { device = "/dev/disk/by-uuid/3a81bb60-49e4-41fc-8716-8db7dd5f698f"; } ]; - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + virtualisation.hypervGuest.enable = true; } diff --git a/home-manager/wayland/hyprland.nix b/home-manager/wayland/hyprland.nix index 806fd6b..1e01678 100644 --- a/home-manager/wayland/hyprland.nix +++ b/home-manager/wayland/hyprland.nix @@ -1,22 +1,8 @@ -{ pkgs, lib, macos-hyprcursor-src, ... }: +{ pkgs, lib, ... }: let scripts = ./scripts; shell = "quickshell"; - - # Cursor Theme - macos-hyprcursor = pkgs.stdenv.mkDerivation { - name = "macos-hyprcursor"; - src = macos-hyprcursor-src; - installPhase = '' - mkdir -p $out/share/icons - cp -R themes/SVG/"macOS (SVG)" $out/share/icons/macos - cp -R themes/SVG/"macOS Hyprcursor (SVG) (White)" $out/share/icons/macos-white - ''; - }; in { - - home.packages = [ macos-hyprcursor ]; - wayland.windowManager.hyprland = { enable = true; systemd.enable = true; @@ -30,7 +16,7 @@ in { env = [ "HYPRCURSOR_THEME,macos" - "HYPRCURSOR_SIZE,24" + "HYPRCURSOR_SIZE,12" ]; general = { @@ -46,10 +32,9 @@ in { "col.active_border" = "rgb(b4f9f8)"; }; - windowrule = [ - "match:fullscreen 1, border_color rgb(f7768e)" - "match:initial_class ueberzug(.*), float on, no_focus on, tag +noeffects" - "match:tag noeffects, no_anim on, decorate off, rounding 0" + windowrulev2 = [ + "bordercolor rgb(f7768e), fullscreen:1" + "noanim, initialClass:ueberzug(.*)" ]; cursor = { @@ -81,6 +66,10 @@ in { font_size = 14; }; + layerrule = [ + "noanim, ^(notifications)$" + ]; + animations = { bezier = [ "overshot, 0.13, 0.99, 0.29, 1.06" ]; animation = [ @@ -95,6 +84,7 @@ in { misc = { disable_hyprland_logo = true; disable_autoreload = true; + new_window_takes_over_fullscreen = 2; focus_on_activate = true; }; @@ -148,9 +138,6 @@ in { # Workspace manipulation "$mod, N, global, ${shell}:newworkspace" "$mod Shift, N, global, ${shell}:movetonewworkspace" - - # Game Mode - "$mod, F1, exec, ${scripts}/gamemode" ] ++ builtins.concatMap (n: let diff --git a/home-manager/wayland/quickshell.nix b/home-manager/wayland/quickshell.nix index ca968a6..1957dcd 100644 --- a/home-manager/wayland/quickshell.nix +++ b/home-manager/wayland/quickshell.nix @@ -1,7 +1,5 @@ { pkgs, lib, quickshell-toki-night, ... }: -let - quickshell = quickshell-toki-night.packages.${pkgs.stdenv.hostPlatform.system}.default; -in { +{ systemd.user.services.quickshell = { Install.WantedBy = [ "graphical-session.target" ]; @@ -12,6 +10,6 @@ in { PartOf = [ "graphical-session.target" ]; }; - Service.ExecStart = lib.getExe quickshell; + Service.ExecStart = lib.getExe quickshell-toki-night.packages.${pkgs.system}.default; }; } diff --git a/home-manager/wayland/scripts/gamemode b/home-manager/wayland/scripts/gamemode deleted file mode 100755 index 9181a54..0000000 --- a/home-manager/wayland/scripts/gamemode +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/env bash -HYPRGAMEMODE=$(hyprctl getoption animations:enabled | awk 'NR==1{print $2}') -if [ "$HYPRGAMEMODE" = 1 ] ; then - hyprctl --batch "\ - keyword animations:enabled 0;\ - keyword animation borderangle,0; \ - keyword decoration:shadow:enabled 0;\ - keyword decoration:blur:enabled 0;\ - keyword decoration:fullscreen_opacity 1;\ - keyword general:gaps_in 0;\ - keyword general:gaps_out 0;\ - keyword general:border_size 0;\ - keyword decoration:rounding 0" - hyprctl dispatch global "quickshell:hidden" - hyprctl notify 1 2000 "rgb(73daca)" "Gamemode [ON]" - exit -else - hyprctl notify 1 2000 "rgb(f7768e)" "Gamemode [OFF]" - hyprctl dispatch global "quickshell:hiddenoff" - hyprctl reload - exit 0 -fi -exit 1