From 3e35c316b26a6983f78a837565bb0dcd4082f107 Mon Sep 17 00:00:00 2001 From: Mads Fagerlund Date: Thu, 2 Jul 2026 01:37:59 +0200 Subject: [PATCH] update --- config/hypr/hyprland.conf | 8 ++-- flake.nix | 59 ++++++++++++++++++++++++++-- hosts/mbp/hardware-configuration.nix | 40 +++++++++++++------ 3 files changed, 86 insertions(+), 21 deletions(-) diff --git a/config/hypr/hyprland.conf b/config/hypr/hyprland.conf index c98ee51..c3e066d 100644 --- a/config/hypr/hyprland.conf +++ b/config/hypr/hyprland.conf @@ -26,6 +26,7 @@ input { natural_scroll = true scroll_factor = 0.9 tap-to-click = false + clickfinger_behavior = true # 2-finger click = right-click, 3-finger = middle (Mac-like) disable_while_typing = true } } @@ -57,20 +58,17 @@ ecosystem { no_donation_nag = true } - # -- Environment -- -env = XCURSOR_THEME,Bibata-Modern-Classic -env = XCURSOR_SIZE,24 env = QT_QPA_PLATFORMTHEME,qt6ct env = QT_STYLE_OVERRIDE,Adwaita-Dark env = XDG_SCREENSHOTS_DIR,$HOME/Pictures/Screenshots # -- Autostart -- +exec-once = uwsm finalize exec-once = swaybg -c '#16181a' exec-once = GDK_BACKEND=wayland eww daemon exec-once = systemctl --user start hyprpolkitagent exec-once = hypridle -exec-once = hyprctl setcursor Bibata-Modern-Classic 24 # -- Core -- bind = SUPER, Return, exec, kitty @@ -80,7 +78,7 @@ bindr = SUPER, B, exec, eww close battery-popup bind = SUPER, Q, killactive bind = SUPER, F, fullscreen, 1 bind = SUPER SHIFT, Space, togglefloating -bind = CTRL, L, exec, hyprlock +bind = SUPER, Escape, exec, hyprlock # -- Focus -- bind = SUPER, h, movefocus, l diff --git a/flake.nix b/flake.nix index e3b5e6a..452c6e9 100644 --- a/flake.nix +++ b/flake.nix @@ -33,6 +33,11 @@ imports = [ zen-browser.homeModules.beta ]; home.stateVersion = "25.11"; + programs.eww = { + enable = true; + package = pkgs.eww; + }; + # Raw configs that stay files (no good native module). xdg.configFile = { "hypr".source = ./config/hypr; @@ -40,6 +45,15 @@ "fuzzel".source = ./config/fuzzel; }; + home.pointerCursor = { + package = pkgs.bibata-cursors; + name = "Bibata-Modern-Ice"; + size = 24; + gtk.enable = true; + x11.enable = true; + hyprcursor.enable = true; + }; + # Dark GTK apps (gimp, file dialogs). gtk = { enable = true; @@ -79,14 +93,29 @@ "browser.newtabpage.enabled" = false; "privacy.donottrackheader.enabled" = true; "signon.rememberSignons" = false; + + # Dark mode + "browser.theme.toolbar-theme" = 0; + "browser.theme.content-theme" = 0; + "layout.css.prefers-color-scheme.content-override" = 0; + "ui.systemUsesDarkTheme" = 1; }; - extensions.packages = with firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [ + # Re-instantiate pkgs with the firefox-addons overlay + allowUnfree so + # the (unfree) 1Password addon evaluates under *our* config. + extensions.packages = let + addonsPkgs = import pkgs.path { + inherit (pkgs.stdenv.hostPlatform) system; + config.allowUnfree = true; + overlays = [ firefox-addons.overlays.default ]; + }; + in with addonsPkgs.firefox-addons; [ tridactyl ublock-origin + onepassword-password-manager ]; }; }; - + # zsh + starship, no framework. programs.zsh = { enable = true; @@ -96,7 +125,7 @@ }; programs.starship.enable = true; - home.packages = with pkgs; [ ripgrep fd tridactyl-native ]; + home.packages = with pkgs; [ ripgrep fd tridactyl-native lazygit rustc cargo clippy rustfmt rust-analyzer claude-code]; }; # ───────────────────── shared system (both hosts) ───────────────────── @@ -106,6 +135,20 @@ networking.networkmanager.enable = true; networking.networkmanager.wifi.backend = "iwd"; + programs._1password.enable = true; + programs._1password-gui = { + enable = true; + polkitPolicyOwners = [ "mads" ]; + }; + # Zen (a Firefox fork) runs as "zen-beta"; 1Password only trusts an + # allowlist of browser process names, so add it or the extension can't + # unlock via the desktop app. Manifest already lives in ~/.mozilla. + environment.etc."1password/custom_allowed_browsers".text = '' + zen-beta + ''; + + services.tailscale.enable = true; + time.timeZone = "Europe/Copenhagen"; # set yours i18n.defaultLocale = "en_US.UTF-8"; @@ -117,6 +160,7 @@ extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; }; + # greetd autologins mads straight into Hyprland (via uwsm). services.greetd = { enable = true; @@ -152,8 +196,15 @@ mkHost = { system, modules }: nixpkgs.lib.nixosSystem { inherit system; - modules = [ home-manager.nixosModules.home-manager common ] ++ modules; + modules = [ + home-manager.nixosModules.home-manager + common + ({ pkgs, ... }: { + nixpkgs.config.allowUnfree = true; + }) + ] ++ modules; }; + in { nixosConfigurations = { diff --git a/hosts/mbp/hardware-configuration.nix b/hosts/mbp/hardware-configuration.nix index 32e2e3e..43b2a88 100644 --- a/hosts/mbp/hardware-configuration.nix +++ b/hosts/mbp/hardware-configuration.nix @@ -1,14 +1,30 @@ -# DUMMY hardware config — just enough for the flake to `nix eval`/build on a -# non-target machine. It is OVERWRITTEN at install: -# -# nixos-generate-config --root /mnt -# cp /mnt/etc/nixos/hardware-configuration.nix ~/nixos/ -# -# The real file has your actual disk UUIDs and the Asahi EFI/boot mounts. -{ ... }: +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + { - fileSystems."/" = { - device = "/dev/disk/by-label/nixos"; - fsType = "ext4"; - }; + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "usb_storage" "sdhci_pci" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/2664fdc1-4309-4682-a02e-4e27eb1e14f6"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/0BB8-A960"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux"; }