diff --git a/home/bolt.nix b/home/bolt.nix old mode 100644 new mode 100755 index f935ab2..b3786fb --- a/home/bolt.nix +++ b/home/bolt.nix @@ -14,7 +14,6 @@ home.packages = with pkgs; [ cmus zellij - steam xonotic nicotine-plus ]; diff --git a/home/config.nix b/home/config.nix old mode 100644 new mode 100755 diff --git a/home/home.nix b/home/home.nix index 536480a..56a7ce6 100755 --- a/home/home.nix +++ b/home/home.nix @@ -1,11 +1,19 @@ { config, pkgs, ... }: +let + flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; + hyprland = (import flake-compat { + src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; + }).defaultNix; + kitty_notest = pkgs.kitty.overridePythonAttrs (oldAttrs: { doCheck = false; checkPhase = ""; }); +in { imports = [ # who are you? ./bolt.nix # ./fossil.nix # ./plank.nix + hyprland.homeManagerModules.default ]; nixpkgs.config.packageOverrides = pkgs: { @@ -14,17 +22,130 @@ }; }; + wayland.windowManager.hyprland = { + enable = true; + systemdIntegration = true; + nvidiaPatches = true; + extraConfig = '' + exec-once = waybar + exec-once = keepassxc + exec-once = mako + exec-once = ckb-next -c -b + exec-once = swaybg -i $HOME/Downloads/00026.png + exec-once = xrdb $HOME/.Xresources + + input { + kb_layout=us + kb_options=caps:escape,escape:caps + } + + general { + no_border_on_floating=true + layout=dwindle + border_size=3 + gaps_in=10 + gaps_out=20 + } + + dwindle { + preserve_split=true + pseudotile=true + use_active_for_splits=true + } + + decoration { + rounding=8 + blur=0 + } + + animations { + enabled=1 + bezier=overshot,0.05,0.9,0.1,1.1 + bezier=smooth,0.06,0.94,0.1,1.0 + bezier=slosmooth,0.1,0.89,0.14,0.96 + animation=windows,1,6,overshot,popin + animation=workspaces,1,6,smooth,slidevert + animation=specialWorkspace,1,6,overshot,slide + } + + misc { + disable_hyprland_logo=true + disable_splash_rendering=true + } + + monitor=,highrr,auto,1 + + bind=SUPER,Return,exec,kitty + bind=SUPER,F,exec,firefox + bind=SUPER,D,exec,fuzzel + + bind=SUPER_SHIFT,Q,killactive + bind=SUPER_SHIFT,space,fullscreen,0 + bind=SUPER,space,togglefloating + + bind=SUPER,h,movefocus,l + bind=SUPER,l,movefocus,r + bind=SUPER,j,movefocus,d + bind=SUPER,k,movefocus,u + bind=SUPER_SHIFT,h,movewindow,l + bind=SUPER_SHIFT,l,movewindow,r + bind=SUPER_SHIFT,j,movewindow,d + bind=SUPER_SHIFT,k,movewindow,u + + bind=SUPER,s,togglesplit + + bind=SUPER,1,workspace,1 + bind=SUPER,2,workspace,2 + bind=SUPER,3,workspace,3 + bind=SUPER,4,workspace,4 + bind=SUPER_SHIFT,1,movetoworkspacesilent,1 + bind=SUPER_SHIFT,2,movetoworkspacesilent,2 + bind=SUPER_SHIFT,3,movetoworkspacesilent,3 + bind=SUPER_SHIFT,4,movetoworkspacesilent,4 + + bind=SUPER_CTRL,h,resizeactive,-40 0 + bind=SUPER_CTRL,l,resizeactive,40 0 + bind=SUPER_CTRL,j,resizeactive,0 -40 + bind=SUPER_CTRL,k,resizeactive,0 40 + + bind=SUPER,minus,togglespecialworkspace + bind=SUPER_SHIFT,minus,movetoworkspace,special + + bind=SUPER_SHIFT,S,exec,grim -g "$(slurp)" -t png -o "$HOME/Pictures/$(date +%F_%H-%m-%S).png" && notify-send "Screenshot taken." + bind=SUPER_SHIFT_CTRL,S,exec,wf-recorder -a -f "$HOME/Videos/recording_($date +%F_%H-%m-%S).mp4" && notify-send "Recording desktop.." + bind=SUPER_SHIFT,E,exec,wlogout + + bind=,XF86AudioMute,exec,pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send "Audio" "Mute $(if [ $(pactl get-sink-mute @DEFAULT_SINK@ | rg yes | wc -l) -eq 1 ]; then printf on; else printf off; fi)." + bind=,XF86AudioRaiseVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ +5% && notify-send "Audio" "Volume at $(pactl get-sink-volume @DEFAULT_SINK@ | cut -d' ' -f 6)" + bind=,XF86AudioLowerVolume,exec,pactl set-sink-volume @DEFAULT_SINK@ -5% && notify-send "Audio" "Volume at $(pactl get-sink-volume @DEFAULT_SINK@ | cut -d' ' -f 6)" + bind=,XF86AudioStop,exec,cmus-remote -s && notify-send "Music" "Playback stopped." + bind=,XF86AudioPlay,exec,cmus-remote -u && notify-send "Music" "Playback status: $(cmus-remote -Q | head -n 1 | cut -d' ' -f 2)" + bind=,XF86AudioPrev,exec,cmus-remote -r && notify-send "Music" "Now playing:\n$(cmus-remote -Q | rg -e 'artist|title' | cut -d' ' -f 3-)" + bind=,XF86AudioNext,exec,cmus-remote -n && notify-send "Music" "Now playing:\n$(cmus-remote -Q | rg -e 'artist|title' | cut -d' ' -f 3-)" + ''; + }; nixpkgs.config.allowUnfree = true; home.packages = with pkgs; [ - kitty thunderbird clementine inkscape + grim + slurp + mako + swaybg + wlogout + wf-recorder + libnotify + fuzzel + waybar + + pulseaudio # yuck! just for pactl.. + btop bat joshuto @@ -33,9 +154,8 @@ lazygit fzf - latte-dock - kdeconnect + # kdeconnect # maybe once i get an android keepassxc direnv @@ -54,52 +174,63 @@ gtk-engine-murrine - plasma-browser-integration + # plasma-browser-integration (callPackage ./homepkgs/git-credential-keepassxc.nix { }) (callPackage ./homepkgs/culr.nix { }) + (callPackage ./homepkgs/glpaper.nix { }) ]; xdg.enable = true; + programs.mako = { + enable = true; + anchor = "bottom-right"; + borderRadius = 8; + borderSize = 2; + defaultTimeout = 3500; + ignoreTimeout = true; + font = "Visby Regular 14"; + }; + programs.vscode = { enable = true; - enableExtensionUpdateCheck = false; - enableUpdateCheck = false; + # enableExtensionUpdateCheck = false; + # enableUpdateCheck = false; package = pkgs.vscodium; extensions = []; mutableExtensionsDir = false; }; - xdg.desktopEntries = { - vscodium-url = { - name = "VsCodium"; - genericName = "Text Editor"; - exec = "codium --disable-gpu-sandbox --open-url %U"; - icon = "code"; - comment = "Code Editing. Redefined."; - categories = [ "Utility" "TextEditor" "Development" "IDE" ]; - # keywords = [ "vscode" ]; - mimeType = [ "x-scheme-handler/vscode" ]; - noDisplay = true; - startupNotify = true; - type = "Application"; - }; - vscodium = { - categories = [ "Utility" "TextEditor" "Development" "IDE" ]; - comment = "Code Editing. Redefined."; - exec = "codium --disable-gpu-sandbox %F"; - genericName = "Text Editor"; - icon = "code"; - # keywords = [ "vscode" ]; - mimeType = [ "text/plain" "inode/directory" ]; - name = "VsCodium"; - startupNotify = true; - # startupWMClass = "vscodium"; - type = "Application"; - }; - }; + # xdg.desktopEntries = { + # vscodium-url = { + # name = "VsCodium"; + # genericName = "Text Editor"; + # exec = "codium --disable-gpu-sandbox --open-url %U"; + # icon = "code"; + # comment = "Code Editing. Redefined."; + # categories = [ "Utility" "TextEditor" "Development" "IDE" ]; + # # keywords = [ "vscode" ]; + # mimeType = [ "x-scheme-handler/vscode" ]; + # noDisplay = true; + # startupNotify = true; + # type = "Application"; + # }; + # vscodium = { + # categories = [ "Utility" "TextEditor" "Development" "IDE" ]; + # comment = "Code Editing. Redefined."; + # exec = "codium --disable-gpu-sandbox %F"; + # genericName = "Text Editor"; + # icon = "code"; + # # keywords = [ "vscode" ]; + # mimeType = [ "text/plain" "inode/directory" ]; + # name = "VsCodium"; + # startupNotify = true; + # # startupWMClass = "vscodium"; + # type = "Application"; + # }; + # }; programs.direnv = { enable = true; @@ -110,10 +241,10 @@ gtk = { enable = true; - theme = { - package = (pkgs.callPackage ./homepkgs/simplewaita-gtk.nix {}); - name = "simplewaita"; - }; + # theme = { + # package = (pkgs.callPackage ./homepkgs/simplewaita-gtk.nix {}); + # name = "simplewaita"; + # }; }; programs.firefox = @@ -156,6 +287,7 @@ programs.kitty = { enable = true; + package = kitty_notest; font = { name = "Ellograph CF"; size = 10; @@ -167,20 +299,20 @@ selection_foreground = "#fdbc4b"; selection_background = "#1e2233"; color0 = "#2f343f"; - color8 = "#1e2233"; color1 = "#ed244e"; - color9 = "#da4453"; color2 = "#27ae60"; - color10 = "#71f79f"; color3 = "#f67400"; - color11 = "#fdbc4b"; color4 = "#2980b9"; - color12 = "#1d99f3"; color5 = "#c50ed2"; - color13 = "#9b59b6"; color6 = "#3daee9"; - color14 = "#5294e2"; color7 = "#a1a9b1"; + color8 = "#1e2233"; + color9 = "#da4453"; + color10 = "#71f79f"; + color11 = "#fdbc4b"; + color12 = "#1d99f3"; + color13 = "#9b59b6"; + color14 = "#5294e2"; color15 = "#656a73"; }; }; @@ -202,21 +334,21 @@ programs.fzf = { enable = true; enableZshIntegration = true; - colors = { - fg = "#d3dae3"; - "fg+" = "#d3dae3"; - bg = "#060604"; - "bg+" = "#060604"; - preview-fg = "#fdbc4b"; - preview-bg = "#1e2233"; - hl = "#da4453"; - "hl+" = "#ed244e"; - info = "#fdbc4b"; - border = "#656a73"; - prompt = "#c50ed2"; - pointer = "#27ae60"; - header = "#da4453"; - }; + # colors = { + # fg = "#d3dae3"; + # "fg+" = "#d3dae3"; + # bg = "#060604"; + # "bg+" = "#060604"; + # preview-fg = "#fdbc4b"; + # preview-bg = "#1e2233"; + # hl = "#da4453"; + # "hl+" = "#ed244e"; + # info = "#fdbc4b"; + # border = "#656a73"; + # prompt = "#c50ed2"; + # pointer = "#27ae60"; + # header = "#da4453"; + # }; }; programs.zsh = { @@ -268,7 +400,7 @@ alias l=\"ls_culr\" alias la=\"la_culr\" alias p=\"ps_culr\" alias mnt=\"mount | column -t | culr\" -alias kaboom=\"sudo nixos-rebuild switch --upgrade-all -j9 && rm ~/.gtkrc-2.0; home-manager switch && sudo nix-collect-garbage && nix-store --optimise\" +alias kaboom=\"printf 'type any input if you wish to update\n\npress enter to continue\n'; read upgrade; if [ -n \\\"\\\$upgrade\\\" ]; then echo upgrading..; sudo nix-channel --update; else echo no upgrade!; fi; sudo nixos-rebuild switch -j9 && rm ~/.gtkrc-2.0; home-manager switch && sudo nix-collect-garbage && nix-store --optimise\" fresh "; @@ -379,9 +511,9 @@ fresh theme = "bogster"; }; - home.sessionVariables = { - GTK_THEME = "simplewaita"; - }; + # home.sessionVariables = { + # GTK_THEME = "simplewaita"; + # }; home.stateVersion = "22.11"; diff --git a/home/homepkgs/simplewaita-gtk.nix b/home/homepkgs/simplewaita-gtk.nix old mode 100644 new mode 100755 diff --git a/system/configuration.nix b/system/configuration.nix index 616233a..510a50d 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -1,6 +1,11 @@ { config, pkgs, ... }: - +let + flake-compat = builtins.fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz"; + hyprland = (import flake-compat { + src = builtins.fetchTarball "https://github.com/hyprwm/Hyprland/archive/master.tar.gz"; + }).defaultNix; +in { @@ -17,6 +22,8 @@ # declarative cachix (import (builtins.fetchTarball "https://github.com/jonascarpay/declarative-cachix/archive/master.tar.gz")) + + hyprland.nixosModules.default ]; cachix = [ @@ -29,9 +36,13 @@ keep-derivations = true ''; + environment.sessionVariables = rec { + WLR_NO_HARDWARE_CURSORS = "1"; + }; + environment.pathsToLink = [ "/share/zsh" ]; boot.loader.systemd-boot.enable = true; - boot.loader.systemd-boot.configurationLimit = 2; + boot.loader.systemd-boot.configurationLimit = 5; boot.loader.systemd-boot.consoleMode = "max"; boot.loader.timeout = 3; @@ -58,33 +69,45 @@ hardware.opengl.driSupport32Bit = true; #input stuff - # services.xserver.xkbOptions = { - # "eurosign:e"; - # "caps:escape" # map caps to escape. - # }; + services.xserver.xkbOptions = "caps:escape"; services.xserver.enable = true; services.xserver.layout = "us"; services.xserver.libinput.enable = true; # kde time services.xserver.desktopManager.plasma5.enable = true; - services.xserver.displayManager.sddm = { + services.xserver.displayManager.lightdm.enable = false; + services.xserver.displayManager.sddm.enable = false; + services.xserver.displayManager.gdm.enable = false; + # services.xserver.displayManager.sddm = { + # enable = true; + # theme = "${(pkgs.fetchFromGitHub { + # owner = "EricKotato"; + # repo = "sddm-slice"; + # rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443"; + # sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U="; + # })}"; + # autoNumlock = true; + # settings = { + # General = { + # InputMethod = ""; + # }; + # }; + # }; + # services.xserver.desktopManager.plasma5.runUsingSystemd = true; + services.greetd = { enable = true; - theme = "${(pkgs.fetchFromGitHub { - owner = "EricKotato"; - repo = "sddm-slice"; - rev = "763b8f4e01c00c1f8590fc7a103e14f6e8449443"; - sha256 = "sha256-UW53ZdKb3RSrrcZ9GxZsJyjzS/uKR8lkaLLyi+2o27U="; - })}"; - autoNumlock = true; settings = { - General = { - InputMethod = ""; + default_session = { + # command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd 'dbus-run-session startplasma-wayland'"; + command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --cmd Hyprland"; + user = "greeter"; }; }; }; - services.xserver.desktopManager.plasma5.runUsingSystemd = true; programs.dconf.enable = true; + xdg.autostart.enable = true; + services.resolved = { enable = true; fallbackDns = [ "103.1.206.179" "168.138.8.38" "168.138.12.137" ]; @@ -103,14 +126,18 @@ }; # gtk compatibility - qt5.enable = true; - qt5.platformTheme = "kde"; - #qt5.style = "gtk2"; + qt.enable = true; + qt.platformTheme = "kde"; programs.zsh.enable = true; users.defaultUserShell = pkgs.zsh; services.tailscale.enable = true; + programs.hyprland = { + enable = true; + package = hyprland.packages.${pkgs.system}.default; + nvidiaPatches = true; + }; environment.systemPackages = with pkgs; [ diff --git a/system/quiver.nix b/system/quiver.nix index eaab01e..0b3ddea 100755 --- a/system/quiver.nix +++ b/system/quiver.nix @@ -1,11 +1,15 @@ { config, lib, pkgs, modulesPath, ... }: +# let +# unstable-small = import { config = { allowUnfree = true; }; }; +# in { nixpkgs.overlays = [ (self: super: { system76-scheduler = pkgs.callPackage ./syspkgs/system76-scheduler.nix {}; kwin-system76-scheduler-integration = pkgs.libsForQt5.callPackage ./syspkgs/kwin-system76-scheduler-integration.nix {}; + # systemd = unstable-small.systemd; }) ]; @@ -85,10 +89,30 @@ }; hardware.ckb-next.enable = true; + + xdg.portal = { + enable = true; + gtkUsePortal = true; + wlr = { + enable = true; + settings = { + screencast = { + output_name = "DP-1"; + max_fps = 60; + chooser_type = "simple"; + chooser_amd = "${pkgs.slurp}/bin/slurp -f %o -or"; + }; + }; + }; + extraPortals = with pkgs; [ + xdg-desktop-portal-wlr + xdg-desktop-portal-kde + xdg-desktop-portal-gtk + ]; + }; environment.systemPackages = with pkgs; [ - xdg-desktop-portal-kde ckb-next openrgb wl-clipboard @@ -105,17 +129,12 @@ }; fileSystems."/" = - { device = "/dev/disk/by-uuid/06f59431-d939-4b48-9d91-e23606dd3ce0"; + { device = "/dev/disk/by-uuid/d227445f-6120-4768-8e1b-011f097505c1"; fsType = "ext4"; }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/f063e0c7-8590-4ed4-860c-5ae0c9b66898"; - fsType = "ext4"; - }; fileSystems."/boot" = - { device = "/dev/disk/by-uuid/5008-1946"; + { device = "/dev/disk/by-uuid/6B75-AF9F"; fsType = "vfat"; }; @@ -125,11 +144,11 @@ options = [ "rw" "uid=1001" "gid=100" ]; }; - swapDevices = [ { - device = "/home/swapfile"; - size = 4096; - } - ]; + # swapDevices = [ { + # device = "/dev/disk/by-uuid/7fde28ec-80f9-4228-8597-c3a57bfbf619"; + # size = 4096; + # } + # ]; networking.firewall = { allowedUDPPorts = [ 1900 ]; diff --git a/system/syspkgs/headscale-ui.nix b/system/syspkgs/headscale-ui.nix old mode 100644 new mode 100755 diff --git a/system/syspkgs/kwin-system76-scheduler-integration.nix b/system/syspkgs/kwin-system76-scheduler-integration.nix old mode 100644 new mode 100755 diff --git a/system/syspkgs/system76-scheduler.nix b/system/syspkgs/system76-scheduler.nix old mode 100644 new mode 100755