summaryrefslogtreecommitdiff
path: root/configuration/home-manager
diff options
context:
space:
mode:
Diffstat (limited to 'configuration/home-manager')
-rw-r--r--configuration/home-manager/ansible.nix7
-rw-r--r--configuration/home-manager/core/default.nix74
-rw-r--r--configuration/home-manager/core/helix.nix42
-rw-r--r--configuration/home-manager/core/shell.nix69
-rw-r--r--configuration/home-manager/frontend-dev.nix20
-rw-r--r--configuration/home-manager/hostnet.nix55
-rw-r--r--configuration/home-manager/hyprland.nix257
-rw-r--r--configuration/home-manager/php.nix13
-rw-r--r--configuration/home-manager/python.nix29
-rw-r--r--configuration/home-manager/tarrel.nix38
10 files changed, 604 insertions, 0 deletions
diff --git a/configuration/home-manager/ansible.nix b/configuration/home-manager/ansible.nix
new file mode 100644
index 0000000..67aff1c
--- /dev/null
+++ b/configuration/home-manager/ansible.nix
@@ -0,0 +1,7 @@
+{ pkgs, ... }:
+{
+ home.packages = with pkgs; [
+ ansible-language-server
+ ansible-lint
+ ];
+}
diff --git a/configuration/home-manager/core/default.nix b/configuration/home-manager/core/default.nix
new file mode 100644
index 0000000..9c33f66
--- /dev/null
+++ b/configuration/home-manager/core/default.nix
@@ -0,0 +1,74 @@
+{ pkgs, inputs, ... }:
+{
+
+ imports = [
+ ./helix.nix
+ ./shell.nix
+ ];
+
+ home.packages = [
+ pkgs.gnumake
+ pkgs.git-crypt
+ pkgs.bitwarden-cli
+
+ pkgs.fd
+ pkgs.glow
+ pkgs.eza
+
+ pkgs.nixfmt-rfc-style
+ inputs.nil.packages."${pkgs.system}".nil
+ ];
+
+ programs.ripgrep.enable = true;
+ programs.btop.enable = true;
+
+ programs.zoxide = {
+ enable = true;
+ options = [ "--cmd cd" ];
+ };
+ programs.fzf.enable = true;
+
+ programs.direnv = {
+ enable = true;
+ nix-direnv.enable = true;
+ };
+
+ programs.git = {
+ enable = true;
+ aliases = {
+ b = "branch";
+ f = "fetch";
+ p = "pull";
+ s = "status";
+ co = "checkout";
+ pu = "push";
+ nb = "checkout -b";
+ db = "branch -D";
+ lg =
+ "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
+ praise = "blame";
+ bump = "!git bump";
+ ae = "!git add -A && git commit --amend";
+ ad = "commit --amend";
+ ac = "!git add -A && git commit";
+ rmbs =
+ "!git branch | grep -wv master | grep -wv main | xargs git branch -D";
+ };
+ extraConfig = {
+ pull.rebase = false;
+ init.defaultBranch = "main";
+ };
+ };
+
+ services.ssh-agent.enable = true;
+ programs.ssh = {
+ enable = true;
+ package = "${pkgs.openssh}";
+ addKeysToAgent = "yes";
+ };
+
+ programs.taskwarrior = {
+ enable = true;
+ package = "${pkgs.taskwarrior3}";
+ };
+}
diff --git a/configuration/home-manager/core/helix.nix b/configuration/home-manager/core/helix.nix
new file mode 100644
index 0000000..42861ce
--- /dev/null
+++ b/configuration/home-manager/core/helix.nix
@@ -0,0 +1,42 @@
+{ pkgs, inputs, ... }:
+{
+ home.sessionVariables = { EDITOR = "hx"; };
+ home.file = {
+ helix-ferra = {
+ source = ../../../assets/helix-wavez.toml;
+ target = ".config/helix/themes/wavez.toml";
+ };
+ };
+
+ programs.helix = {
+ enable = true;
+ package = inputs.helix.packages."${pkgs.system}".helix;
+ defaultEditor = true;
+ settings = {
+ theme = "wavez";
+ keys.normal = {
+ space.F = "file_picker_in_current_buffer_directory";
+ };
+ editor = {
+ end-of-line-diagnostics = "hint";
+ line-number = "relative";
+ bufferline = "always";
+ auto-save = false;
+
+ inline-diagnostics = {
+ cursor-line = "error";
+ };
+
+ lsp = {
+ enable = true;
+ display-messages = true;
+ };
+
+ indent-guides = {
+ render = true;
+ skip-levels = 1;
+ };
+ };
+ };
+ };
+}
diff --git a/configuration/home-manager/core/shell.nix b/configuration/home-manager/core/shell.nix
new file mode 100644
index 0000000..183b9ae
--- /dev/null
+++ b/configuration/home-manager/core/shell.nix
@@ -0,0 +1,69 @@
+{ pkgs, lib, ... }:
+{
+ programs.zsh = {
+ enable = true;
+ defaultKeymap = "emacs";
+ initExtra = ''
+ # https://github.com/jeffreytse/zsh-vi-mode
+ source ${pkgs.zsh-vi-mode}/share/zsh-vi-mode/zsh-vi-mode.plugin.zsh
+ '';
+ shellAliases = {
+ g = "git";
+ };
+ };
+
+ programs.starship = {
+ enable = true;
+ settings = {
+ directory.style = "blue";
+
+ format = lib.concatStrings [
+ "$username"
+ "$hostname"
+ "$directory"
+ "$git_branch"
+ "$git_state"
+ "$git_status"
+ "$cmd_duration"
+ "$line_break"
+ "$python"
+ "$openstack"
+ "$character"
+ ];
+
+ character = {
+ success_symbol = "[❯](purple)";
+ error_symbol = "[❯](red)";
+ vimcmd_symbol = "[❮](green)";
+ };
+
+ git_branch = {
+ format = "[$branch]($style)";
+ style = "bright-black";
+ };
+
+ git_status = {
+ format =
+ "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](218) ($ahead_behind$stashed)]($style)";
+ style = "cyan";
+ conflicted = "​";
+ untracked = "​";
+ modified = "​";
+ staged = "​";
+ renamed = "​";
+ deleted = "​";
+ stashed = "≡";
+ };
+
+ git_state = {
+ format = "'([$state( $progress_current/$progress_total)]($style))' ";
+ style = "bright-black";
+ };
+
+ cmd_duration = {
+ format = "[$duration]($style) ";
+ style = "yellow";
+ };
+ };
+ };
+}
diff --git a/configuration/home-manager/frontend-dev.nix b/configuration/home-manager/frontend-dev.nix
new file mode 100644
index 0000000..3a957cd
--- /dev/null
+++ b/configuration/home-manager/frontend-dev.nix
@@ -0,0 +1,20 @@
+{ pkgs, ... }:
+{
+ home.packages = with pkgs; [
+ dart-sass
+ tailwindcss
+ tailwindcss-language-server
+ vscode-langservers-extracted
+ ];
+
+ programs.helix.languages.language = [
+ {
+ name = "html";
+ language-servers = [ "vscode-html-language-server" "tailwindcss-language-server" ];
+ }
+ {
+ name = "css";
+ language-servers = [ "vscode-css-language-server" "tailwindcss-language-server" ];
+ }
+ ];
+}
diff --git a/configuration/home-manager/hostnet.nix b/configuration/home-manager/hostnet.nix
new file mode 100644
index 0000000..b8f6418
--- /dev/null
+++ b/configuration/home-manager/hostnet.nix
@@ -0,0 +1,55 @@
+{ config, pkgs, ... }:
+let
+ nodePkgs = pkgs.nodePackages;
+ homeDir = "${config.home.homeDirectory}";
+ llamaDir = "${homeDir}/.llama";
+ apache2Dir = "${homeDir}/.apache2";
+ httpd = "${pkgs.apacheHttpd}/bin/httpd";
+in {
+ home.packages = [
+ pkgs.pre-commit
+ nodePkgs.webpack
+ nodePkgs.webpack-cli
+
+ (pkgs.writeShellScriptBin "use-toolbox" ''
+ source ${config.home.homeDirectory}/projects/toolbox/var/bootstrap.zsh
+ '')
+ ];
+
+ programs = {
+ rbenv = {
+ enable = true;
+ enableZshIntegration = true;
+ plugins = [{
+ name = "ruby-build";
+ src = pkgs.fetchFromGitHub {
+ owner = "rbenv";
+ repo = "ruby-build";
+ rev = "v20230717";
+ hash = "sha256-kvdANiz9R5pQMTBRHvxC5bfBewIhXc+sgRbe7V2rVU8=";
+ };
+ }];
+ };
+ };
+
+ systemd.user.services.llama = {
+ Unit.Description = "Hostnet Apache LLama";
+ Service = {
+ ExecStartPre = "${llamaDir}/se-vhosts.sh";
+ ExecStart = "${httpd} -f ${llamaDir}/apache2.conf -DFOREGROUND";
+ RestartSec = "2";
+ Restart = "always";
+ Environment = [
+ "APACHE_RUN_DIR=${apache2Dir}"
+ "APACHE_CONFDIR=${llamaDir}"
+ "APACHE_RUN_USER=${config.home.username}"
+ "APACHE_RUN_GROUP=${config.home.username}"
+ "APACHE_PID_FILE=${homeDir}/.apache2.pid"
+ "APACHE_RUN_FILE=${apache2Dir}/run"
+ "APACHE_LOCK_FILE=${apache2Dir}/lock"
+ "APACHE_LOG_FILE=${apache2Dir}/log"
+ ];
+ };
+ Install.WantedBy = [ "default.target" ];
+ };
+}
diff --git a/configuration/home-manager/hyprland.nix b/configuration/home-manager/hyprland.nix
new file mode 100644
index 0000000..08af2a1
--- /dev/null
+++ b/configuration/home-manager/hyprland.nix
@@ -0,0 +1,257 @@
+{ pkgs, inputs, ... }:
+let
+ wallpaper = ../../assets/wallpaper.jpg;
+in
+{
+ home.packages = with pkgs; [
+ rofi-wayland-unwrapped
+ rofi-rbw-wayland
+ grimblast
+ hyprpicker
+ wl-clipboard
+ ];
+
+ # Required for hyprpicker's cursor but also seems to fix some icons for astal
+ home.pointerCursor = {
+ gtk.enable = true;
+ package = pkgs.adwaita-icon-theme;
+ name = "Adwaita";
+ size = 16;
+ };
+
+ services.wlsunset.enable = true;
+ services.wlsunset.sunrise = "06:00";
+ services.wlsunset.sunset = "17:00";
+
+ wayland.windowManager.hyprland.enable = true;
+ wayland.windowManager.hyprland.systemd.enable = true;
+ wayland.windowManager.hyprland.plugins = [
+ inputs.hy3.packages.x86_64-linux.hy3
+ ];
+
+ wayland.windowManager.hyprland.settings = {
+ "$terminal" = "alacritty";
+ "$mod" = "SUPER";
+
+ exec-once = [
+ "astal-bar"
+ ];
+
+ debug = {
+ "disable_logs" = false;
+ };
+
+ general = {
+ "layout" = "hy3";
+ "border_size" = 2;
+ "col.active_border" = "rgba(fe8423ee) rgba(e11701ee) 45deg";
+ "col.inactive_border" = "rgba(595959aa)";
+ };
+
+ monitor = [
+ "Unknown-1, disable"
+ ",preferred,auto,auto"
+ ];
+
+ xwayland = {
+ force_zero_scaling = true;
+ };
+
+ animations = {
+ bezier = [
+ "easeOutQuint,0.23,1,0.32,1"
+ "easeInOutCubic,0.65,0.05,0.36,1"
+ "linear,0,0,1,1"
+ "almostLinear,0.5,0.5,0.75,1.0"
+ "quick,0.15,0,0.1,1"
+ ];
+ animation = [
+ "global, 1, 10, default"
+ "border, 1, 5.39, easeOutQuint"
+ "windows, 1, 4.79, easeOutQuint"
+ "windowsIn, 1, 4.1, easeOutQuint, popin 87%"
+ "windowsOut, 1, 1.49, linear, popin 87%"
+ "fadeIn, 1, 1.73, almostLinear"
+ "fadeOut, 1, 1.46, almostLinear"
+ "fade, 1, 3.03, quick"
+ "layers, 1, 3.81, easeOutQuint"
+ "layersIn, 1, 4, easeOutQuint, fade"
+ "layersOut, 1, 1.5, linear, fade"
+ "fadeLayersIn, 1, 1.79, almostLinear"
+ "fadeLayersOut, 1, 1.39, almostLinear"
+ "workspaces, 1, 1.94, almostLinear, fade"
+ ];
+ };
+
+ decoration = {
+ "rounding" = 5;
+ "inactive_opacity" = 0.8;
+ };
+
+ bind =
+ [
+ "$mod, Return, exec, alacritty"
+ "$mod, Semicolon, hy3:makegroup, h"
+ "$mod, D, exec, ${pkgs.rofi-wayland-unwrapped}/bin/rofi -show drun"
+ "$mod, F, fullscreen, 1"
+ "$mod, H, hy3:movefocus, l"
+ "$mod, J, hy3:movefocus, d"
+ "$mod, K, hy3:movefocus, u"
+ "$mod, L, hy3:movefocus, r"
+ "$mod, P, exec, ${pkgs.grimblast}/bin/grimblast copy area"
+ "$mod, Q, exec, ${pkgs.hyprlock}/bin/hyprlock"
+ "$mod, V, hy3:makegroup, v"
+ "$mod, W, hy3:changegroup, toggletab"
+ "$mod, X, movecurrentworkspacetomonitor, +1"
+
+ "$mod SHIFT, C, exec, ${pkgs.hyprpicker}/bin/hyprpicker -a -f hex"
+ "$mod SHIFT, D, exec, ${pkgs.rofi-rbw-wayland}/bin/rofi-rbw"
+ "$mod SHIFT, H, hy3:movewindow, l"
+ "$mod SHIFT, J, hy3:movewindow, d"
+ "$mod SHIFT, K, hy3:movewindow, u"
+ "$mod SHIFT, L, hy3:movewindow, r"
+ "$mod SHIFT, P, exec, ${pkgs.grimblast}/bin/grimblast copy screen"
+ "$mod SHIFT, Q, hy3:killactive"
+ ]
+ ++ (
+ builtins.concatLists (builtins.genList (i:
+ let ws = i + 1;
+ in [
+ "$mod, code:1${toString i}, workspace, ${toString ws}"
+ "$mod SHIFT, code:1${toString i}, hy3:movetoworkspace, ${toString ws}"
+ ]
+ )
+ 9)
+ );
+
+ plugin = {
+ hy3 = {
+ tabs = {
+ "col.active" = "0xFFFE8423";
+ "col.inactive" = "0xFF103543";
+ "col.text.inactive" = "0xFFFECDB2";
+ };
+ };
+ };
+ };
+
+ programs.waybar.enable = true;
+ programs.waybar.settings = {
+ mainBar = {
+ layer = "top";
+ position = "bottom";
+ # output = monitor-names;
+ modules-left = [
+ "hyprland/workspaces"
+ ];
+ modules-right = [
+ "clock"
+ "battery"
+ ];
+
+ "hyprland/workspaces" = {
+ all-outputs = true;
+ format-icons = {
+ active = "";
+ default = "";
+ };
+ format = "{id} {icon}";
+ window-rewrite-default = "*";
+ };
+ };
+ };
+
+ services.hyprpaper.enable = true;
+ services.hyprpaper.settings = {
+ preload = [ "${wallpaper}" ];
+ wallpaper = [ ",${wallpaper}" ];
+ };
+
+ programs.hyprlock.enable = true;
+ programs.hyprlock.settings = {
+ background = [
+ { path = "${wallpaper}";
+ blur_passes = 2;
+ monitor = "";
+ }
+ ];
+
+ general = {
+ no_fade_in = true;
+ no_fade_out = true;
+ hide_cursor = false;
+ disable_loading_bar = true;
+ grace = 0;
+ };
+
+ input-field = [
+ {
+ monitor = "";
+ size = "250, 60";
+ outline_thickness = 2;
+ dots_size = 0.2; # Scale of input-field height, 0.2 - 0.8
+ dots_spacing = 0.35; # Scale of dots' absolute size, 0.0 - 1.0
+ dots_center = true;
+ outer_color = "rgba(0, 0, 0, 0)";
+ inner_color = "rgba(0, 0, 0, 0.2)";
+ font_color = "$foreground";
+ fade_on_empty = false;
+ rounding = -1;
+ check_color = "rgb(204, 136, 34)";
+ placeholder_text = "<i><span foreground=\"##cdd6f4\">Input Password...</span></i>";
+ hide_input = false;
+ position = "0, -200";
+ halign = "center";
+ valign = "center";
+ }
+ ];
+ };
+
+ programs.alacritty = {
+ enable = true;
+ settings = {
+ window = {
+ padding = { x = 5; y = 2; };
+ };
+ env = { TERM = "alacritty-direct"; };
+ terminal.shell = {
+ program = "${pkgs.zsh}/bin/zsh";
+ args = [ "-l" ];
+ };
+ } // builtins.fromJSON (builtins.readFile ../../assets/alacritty-wavez.json);
+ };
+
+ xdg.mimeApps = {
+ enable = true;
+ defaultApplications = {
+ "x-scheme-handler/http" = "firefox.desktop";
+ "x-scheme-handler/https" = "firefox.desktop";
+ "x-scheme-handler/chrome" = "firefox.desktop";
+ "text/html" = "firefox.desktop";
+ "application/x-extension-htm" = "firefox.desktop";
+ "application/x-extension-html" = "firefox.desktop";
+ "application/x-extension-shtml" = "firefox.desktop";
+ "application/xhtml+xml" = "firefox.desktop";
+ "application/x-extension-xhtml" = "firefox.desktop";
+ "application/x-extension-xht" = "firefox.desktop";
+ };
+ associations.added = {
+ "x-scheme-handler/http" = "firefox.desktop";
+ "x-scheme-handler/https" = "firefox.desktop";
+ "x-scheme-handler/chrome" = "firefox.desktop";
+ "text/html" = "firefox.desktop";
+ "application/x-extension-htm" = "firefox.desktop";
+ "application/x-extension-html" = "firefox.desktop";
+ "application/x-extension-shtml" = "firefox.desktop";
+ "application/xhtml+xml" = "firefox.desktop";
+ "application/x-extension-xhtml" = "firefox.desktop";
+ "application/x-extension-xht" = "firefox.desktop";
+ };
+ };
+
+ programs.rbw.enable = true;
+ programs.rbw.settings = {
+ email = "jaspert.ras@gmail.com";
+ pinentry = pkgs.pinentry-gnome3;
+ };
+}
diff --git a/configuration/home-manager/php.nix b/configuration/home-manager/php.nix
new file mode 100644
index 0000000..ab56f44
--- /dev/null
+++ b/configuration/home-manager/php.nix
@@ -0,0 +1,13 @@
+{ pkgs, ... }:
+{
+ programs.helix.languages.language-server.intelephense = with pkgs.nodePackages; {
+ command = "${intelephense}/bin/intelephense";
+ };
+
+ programs.git.ignores = [
+ ".phpactor.json"
+ ".phpcomplete_extended/"
+ ".phpunit.result.cache"
+ ".phpcs.xml"
+ ];
+}
diff --git a/configuration/home-manager/python.nix b/configuration/home-manager/python.nix
new file mode 100644
index 0000000..464fc39
--- /dev/null
+++ b/configuration/home-manager/python.nix
@@ -0,0 +1,29 @@
+{ pkgs, ... }:
+{
+ home.packages = [
+ pkgs.pyright
+ pkgs.black
+ pkgs.ruff
+ ];
+
+ programs.helix.languages = {
+ language = [
+ {
+ name = "python";
+ language-servers = [ "pyright" "ruff" ];
+ formatter = { command = "black"; args = ["--line-length" "88" "--quiet" "-"]; };
+ auto-format = true;
+ }
+ ];
+ language-server.pyright.config.python.analysis = { typeCheckingMode = "basic"; };
+ language-server.ruff = { command = "ruff"; };
+ language-server.ruff.config.setting = { args = ["--ignore" "E501" ]; };
+ };
+
+ programs.starship.settings = {
+ python = {
+ format = "[$virtualenv]($style) ";
+ style = "bright-black";
+ };
+ };
+}
diff --git a/configuration/home-manager/tarrel.nix b/configuration/home-manager/tarrel.nix
new file mode 100644
index 0000000..a8ddb9f
--- /dev/null
+++ b/configuration/home-manager/tarrel.nix
@@ -0,0 +1,38 @@
+{ pkgs, ... }:
+{
+ imports = [
+ ../home-manager/core
+ ../home-manager/hyprland.nix
+ ];
+
+ home.username = "jras";
+ home.homeDirectory = "/home/jras";
+ home.stateVersion = "23.11";
+
+ programs.git = {
+ userName = "Jasper Ras";
+ userEmail = "jaspert.ras@gmail.com";
+ };
+
+ home.file = {
+ gamestream-start = {
+ text = ''
+ #!${pkgs.zsh}/bin/zsh
+ ${pkgs.hyprland}/bin/hyprctl keyword monitor HDMI-A-1,1920x1080@59.94,auto,2
+ '';
+ target = "bin/gamestream-start";
+ executable = true;
+ };
+ gamestream-end = {
+ text = ''
+ #!${pkgs.zsh}/bin/zsh
+ ${pkgs.hyprland}/bin/hyprctl keyword monitor HDMI-A-1,preferred,auto,1
+ '';
+ target = "bin/gamestream-end";
+ executable = true;
+ };
+ };
+
+ programs.zsh.envExtra = "export PATH=$HOME/bin:$PATH";
+ };
+}