diff --git a/config/config.nix b/config/config.nix index 7362dcb..ba3d958 100644 --- a/config/config.nix +++ b/config/config.nix @@ -18,8 +18,6 @@ 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. @@ -27,7 +25,6 @@ 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 9bf0da5..4b8f079 100644 --- a/config/packages.nix +++ b/config/packages.nix @@ -1,14 +1,5 @@ -{ 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 { +{ pkgs, lib, ... }: +{ environment.systemPackages = with pkgs; let aspell' = aspellWithDicts.override { aspell = aspell.overrideAttrs (super: { @@ -38,7 +29,6 @@ in { playerctl pamixer ffmpeg - macos-hyprcursor # System management htop-vim @@ -60,6 +50,12 @@ in { ]; + 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 c6b37c8..0c48442 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1761005073, - "narHash": "sha256-r6qbieh8iC1q1eCaWv15f4UIp8SeGffwswhNSA1Qk3s=", + "lastModified": 1769723138, + "narHash": "sha256-kgkwjs33YfJasADIrHjHcTIDs3wNX0xzJhnUP+oldEw=", "owner": "nix-community", "repo": "home-manager", - "rev": "84e1adb0cdd13f5f29886091c7234365e12b1e7f", + "rev": "175532b6275b34598a0ceb1aef4b9b4006dd4073", "type": "github" }, "original": { @@ -40,11 +40,11 @@ "mobile-nixos": { "flake": false, "locked": { - "lastModified": 1759261417, - "narHash": "sha256-TjuoBb8+isL3KTdGgtYh90XPyeUMFbgNAOG9l23CB3A=", + "lastModified": 1763065138, + "narHash": "sha256-46lJeUYH8YrfTccAoKQbO9lprq4dlo9VVLk+StPBSWM=", "owner": "mobile-nixos", "repo": "mobile-nixos", - "rev": "e6f6d527bf6abf94dd52fbba3143a720cef96431", + "rev": "1943b7b06fcd1a2c87f4b89df58231915cc2ca44", "type": "github" }, "original": { @@ -55,26 +55,26 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1760958188, - "narHash": "sha256-2m1S4jl+GEDtlt2QqeHil8Ny456dcGSKJAM7q3j/BFU=", - "owner": "NixOS", + "lastModified": 1769724555, + "narHash": "sha256-aH00WqZJmnefVAXZSV2I46KwIm6b960oUeoQMRjROno=", + "owner": "tokinanpa", "repo": "nixos-hardware", - "rev": "d6645c340ef7d821602fd2cd199e8d1eed10afbc", + "rev": "1b68ec5cdf683546c904bf763a6ff38f81345f94", "type": "github" }, "original": { - "owner": "NixOS", + "owner": "tokinanpa", "repo": "nixos-hardware", "type": "github" } }, "nixpkgs": { "locked": { - "lastModified": 1760878510, - "narHash": "sha256-K5Osef2qexezUfs0alLvZ7nQFTGS9DL2oTVsIXsqLgs=", + "lastModified": 1769461804, + "narHash": "sha256-msG8SU5WsBUfVVa/9RPLaymvi5bI8edTavbIq3vRlhI=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "5e2a59a5b1a82f89f2c7e598302a9cacebb72a67", + "rev": "bfc1b8a4574108ceef22f02bafcf6611380c100d", "type": "github" }, "original": { @@ -112,11 +112,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1762840613, - "narHash": "sha256-Gda8Ewcs/V4p1Ek18BU+/J874a+KkSm8bA6m9zTsLqU=", - "rev": "589aaaf95f487a5f939a2bc4ae0b7ee0b71e0f4c", + "lastModified": 1769736324, + "narHash": "sha256-byOA1tbnxteN/0bSG4ezx0/GyG79wOEgDA2imeGmSKg=", + "rev": "24d4c6cc3bc3dd52d5921511d90bf887e42fc7df", "type": "tarball", - "url": "https://git.tokinanpa.dev/api/v1/repos/toki/quickshell-toki-night/archive/589aaaf95f487a5f939a2bc4ae0b7ee0b71e0f4c.tar.gz" + "url": "https://git.tokinanpa.dev/api/v1/repos/toki/quickshell-toki-night/archive/24d4c6cc3bc3dd52d5921511d90bf887e42fc7df.tar.gz" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index 7b4c9ac..6ca3f4f 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,9 @@ description = "System conf"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - nixos-hardware.url = "github:NixOS/nixos-hardware"; + # TODO: Move back to origin when merged + nixos-hardware.url = "github:tokinanpa/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 5c8614b..1604d65 100644 --- a/hardware-configuration/air.nix +++ b/hardware-configuration/air.nix @@ -5,5 +5,6 @@ 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 8b0ad3d..ad2bc43 100644 --- a/hardware-configuration/earth.nix +++ b/hardware-configuration/earth.nix @@ -18,6 +18,7 @@ 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 d0f73d2..2442818 100644 --- a/hardware-configuration/fire.nix +++ b/hardware-configuration/fire.nix @@ -1,12 +1,15 @@ { config, lib, pkgs, modulesPath, ... }: { - boot.loader.grub.useOSProber = true; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + hardware.enableRedistributableFirmware = true; hardware.enableAllFirmware = true; hardware.microsoft-surface.kernelVersion = "stable"; - boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; @@ -26,6 +29,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 1e01678..806fd6b 100644 --- a/home-manager/wayland/hyprland.nix +++ b/home-manager/wayland/hyprland.nix @@ -1,8 +1,22 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, macos-hyprcursor-src, ... }: 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; @@ -16,7 +30,7 @@ in { env = [ "HYPRCURSOR_THEME,macos" - "HYPRCURSOR_SIZE,12" + "HYPRCURSOR_SIZE,24" ]; general = { @@ -32,9 +46,10 @@ in { "col.active_border" = "rgb(b4f9f8)"; }; - windowrulev2 = [ - "bordercolor rgb(f7768e), fullscreen:1" - "noanim, initialClass:ueberzug(.*)" + 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" ]; cursor = { @@ -66,10 +81,6 @@ in { font_size = 14; }; - layerrule = [ - "noanim, ^(notifications)$" - ]; - animations = { bezier = [ "overshot, 0.13, 0.99, 0.29, 1.06" ]; animation = [ @@ -84,7 +95,6 @@ in { misc = { disable_hyprland_logo = true; disable_autoreload = true; - new_window_takes_over_fullscreen = 2; focus_on_activate = true; }; @@ -138,6 +148,9 @@ 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 1957dcd..ca968a6 100644 --- a/home-manager/wayland/quickshell.nix +++ b/home-manager/wayland/quickshell.nix @@ -1,5 +1,7 @@ { 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" ]; @@ -10,6 +12,6 @@ PartOf = [ "graphical-session.target" ]; }; - Service.ExecStart = lib.getExe quickshell-toki-night.packages.${pkgs.system}.default; + Service.ExecStart = lib.getExe quickshell; }; } diff --git a/home-manager/wayland/scripts/gamemode b/home-manager/wayland/scripts/gamemode new file mode 100755 index 0000000..9181a54 --- /dev/null +++ b/home-manager/wayland/scripts/gamemode @@ -0,0 +1,23 @@ +#!/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