From cc6327e169b678a55b831ef9c06ab01dbd485a58 Mon Sep 17 00:00:00 2001 From: Varris Date: Fri, 19 Jan 2024 12:17:30 +0100 Subject: [PATCH] update --- flake.lock | 33 ++++--------- flake.nix | 11 +++-- system/configuration.nix | 1 + user/configs/firefox/default.nix | 8 ++- user/configs/fish/default.nix | 9 +--- user/configs/helix/default.nix | 57 ++++++++++++++++++++++ user/configs/wayland/eww/config/eww.yuck | 10 ++-- user/configs/wayland/hyprland/default.nix | 1 + user/configs/wayland/hyprland/settings.nix | 3 +- user/configs/wezterm/default.nix | 26 ++++++++++ user/home.nix | 4 +- 11 files changed, 120 insertions(+), 43 deletions(-) create mode 100644 user/configs/helix/default.nix create mode 100755 user/configs/wezterm/default.nix diff --git a/flake.lock b/flake.lock index 693dc1a..5ccb6c1 100755 --- a/flake.lock +++ b/flake.lock @@ -333,16 +333,15 @@ ] }, "locked": { - "lastModified": 1705659542, - "narHash": "sha256-WA3xVfAk1AYmFdwghT7mt/erYpsU6JPu9mdTEP/e9HQ=", + "lastModified": 1705660020, + "narHash": "sha256-1tOuNh+UbiZlaC8RrpQzzypgnLBC67eRlBunfkE4sbQ=", "owner": "nix-community", "repo": "home-manager", - "rev": "10cd9c53115061aa6a0a90aad0b0dde6a999cdb9", + "rev": "2064348e555b6aa963da6372a8f14e6acb80a176", "type": "github" }, "original": { "owner": "nix-community", - "ref": "release-23.11", "repo": "home-manager", "type": "github" } @@ -350,7 +349,9 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs_3", + "nixpkgs": [ + "nixpkgs" + ], "systems": "systems_5", "wlroots": "wlroots", "xdph": "xdph" @@ -371,7 +372,7 @@ }, "hyprland-contrib": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_3" }, "locked": { "lastModified": 1705319592, @@ -552,22 +553,6 @@ } }, "nixpkgs_3": { - "locked": { - "lastModified": 1705133751, - "narHash": "sha256-rCIsyE80jgiOU78gCWN3A0wE0tR2GI5nH6MlS+HaaSQ=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9b19f5e77dd906cb52dade0b7bd280339d2a1f3d", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_4": { "locked": { "lastModified": 1658161305, "narHash": "sha256-X/nhnMCa1Wx4YapsspyAs6QYz6T/85FofrI6NpdPDHg=", @@ -583,7 +568,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_4": { "locked": { "lastModified": 1705635624, "narHash": "sha256-DU0schxQOtBNO1c9hUsgYl+QMOXQMfRT7Qw/mg+ayno=", @@ -660,7 +645,7 @@ "hyprland-contrib": "hyprland-contrib", "mygui-git": "mygui-git", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_4", "nur": "nur", "nvim-presence": "nvim-presence", "openmw-git": "openmw-git" diff --git a/flake.nix b/flake.nix index 4799cc7..996dbf9 100755 --- a/flake.nix +++ b/flake.nix @@ -2,10 +2,9 @@ description = "My personal dotfiles"; inputs = { - nixpkgs.url = "nixpkgs/nixos-23.11"; - nixpkgs-unstable.url = "nixpkgs/nixpkgs-unstable"; + nixpkgs.url = "nixpkgs/nixpkgs-unstable"; - home-manager.url = "github:nix-community/home-manager/release-23.11"; + home-manager.url = "github:nix-community/home-manager"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; chaotic-nyx.url = "github:chaotic-cx/nyx/nyxpkgs-unstable"; @@ -14,6 +13,7 @@ nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; hyprland.url = "github:hyprwm/hyprland"; + hyprland.inputs.nixpkgs.follows = "nixpkgs"; hyprland-contrib.url = "github:hyprwm/contrib"; eww-systray.url = "github:ralismark/eww/tray-3"; @@ -21,6 +21,11 @@ nur.url = "github:nix-community/NUR"; + helix.url = "github:helix-editor/helix"; + helix.inputs.nixpkgs.follows = "nixpkgs"; + + firefox-nightly.url = "github:nix-community/flake-firefox-nightly"; + gruvbox-kvantum.url = "github:thefallnn/Gruvbox-Kvantum"; gruvbox-kvantum.flake = false; diff --git a/system/configuration.nix b/system/configuration.nix index 88a66ff..c539859 100755 --- a/system/configuration.nix +++ b/system/configuration.nix @@ -114,6 +114,7 @@ libsForQt5.dolphin libsForQt5.kio-extras lm_sensors + nix-search-cli nvtop-amd openrgb p7zip diff --git a/user/configs/firefox/default.nix b/user/configs/firefox/default.nix index 9424080..9de3868 100755 --- a/user/configs/firefox/default.nix +++ b/user/configs/firefox/default.nix @@ -1,6 +1,12 @@ -{config, ...}: { +{ + config, + inputs, + pkgs, + ... +}: { programs.firefox = { enable = true; + # package = inputs.firefox-nightly.packages.${pkgs.system}.firefox-nightly-bin; profiles.${config.home.username} = { extensions = with config.nur.repos.rycee.firefox-addons; [ diff --git a/user/configs/fish/default.nix b/user/configs/fish/default.nix index aa0acf0..017f1a7 100755 --- a/user/configs/fish/default.nix +++ b/user/configs/fish/default.nix @@ -31,13 +31,6 @@ functions = { fish_greeting = ""; - ec = '' - pushd . &> /dev/null - cd "${config.home.homeDirectory}/.dotfiles" - nvim "+Telescope find_files" - popd - ''; - nor = '' doas nixos-rebuild switch --flake ${config.home.homeDirectory}/.dotfiles ''; @@ -52,8 +45,8 @@ ''; }; shellAliases = { + ec = "hx ~/.dotfiles"; nf = "${pkgs.fastfetch}/bin/fastfetch"; - e = "nvim"; ls = "${pkgs.eza}/bin/eza --icons"; ll = "${pkgs.eza}/bin/eza --icons -l"; r = "${pkgs.lf}/bin/lf"; diff --git a/user/configs/helix/default.nix b/user/configs/helix/default.nix new file mode 100644 index 0000000..e6890fd --- /dev/null +++ b/user/configs/helix/default.nix @@ -0,0 +1,57 @@ +{ + config, + inputs, + pkgs, + ... +}: { + programs.helix = { + enable = true; + package = inputs.helix.packages.${pkgs.system}.helix; + defaultEditor = true; + + settings = { + theme = "gruvbox"; + + editor = { + line-number = "relative"; + color-modes = true; + bufferline = "multiple"; + mouse = false; + + indent-guides.render = true; + + statusline = { + left = ["mode" "spinner"]; + center = ["file-name"]; + right = []; + + mode.normal = "NORMAL"; + mode.insert = "INSERT"; + mode.select = "SELECT"; + }; + + lsp = { + display-messages = true; + }; + }; + + keys.normal = { + "esc" = ["collapse_selection" "keep_primary_selection"]; + space."e" = ":open ~/.dotfiles"; + }; + }; + + languages = { + language = [ + { + name = "nix"; + language-servers = ["nixd"]; + } + ]; + + language-server.nixd = { + command = "${pkgs.nixd}/bin/nixd"; + }; + }; + }; +} diff --git a/user/configs/wayland/eww/config/eww.yuck b/user/configs/wayland/eww/config/eww.yuck index fe02626..e6667eb 100644 --- a/user/configs/wayland/eww/config/eww.yuck +++ b/user/configs/wayland/eww/config/eww.yuck @@ -9,7 +9,7 @@ ;; -------------------------- -(defwidget bar [monitor] +(defwidget panel [monitor] (centerbox :class "panel" (panel_left :monitor monitor) @@ -96,7 +96,7 @@ ;; -------------------------- -(defwindow bar0 +(defwindow panel0 :monitor 0 :exclusive true :geometry @@ -105,10 +105,10 @@ :height "36px" :anchor "top center" ) - (bar :monitor 0) + (panel :monitor 0) ) -(defwindow bar1 +(defwindow panel1 :monitor 1 :exclusive true :geometry @@ -117,5 +117,5 @@ :height "36px" :anchor "top center" ) - (bar :monitor 1) + (panel :monitor 1) ) diff --git a/user/configs/wayland/hyprland/default.nix b/user/configs/wayland/hyprland/default.nix index 6a6bde4..c165cf5 100755 --- a/user/configs/wayland/hyprland/default.nix +++ b/user/configs/wayland/hyprland/default.nix @@ -13,6 +13,7 @@ wayland.windowManager.hyprland = { enable = true; package = inputs.hyprland.packages.${pkgs.system}.hyprland; + #package = inputs.nixpkgs.legacyPackages.${pkgs.system}.hyprland; }; home.file.".local/share/kservices5/swww.desktop".text = '' diff --git a/user/configs/wayland/hyprland/settings.nix b/user/configs/wayland/hyprland/settings.nix index 21608b5..4d6b599 100644 --- a/user/configs/wayland/hyprland/settings.nix +++ b/user/configs/wayland/hyprland/settings.nix @@ -106,7 +106,7 @@ in { exec = [ "${pkgs.xorg.xrandr}/bin/xrandr --output ${rightMonitor.display} --primary" - "pkill eww; sleep 1; eww open-many bar0 bar1 &> /dev/null" + "pkill eww; sleep 1; eww open-many panel0 panel1 &> /dev/null" "sleep 2; pkill swww-daemon; swww init" #Set cursor @@ -174,6 +174,7 @@ in { windowrulev2 = [ "fullscreen, class:^(hl2_linux)$" "float, class:^(org.kde.dolphin)$" + "nomaximizerequest, class:.*" ]; }; }; diff --git a/user/configs/wezterm/default.nix b/user/configs/wezterm/default.nix new file mode 100755 index 0000000..c441eda --- /dev/null +++ b/user/configs/wezterm/default.nix @@ -0,0 +1,26 @@ +{ + config, + pkgs, + inputs, + ... +}: { + programs.wezterm = { + enable = true; + extraConfig = + /* + lua + */ + '' + local wezterm = require("wezterm") + local config = {} + + if wezterm.config_builder then + config = wezterm.config_builder() + end + + config.color_scheme = 'Gruvbox Dark (Gogh)' + + return config + ''; + }; +} diff --git a/user/home.nix b/user/home.nix index c69859c..d1322c2 100755 --- a/user/home.nix +++ b/user/home.nix @@ -12,11 +12,13 @@ ./configs/firefox ./configs/fish ./configs/kitty + ./configs/wezterm ./configs/kvantum ./configs/lf ./configs/mpd ./configs/mpv - ./configs/neovim + # ./configs/neovim + ./configs/helix ./configs/rofi ./configs/tmux ./configs/wayland/hyprland