From dcce72e3004c4c3681b4a4312d897cf6e2e7eb03 Mon Sep 17 00:00:00 2001 From: zoe Date: Sun, 26 Mar 2023 15:37:29 +0200 Subject: [PATCH] build helix from main --- configuration.nix | 4 +- flake.nix | 18 +++------ helix/settings.nix | 91 ++++++++++++++++++++++------------------------ home.nix | 10 ++--- i3/config.nix | 8 ++-- user.nix | 4 +- 6 files changed, 62 insertions(+), 73 deletions(-) diff --git a/configuration.nix b/configuration.nix index 70a21c4..4d78325 100644 --- a/configuration.nix +++ b/configuration.nix @@ -17,9 +17,9 @@ nix.settings = { substituters = [ - "https://hyprland.cachix.org" + "https://helix.cachix.org" ]; - trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ]; + trusted-public-keys = [ "helix.cachix.org-1:ejp9KQpR1FBI2onstMQ34yogDm4OgU2ru6lIwPvuCVs=" ]; }; nix.settings.experimental-features = [ "nix-command" "flakes" ]; diff --git a/flake.nix b/flake.nix index 8a2a1d0..9dc565c 100644 --- a/flake.nix +++ b/flake.nix @@ -6,22 +6,17 @@ supercolor.url = "github:zoe-bat/supercolor"; kaokao.url = "github:zoe-bat/kaokao"; i3layouts-rofi.url = "github:zoe-bat/i3layouts-rofi"; + hx.url = "github:helix-editor/helix"; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = - { self - , nixpkgs - # , hyprland - , home-manager - , supercolor - , i3layouts-rofi - , nixpkgs-unstable - , kaokao + outputs = { self, nixpkgs + # , hyprland + , home-manager, supercolor, i3layouts-rofi, nixpkgs-unstable, kaokao, hx }@inputs: - let + let system = "x86_64-linux"; overlay-unstable = final: prev: { unstable = import nixpkgs-unstable { @@ -29,8 +24,7 @@ config.allowUnfree = true; }; }; - in - { + in { nixosConfigurations.bat = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; modules = [ diff --git a/helix/settings.nix b/helix/settings.nix index 7177c43..6c2ed75 100644 --- a/helix/settings.nix +++ b/helix/settings.nix @@ -1,52 +1,47 @@ -{ pkgs, ... }: { - enable = true; - package = pkgs.unstable.helix; - settings = { - theme = "catppuccin_frappe"; - keys = { - normal = { - w = ":w"; - q = ":q"; +{ pkgs, hx, ... }: { + home-manager.users.zoe.programs.helix = { + enable = true; + package = hx.packages.${pkgs.system}.default; + settings = { + theme = "catppuccin_frappe"; + keys = { normal = { }; }; + editor = { + auto-completion = true; + auto-format = true; }; }; - editor = { - auto-completion = true; - auto-format = true; - }; + languages = [ + { + name = "html"; + language-server = { command = "html-languageserver"; }; + formatter = { + command = "prettier"; + args = [ "--parser" "html" ]; + }; + } + { + name = "scss"; + language-server = { command = "vscode-css-language-server"; }; + formatter = { + command = "prettier"; + args = [ "--parser" "scss" ]; + }; + } + { + name = "css"; + language-server = { + command = "vscode-css-language-server"; + args = [ "--stdio" ]; + }; + formatter = { + command = "prettier"; + args = [ "--parser" "scss" ]; + }; + } + { + name = "nix"; + formatter = { command = "nixfmt"; }; + } + ]; }; - languages = [ - { - name = "html"; - language-server = { command = "html-languageserver"; }; - formatter = { - command = "prettier"; - args = [ "--parser" "html" ]; - }; - } - { - name = "scss"; - language-server = { - command = "vscode-css-language-server"; - }; - formatter = { - command = "prettier"; - args = [ "--parser" "scss" ]; - }; - } - { - name = "css"; - language-server = { - command = "vscode-css-language-server"; - args = ["--stdio"]; - }; - formatter = { - command = "prettier"; - args = [ "--parser" "scss" ]; - }; - } - { - name = "nix"; - formatter = { command = "nixfmt"; }; - } - ]; } diff --git a/home.nix b/home.nix index 0743d1c..5e113d1 100644 --- a/home.nix +++ b/home.nix @@ -1,7 +1,6 @@ -{ pkgs, config, ... }: +{ pkgs, config, hx, ... }: let nvimCustom = import ./nvim/settings.nix; - helixCustom = import ./helix/settings.nix; in { imports = [ @@ -12,6 +11,7 @@ in ./rofi/settings.nix ./i3/i3status-rust.nix ./dunst/settings.nix + ./helix/settings.nix # ./polybar/config.nix # ./hyprland/settings.nix # ./waybar/settings.nix @@ -20,7 +20,6 @@ in home-manager.users.zoe = { home.stateVersion = "22.11"; programs.neovim = nvimCustom pkgs; - programs.helix = helixCustom pkgs; programs.git = { enable = true; @@ -32,10 +31,9 @@ in programs.mpv.config = { enable = true; - ytdl-format = "bestaudio*[height<=720][fps<=24]"; - ytdl-path = "yt-dlp"; + ytdl-format = "bestvideo[height<=?720]+bestaudio/best"; save-position-on-quit = true; - scripts = with pkgs.mpvScripts; [ mpris sponsorblock ]; + scripts = with pkgs.mpvScripts; [ mpris sponsorblock uosc ]; }; programs.yt-dlp = { enable = true; diff --git a/i3/config.nix b/i3/config.nix index d9e2e89..c302b8a 100644 --- a/i3/config.nix +++ b/i3/config.nix @@ -102,13 +102,13 @@ in }; brightness = { Escape = "mode default"; - k = "exec /etc/nixos/i3/brightness.py 100+"; - j = "exec /etc/nixos/i3/brightness.py 100-"; + k = "exec /etc/nixos/i3/brightness.py 10+"; + j = "exec /etc/nixos/i3/brightness.py 10-"; }; media = { Escape = "mode default"; - j = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 5%-"; - k = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 5%+"; + j = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 1%-"; + k = "exec --no-startup-id python3 /etc/nixos/i3/volume.py 1%+"; m = "exec --no-startup-id amixer set Master toggle"; n = "exec --no-startup-id amixer set Capture toggle"; p = "exec --no-startup-id playerctld shift"; diff --git a/user.nix b/user.nix index 4c3346f..969693f 100644 --- a/user.nix +++ b/user.nix @@ -56,8 +56,9 @@ in { # video syncplay - unstable.mpv + mpv unstable.yt-dlp + unstable.youtube-dl obs-studio ffmpeg kdenlive @@ -101,6 +102,7 @@ in { bat fd fzf + tmux # window manager rofimoji