From 442bbceb387d1612c57e69aeea6079f09f59ec3a Mon Sep 17 00:00:00 2001 From: Gabriella Bere Date: Thu, 29 Aug 2024 23:06:08 +0100 Subject: [PATCH] add user to dialout group for access to Duet3DMC6HC --- home-manager/eza.nix | 9 ++++ home-manager/home.nix | 30 +++++++++++- home-manager/hyprland.nix | 30 +++++------- home-manager/zsh.nix | 45 +++++++++-------- hosts/gabbielaptop/configuration.nix | 72 ++++++---------------------- 5 files changed, 92 insertions(+), 94 deletions(-) create mode 100644 home-manager/eza.nix diff --git a/home-manager/eza.nix b/home-manager/eza.nix new file mode 100644 index 0000000..d69d7a6 --- /dev/null +++ b/home-manager/eza.nix @@ -0,0 +1,9 @@ +{ pkgs, ... }: +{ + programs.eza = { + enable = true; + enableZshIntegration = true; + git = true; + icons = true; + }; +} diff --git a/home-manager/home.nix b/home-manager/home.nix index 3e7f6b9..d27634f 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -11,15 +11,40 @@ ./flatpak.nix ./sober.nix # ./librewolf.nix + ./zsh.nix + ./eza.nix ]; # States home manager version that config was originally compatible with, do not change without reading all patch notes since this version and altering as needed home.stateVersion = "24.05"; - + + home.pointerCursor = + let + getFrom = url: hash: name: { + gtk.enable = true; + x11.enable = true; + name = name; + size = 48; + package = + pkgs.runCommand "moveUp" {} '' + mkdir -p $out/share/icons + ln -s ${pkgs.fetchzip { + url = url; + hash = hash; + }} $out/share/icons/${name} + ''; + }; + in + getFrom + "https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz" + "sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk=" + "Fuchsia-Pop"; + # General use home packages that dont require a separate module home.packages = [ # Add grimblast screenshot tool pkgs.grimblast + pkgs.powerline-fonts ]; home.sessionVariables = { @@ -47,6 +72,9 @@ lines = 3; columns = 200; }; + font.normal = { + family = "hack"; + }; # keyboard.bindings = [ # { # key = "K"; diff --git a/home-manager/hyprland.nix b/home-manager/hyprland.nix index 918a9ed..ad60b95 100644 --- a/home-manager/hyprland.nix +++ b/home-manager/hyprland.nix @@ -15,22 +15,16 @@ monitor = eDP-2, 2560x1600@165, 0x0, auto # main laptop monitor monitor = DP-3, 1920x1080@119.98, -1280x-1080, auto # left external monitor monitor = DP-2, 1920x1080@119.98, 640x-1080, auto # right external monitor - - debug:disable_logs = false - - # Move/resize windows with mainMod + LMB/RMB and dragging - bindm = $mod, mouse:272, movewindow - bindm = $mod, mouse:273, resizewindow - - xwayland { - force_zero_scaling = true - } ''; }; # Hyprland configuration wayland.windowManager.hyprland.settings = { "$mod" = "SUPER"; input = { kb_layout = "gb"; }; + bindm = [ + "$mod, mouse:272, movewindow" + "$mod, mouse:273, resizewindow" + ]; bind = [ # Keybinds for starting programs @@ -53,17 +47,19 @@ # workspaces # binds $mod + [shift +] {1..10} to [move to] workspace {1..10} builtins.concatLists (builtins.genList ( - x: let - ws = let - c = (x + 1) / 10; - in - builtins.toString (x + 1 - (c * 10)); + x: let + ws = let + c = (x + 1) / 10; + in + builtins.toString (x + 1 - (c * 10)); in [ "$mod, ${ws}, workspace, ${toString (x + 1)}" "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}" ] - ) - 10) + ) 10) ); + xwayland = { + force_zero_scaling = true; + }; }; } diff --git a/home-manager/zsh.nix b/home-manager/zsh.nix index 94b558a..f3954e5 100644 --- a/home-manager/zsh.nix +++ b/home-manager/zsh.nix @@ -5,25 +5,32 @@ enable = true; autocd = true; dotDir = ".config/zsh"; - enableAutosuggestions = true; + autosuggestion.enable = true; enableCompletion = true; -# shellAliases = { -# sl = "exa"; -# ls = "exa"; -# l = "exa -l"; -# la = "exa -la"; -# ip = "ip --color=auto"; -# }; + shellAliases = { + ls = "eza -lh"; + ip = "ip --color=auto"; - plugins = with pkgs; [ - { - name = "zsh-syntax-highlighting"; - src = fetchFromGitHub { - owner = "zsh-users"; - repo = "zsh-syntax-highlighting"; - rev = "0.6.0"; - sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4"; - }; - file = "agkozak-zsh-prompt.plugin.zsh"; - } + # Aliases for my nixos workflow, requires nh and home-manager + switch = "nh os switch"; + homeswitch = "home-manager switch --flake /home/blue/nixos"; + }; + + plugins = with pkgs; [ + { + name = "zsh-syntax-highlighting"; + src = fetchFromGitHub { + owner = "zsh-users"; + repo = "zsh-syntax-highlighting"; + rev = "0.6.0"; + sha256 = "0zmq66dzasmr5pwribyh4kbkk23jxbpdw4rjxx0i7dx8jjp2lzl4"; + }; + file = "agkozak-zsh-prompt.plugin.zsh"; + } + ]; + oh-my-zsh = { + enable = true; + theme = "agnoster"; + }; + }; } diff --git a/hosts/gabbielaptop/configuration.nix b/hosts/gabbielaptop/configuration.nix index 6629bc1..3674bea 100644 --- a/hosts/gabbielaptop/configuration.nix +++ b/hosts/gabbielaptop/configuration.nix @@ -20,6 +20,7 @@ # default kernel causes issues with wpa_supplicant meaning shutdown times are > 10 mins updating to kernel 69+ fixes this boot.kernelPackages = pkgs.linuxKernel.packages.linux_6_10; + # I was told that adding these helps but it doesnt seemt to work as monitors are still buggy at 144hz, may as well keep them boot.kernelParams = [ "video=DP-2:1920x1080@144" "video=DP-3:1920x1080@144" @@ -101,7 +102,7 @@ users.users.blue = { isNormalUser = true; description = "Gabriella Bere"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = [ "networkmanager" "wheel" "dialout" ]; shell = pkgs.zsh; }; @@ -128,68 +129,25 @@ # Enable flatpak for delcarative-flatpak used in home-manager services.flatpak.enable = true; - # Monolithic packaged declaration, using merge because it amuses me but this needs to be split up -# lib.mkMerge [ -# { -# environment.systemPackages = with pkgs; [ -# neovim # nano is installed by default -# wget -# vesktop -# prismlauncher -# thunderbird -# kdePackages.bluedevil -# fastfetch -# ungoogled-chromium -# qbittorrent -# obsidian -# p7zip -# unrar -# wineWowPackages.stable -# wine -# (wine.override { wineBuild = "wine64"; }) -# wine64 -# wineWowPackages.staging -# winetricks -# wineWowPackages.waylandFull -# vlc -# krename -# kdePackages.filelight -# protonmail-bridge -# obs-studio -# pciutils -# vial -# git -# qmk -# dmidecode -# wl-clipboard -# lutris -# tree -# tenacity -# mediawriter -# home-manager -# ]; -# } -# { -# environment.systemPackages = with stable; [ -# librewolf -# ]; -# } -# ]; + # Enable qmk for managing framework laptop keyboards hardware.keyboard.qmk.enable = true; + # Enable steam and enable steam remoteplay programs.steam.enable = true; programs.steam.remotePlay.openFirewall = true; + services.protonmail-bridge.enable = true; + # protonmail daemon config - systemd.user.services.protonmail-bridge = { - enable = true; - wantedBy = [ "default.target" ]; - description = "autostart protonmail-bridge on login as a daemon"; - serviceConfig = { - Type = "simple"; - ExecStart = "/nix/store/protonmail-bridge --noninteractive --no-window"; - }; - }; +# systemd.user.services.protonmail-bridge = { +# enable = true; +# wantedBy = [ "default.target" ]; +# description = "autostart protonmail-bridge on login as a daemon"; +# serviceConfig = { +# Type = "simple"; +# ExecStart = "${lib.getExe pkgs.protonmail-bridge} --noninteractive --no-window"; +# }; +# }; # Some programs need SUID wrappers, can be configured further or are # started in user sessions.