From 951475157bce5f169a2e0e4aecc921a9d5c3e50f Mon Sep 17 00:00:00 2001 From: doloro Date: Sat, 20 Sep 2025 18:42:57 +0100 Subject: [PATCH] nix meow --- nix/flake.lock | 23 +++++++++++++- nix/flake.nix | 8 +++-- nix/home.nix | 3 ++ nix/modules/chromium/home.nix | 17 +++++++++++ nix/modules/hyprland/settings.nix | 50 ++++++++++++++++--------------- nix/modules/neovim/home.nix | 8 +++++ nix/modules/neovim/result | 1 + nix/modules/quickshell/home.nix | 24 +++++++++++++++ nix/result | 2 +- 9 files changed, 108 insertions(+), 28 deletions(-) create mode 100644 nix/modules/chromium/home.nix create mode 100644 nix/modules/neovim/home.nix create mode 120000 nix/modules/neovim/result create mode 100644 nix/modules/quickshell/home.nix diff --git a/nix/flake.lock b/nix/flake.lock index 494579c..ecefe28 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -405,11 +405,32 @@ "type": "github" } }, + "quickshell": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1758273351, + "narHash": "sha256-wOv1guIi9THD1NjOtBU2Xh/Avg9xv7nIjsfFSkr1NeQ=", + "ref": "refs/heads/master", + "rev": "e9a574d919a89602d2868621576b2ccae54a5cb0", + "revCount": 675, + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + }, + "original": { + "type": "git", + "url": "https://git.outfoxxed.me/outfoxxed/quickshell" + } + }, "root": { "inputs": { "home-manager": "home-manager", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "quickshell": "quickshell" } }, "systems": { diff --git a/nix/flake.nix b/nix/flake.nix index 33de0f7..227f843 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -9,19 +9,23 @@ inputs.nixpkgs.follows = "nixpkgs"; }; hyprland.url = "github:hyprwm/Hyprland"; + quickshell = { + url = "git+https://git.outfoxxed.me/outfoxxed/quickshell"; + inputs.nixpkgs.follows = "nixpkgs"; + }; }; outputs = inputs@{ nixpkgs, home-manager, ... }: let system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; + pkgs = import nixpkgs { inherit system; config = { allowUnfree = true; }; }; in { homeConfigurations."doloro" = home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { - inherit inputs; + inherit inputs system; }; # Specify your home configuration modules here, for example, diff --git a/nix/home.nix b/nix/home.nix index 38ec227..bcf93f1 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -3,6 +3,9 @@ { imports = [ ./modules/hyprland/home.nix + ./modules/quickshell/home.nix + ./modules/chromium/home.nix + ./modules/neovim/home.nix ]; # Home Manager needs a bit of information about you and the paths it should # manage. diff --git a/nix/modules/chromium/home.nix b/nix/modules/chromium/home.nix new file mode 100644 index 0000000..4d62d5e --- /dev/null +++ b/nix/modules/chromium/home.nix @@ -0,0 +1,17 @@ +{ inputs, pkgs, system, ... }: +let + +in +{ + programs.chromium = { + enable = true; + extensions = [ + { id = "ghmbeldphafepmbegfdlkpapadhbakde"; } # ProtonPass + { id = "cjpalhdlnbpafiamejdnhcphjbkeiagm"; } # Ublock + { id = "kpmjjdhbcfebfjgdnpjagcndoelnidfj"; } # Control panel for twitter + { id = "aighbdamfnndbemigjcbkdklkegkgmpl"; } # Better twitter embeds + { id = "enamippconapkdmgfgjchkhakpfinmaj"; } # DeArrow + ]; + package = pkgs.chromium.override { enableWideVine = true; }; + }; +} diff --git a/nix/modules/hyprland/settings.nix b/nix/modules/hyprland/settings.nix index 818967e..9f04482 100644 --- a/nix/modules/hyprland/settings.nix +++ b/nix/modules/hyprland/settings.nix @@ -20,8 +20,8 @@ # col.inactive_border = rgba(595959aa) resize_on_border = false; allow_tearing = true; - layout = dwindle; - } + layout = "dwindle"; + }; decoration = { rounding = 0; rounding_power = 1; @@ -30,21 +30,21 @@ shadow = { enable = false; - } + }; blur = { enable = false; - } - } + }; + }; animations = { - enabled = yes; + enabled = true; bezier = [ "easeOutQuint,0.23,1,0.32,1" "easeInOutCubic,0.65,0.05,0.36,1" "linear,0,0,1,1" "almostLinear,0.5,0.5,0.75,1.0" "quick,0.15,0,0.1,1" - ] + ]; animation = [ "global, 1, 10, default" "border, 1, 5.39, easeOutQuint" @@ -63,26 +63,26 @@ "workspacesIn, 1, 1.21, almostLinear, fade" "workspacesOut, 1, 1.94, almostLinear, fade" "zoomFactor, 1, 7, quick" - ] - } + ]; + }; dwindle = { pseudotile = true; preserve_split = true; - } - master = { - new_status = master - } + }; + # master = { + # new_status = master; + # }; misc = { force_default_wallpaper = -1; disable_hyprland_logo = false; enable_anr_dialog = false; - } + }; input = { - kb_layout = gb; + kb_layout = "gb"; follow_mouse = 2; sensitivity = -0.5; - } - "$mainMod = SUPER" + }; + "$mainMod" = "SUPER"; binds = [ "$mainMod, Q, exec, $terminal" "$mainMod, C, killactive," @@ -105,18 +105,20 @@ "$mainMod, mouse:272, movewindow" "$mainMod, mouse:273, resizewindow" ", F8, sendshortcut, , F8, class:^(com\.obsproject\.Studio)$" + "$mainMod, 0, workspace, 10" + "$mainMod, SHIFT, 0, movetoworkspace, 10" ] ++ ( builtins.concatLists ( - builtins.genLists(i: let ws = i + 1 in [ - "$mainMod, ${toString i}, workspace, ${toString ws}" - "$mainMod SHIFT, ${toString i}, movetoworkspace, ${toString ws}" + builtins.genList(i: let ws = i + 1; in [ + "$mainMod, ${toString ws}, workspace, ${toString ws}" + "$mainMod SHIFT, ${toString ws}, movetoworkspace, ${toString ws}" ] ) 9 ) ); workspace = [ "name:2, monitor:DP-3" - ] + ]; windowrule = [ "suppressevent maximize, class:.*" "workspace 5 silent, class:^(gamescope)$" @@ -125,12 +127,12 @@ "workspace 8 silent, class:^(vesktop)$" "workspace 8 silent, class:^(org.telegram.desktop)$" "workspace 10 silent, class:^(com\.obsproject\.Studio)$" - ] + ]; windowrulev2 = [ "noinitialfocus, class:.*" - ] + ]; # exec-once = [ # ]; # we need to auto launch: quickshell, steam, ar_rpc (maybe), vesktop, telegram, qbit, and obs - } + }; } diff --git a/nix/modules/neovim/home.nix b/nix/modules/neovim/home.nix new file mode 100644 index 0000000..b7c330d --- /dev/null +++ b/nix/modules/neovim/home.nix @@ -0,0 +1,8 @@ +{ inputs, pkgs, ... }: +let + +in { + home.packages = [ + pkgs.neovim + ]; +} diff --git a/nix/modules/neovim/result b/nix/modules/neovim/result new file mode 120000 index 0000000..166d5d0 --- /dev/null +++ b/nix/modules/neovim/result @@ -0,0 +1 @@ +/nix/store/7kpkw7k1pdp5ryd7mv3p2glhsbjqlj8z-home-manager-generation \ No newline at end of file diff --git a/nix/modules/quickshell/home.nix b/nix/modules/quickshell/home.nix new file mode 100644 index 0000000..0bb6e95 --- /dev/null +++ b/nix/modules/quickshell/home.nix @@ -0,0 +1,24 @@ +{ inputs, config, pkgs, system, ... }: +let + pkg = inputs.quickshell.packages.${system}.quickshell; +in +{ + xdg.configFile."quickshell" = { + recursive = true; + source = config.lib.file.mkOutOfStoreSymlink "/home/doloro/dotfiles/quickshell/"; + }; + systemd.user.services.quickshell = { + Unit = { + Description = "Quickshell daemon"; + After = [ "hyprland-session.target" ]; + }; + Install = { + WantedBy = [ "default.target" ]; + }; + Service = { + ExecStart = "${pkg}/bin/quickshell"; + Restart = "on-failure"; + RestartSec = "5s"; + }; + }; +} diff --git a/nix/result b/nix/result index 5a70b15..d9bde64 120000 --- a/nix/result +++ b/nix/result @@ -1 +1 @@ -/nix/store/rw16biqjpvfsg51rxvgsawfpxfsbgf9k-home-manager-generation \ No newline at end of file +/nix/store/pb01777vslzr04k4jzi9kdyn8qk3c5a1-home-manager-generation \ No newline at end of file