From ab0c00335085f5713412ee670f3aae49b28a2f01 Mon Sep 17 00:00:00 2001 From: ooks-io Date: Mon, 31 Jul 2023 21:19:27 +1200 Subject: [PATCH] fix syntax --- flake.lock | 21 ++++ flake.nix | 2 - home/ooks/ooksx1.nix | 2 +- home/ooks/opt/desktop/hyprland/default.nix | 11 +- home/ooks/opt/desktop/standard/fonts.nix | 2 +- home/ooks/opt/desktop/standard/qt.nix | 4 - .../opt/desktop/standard/wayland/default.nix | 3 +- .../opt/desktop/standard/wayland/firefox.nix | 2 +- home/ooks/opt/shell/default.nix | 1 - home/ooks/opt/shell/fish.nix | 1 + home/ooks/opt/shell/git.nix | 7 +- home/ooks/opt/shell/starship.nix | 111 ++++++++++++++++-- home/ooks/standard/default.nix | 6 +- modules/home-manager/default.nix | 2 +- 14 files changed, 136 insertions(+), 39 deletions(-) diff --git a/flake.lock b/flake.lock index 9462c37..6213145 100644 --- a/flake.lock +++ b/flake.lock @@ -89,6 +89,26 @@ "type": "github" } }, + "hyprwm-contrib": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1690635289, + "narHash": "sha256-ec77Yf7mqusmGkxrmYXEG4D0DqEcNRA3vFextWVQOVA=", + "owner": "hyprwm", + "repo": "contrib", + "rev": "bef073cff65917ba2d888aa4dc39bd9868e2b0a4", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "contrib", + "type": "github" + } + }, "nix-colors": { "inputs": { "base16-schemes": "base16-schemes", @@ -144,6 +164,7 @@ "firefox-addons": "firefox-addons", "hardware": "hardware", "home-manager": "home-manager", + "hyprwm-contrib": "hyprwm-contrib", "nix-colors": "nix-colors", "nixpkgs": "nixpkgs" } diff --git a/flake.nix b/flake.nix index a848ea1..df3b55a 100644 --- a/flake.nix +++ b/flake.nix @@ -29,8 +29,6 @@ homeManagerModules = import ./modules/home-manager; - wallpapers = import ./home/ooks/wallpapers - nixosConfigurations = { # X1 Carbon ooksx1 = lib.nixosSystem { diff --git a/home/ooks/ooksx1.nix b/home/ooks/ooksx1.nix index d92ba61..ad03dd1 100644 --- a/home/ooks/ooksx1.nix +++ b/home/ooks/ooksx1.nix @@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ inputs, outputs, ... }: { imports = [ diff --git a/home/ooks/opt/desktop/hyprland/default.nix b/home/ooks/opt/desktop/hyprland/default.nix index 81d12ce..f119e6d 100644 --- a/home/ooks/opt/desktop/hyprland/default.nix +++ b/home/ooks/opt/desktop/hyprland/default.nix @@ -4,13 +4,8 @@ ../standard/wayland ./tty-init.nix - ./basic-binds.nix - ./systemd-fixes.nix - ]; - - home.packages = with pkgs; [ - inputs.hyprwm-contrib.grimblast - hyprslurp + ./binds.nix + ./systemd-fix.nix ]; wayland.windowManager.hyprland = { @@ -74,7 +69,7 @@ }; exec = [ - need to fix "${pkgs.swaybg}/bin/swaybg -i ~/.dotfiles/walls/everforest/megacity.png --mode fill" + "${pkgs.swaybg}/bin/swaybg -i ~/.dotfiles/walls/everforest/megacity.png --mode fill" ]; }; }; diff --git a/home/ooks/opt/desktop/standard/fonts.nix b/home/ooks/opt/desktop/standard/fonts.nix index 5716802..56637b6 100644 --- a/home/ooks/opt/desktop/standard/fonts.nix +++ b/home/ooks/opt/desktop/standard/fonts.nix @@ -3,7 +3,7 @@ enable = true; monospace = { family = "JetBrainsMono Nerd Font"; - package = pkgs.nerdfonts.override { fonts = [ "JetBrains" ]; }; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; }; regular = { family = "Fira Sans"; diff --git a/home/ooks/opt/desktop/standard/qt.nix b/home/ooks/opt/desktop/standard/qt.nix index 261768f..0a710fe 100644 --- a/home/ooks/opt/desktop/standard/qt.nix +++ b/home/ooks/opt/desktop/standard/qt.nix @@ -3,9 +3,5 @@ qt = { enable = true; platformTheme = "gtk"; - style = { - name = "gtk2"; - package = pkgs.qt6gtk2; }; - }; } diff --git a/home/ooks/opt/desktop/standard/wayland/default.nix b/home/ooks/opt/desktop/standard/wayland/default.nix index 167d827..a571c31 100644 --- a/home/ooks/opt/desktop/standard/wayland/default.nix +++ b/home/ooks/opt/desktop/standard/wayland/default.nix @@ -11,14 +11,13 @@ xdg.mimeApps.enable = true; home.packages = with pkgs; [ grim - mkv + mpv gtk3 pulseaudio slurp wf-recorder wl-clipboard wl-mirror - wl-mirror-pick xdg-utils ydotool ]; diff --git a/home/ooks/opt/desktop/standard/wayland/firefox.nix b/home/ooks/opt/desktop/standard/wayland/firefox.nix index c8b4606..ee03cef 100644 --- a/home/ooks/opt/desktop/standard/wayland/firefox.nix +++ b/home/ooks/opt/desktop/standard/wayland/firefox.nix @@ -4,6 +4,7 @@ let addons = inputs.firefox-addons.packages.${pkgs.system}; in { + nixpkgs.config.allowUnfree = true; programs.browserpass.enable = true; programs.firefox = { enable = true; @@ -12,7 +13,6 @@ in extensions = with addons; [ ublock-origin browserpass - onepassword-password-manager stylus surfingkeys ]; diff --git a/home/ooks/opt/shell/default.nix b/home/ooks/opt/shell/default.nix index 72bbace..b3e771e 100644 --- a/home/ooks/opt/shell/default.nix +++ b/home/ooks/opt/shell/default.nix @@ -18,7 +18,6 @@ diffsitter # Better diff jq # JSON pretty printer and manipulator lazygit - nix-inspect # See which pkgs are in your PATH comma # Install and run with "," btop ]; diff --git a/home/ooks/opt/shell/fish.nix b/home/ooks/opt/shell/fish.nix index 32fe247..1cbd114 100644 --- a/home/ooks/opt/shell/fish.nix +++ b/home/ooks/opt/shell/fish.nix @@ -37,6 +37,7 @@ in fish_greeting = ""; }; # kitty integration + interactiveShellInit = '' set --global KITTY_INSTALLATION_DIR "${pkgs.kitty}/lib/kitty" set --global KITTY_SHELL_INTEGRATION enabled diff --git a/home/ooks/opt/shell/git.nix b/home/ooks/opt/shell/git.nix index 0e4d97c..b64f63e 100644 --- a/home/ooks/opt/shell/git.nix +++ b/home/ooks/opt/shell/git.nix @@ -1,8 +1,9 @@ -{ +{ pkgs, config, ... }: +{ programs.git = { enable = true; package = pkgs.gitAndTools.gitFull; - userName = ooks-io; - userEmail = ooks@protonmail.com; + userName = "ooks-io"; + userEmail = "ooks@protonmail.com"; }; } diff --git a/home/ooks/opt/shell/starship.nix b/home/ooks/opt/shell/starship.nix index a23709d..65813d9 100644 --- a/home/ooks/opt/shell/starship.nix +++ b/home/ooks/opt/shell/starship.nix @@ -1,15 +1,104 @@ -{ config, pkgs, ... }: - +{ pkgs, lib, ... }: { - programs = { - starship = { - enable = true; - setting = { - character = { - success_symbol = "[➜](bold green)"; - error_symbol = "[➜](bold red)"; - } - } + programs.starship = { + enable = true; + settings = { + format = + let + git = "$git_branch$git_commit$git_state$git_status"; + cloud = "$aws$gcloud$openstack"; + in + '' + $username$hostname($shlvl)($cmd_duration) $fill ($nix_shell)$custom + $directory(${git})(- ${cloud}) $fill $time + $jobs$character + ''; + + fill = { + symbol = " "; + disabled = false; + }; + + # Core + username = { + format = "[$user]($style)"; + show_always = true; + }; + hostname = { + format = "[@$hostname]($style) "; + ssh_only = false; + style = "bold green"; + }; + shlvl = { + format = "[$shlvl]($style) "; + style = "bold cyan"; + threshold = 2; + repeat = true; + disabled = false; + }; + cmd_duration = { + format = "took [$duration]($style) "; + }; + + directory = { + format = "[$path]($style)( [$read_only]($read_only_style)) "; + }; + nix_shell = { + format = "[($name \\(develop\\) <- )$symbol]($style) "; + impure_msg = ""; + symbol = " "; + style = "bold red"; + }; + + character = { + error_symbol = "[~~>](bold red)"; + success_symbol = "[->>](bold green)"; + vimcmd_symbol = "[<<-](bold yellow)"; + vimcmd_visual_symbol = "[<<-](bold cyan)"; + vimcmd_replace_symbol = "[<<-](bold purple)"; + vimcmd_replace_one_symbol = "[<<-](bold purple)"; + }; + + time = { + format = "\\\[[$time]($style)\\\]"; + disabled = false; + }; + + # Cloud + gcloud = { + format = "on [$symbol$active(/$project)(\\($region\\))]($style)"; + }; + aws = { + format = "on [$symbol$profile(\\($region\\))]($style)"; + }; + + # Icon changes only \/ + aws.symbol = " "; + conda.symbol = " "; + dart.symbol = " "; + directory.read_only = " "; + docker_context.symbol = " "; + elixir.symbol = " "; + elm.symbol = " "; + gcloud.symbol = " "; + git_branch.symbol = " "; + golang.symbol = " "; + hg_branch.symbol = " "; + java.symbol = " "; + julia.symbol = " "; + memory_usage.symbol = "󰍛 "; + nim.symbol = "󰆥 "; + nodejs.symbol = " "; + package.symbol = "󰏗 "; + perl.symbol = " "; + php.symbol = " "; + python.symbol = " "; + ruby.symbol = " "; + rust.symbol = " "; + scala.symbol = " "; + shlvl.symbol = ""; + swift.symbol = "󰛥 "; + terraform.symbol = "󱁢"; }; }; } diff --git a/home/ooks/standard/default.nix b/home/ooks/standard/default.nix index c351dee..9389c38 100644 --- a/home/ooks/standard/default.nix +++ b/home/ooks/standard/default.nix @@ -5,9 +5,8 @@ in { imports = [ inputs.nix-colors.homeManagerModule - ../modules/common/ - ../modules/feature/shell/ - ../modules/feature/nvim/ + ../opt/shell + ../opt/nvim ] ++ (builtins.attrValues outputs.homeManagerModules); nixpkgs = { @@ -39,7 +38,6 @@ in stateVersion = lib.mkDefault "22.05"; sessionPath = [ "$HOME/.local/bin" ]; }; - }; colorscheme = lib.mkDefault colorSchemes.everforest; home.file.".colorscheme".text = config.colorscheme.slug; diff --git a/modules/home-manager/default.nix b/modules/home-manager/default.nix index fd1c484..6d9825f 100644 --- a/modules/home-manager/default.nix +++ b/modules/home-manager/default.nix @@ -1,3 +1,3 @@ { - fonts = import ./fonts.nix + fonts = import ./fonts.nix; }