From cc470fb50d81e14f2e70309ffbe7e90602f0750f Mon Sep 17 00:00:00 2001 From: vali Date: Mon, 29 Apr 2024 23:56:41 +0200 Subject: [PATCH] removed stuff --- hosts/vali/mars/configuration.nix | 2 +- hosts/vali/mars/profile.nix | 4 -- modules/cli/default.nix | 3 - modules/cli/git.nix | 69 ---------------------- modules/cli/starship.nix | 42 ------------- modules/cli/zsh.nix | 98 ------------------------------- modules/gui/WM/default.nix | 5 -- modules/gui/WM/hyprland.nix | 59 ------------------- modules/gui/default.nix | 1 - 9 files changed, 1 insertion(+), 282 deletions(-) delete mode 100644 modules/cli/git.nix delete mode 100644 modules/cli/starship.nix delete mode 100644 modules/cli/zsh.nix delete mode 100644 modules/gui/WM/default.nix delete mode 100644 modules/gui/WM/hyprland.nix diff --git a/hosts/vali/mars/configuration.nix b/hosts/vali/mars/configuration.nix index e2c719a..f16fe3f 100644 --- a/hosts/vali/mars/configuration.nix +++ b/hosts/vali/mars/configuration.nix @@ -63,7 +63,7 @@ size = 24; }; gtk = { - enable = true; + enable = false; package = pkgs.materia-theme; name = "Materia-dark"; # iconTheme = { diff --git a/hosts/vali/mars/profile.nix b/hosts/vali/mars/profile.nix index 3e6ec8a..e6e632b 100644 --- a/hosts/vali/mars/profile.nix +++ b/hosts/vali/mars/profile.nix @@ -4,10 +4,6 @@ _: { ../../../options/desktop/fonts.nix ../../../options/common/networking.nix ../../../options/common/gpu/nvidia.nix -# ../../../overlay.nix - ../../../options/common/pin-registry.nix - ../../../options/common/preserve-system.nix - #../../options/ ../../../options/desktop/monitors.nix ../../../overlay.nix ]; diff --git a/modules/cli/default.nix b/modules/cli/default.nix index b94d6d3..51d1163 100644 --- a/modules/cli/default.nix +++ b/modules/cli/default.nix @@ -1,8 +1,5 @@ _: { imports = [ - ./git.nix - ./starship.nix - ./zsh.nix ./neovim.nix ./fish.nix ]; diff --git a/modules/cli/git.nix b/modules/cli/git.nix deleted file mode 100644 index 6d65c2c..0000000 --- a/modules/cli/git.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: with lib; let - cfg = config.modules.programs.git; - username = config.modules.other.system.username; -in { - options.modules.programs.git = { - enable = mkEnableOption "git"; - userName = mkOption { - type = types.str; - description = "git username"; - }; - userEmail = mkOption { - type = types.str; - description = "git email"; - }; -# signingKey = mkOption { - # type = types.str; - # description = "git commit signing key"; - # }; - editor = mkOption { - type = types.str; - default = "$EDITOR"; - description = "commit message editor"; - }; - defaultBranch = mkOption { - type = types.str; - default = "master"; - description = "default git branch"; - }; - pullRebase = mkOption { - type = types.bool; - default = false; - description = "git config pull.rebase {pullRebase}"; - }; - }; - - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.git = { - inherit (cfg) enable userName userEmail; - extraConfig = { - core = { - editor = cfg.editor; - pager = "${pkgs.delta}/bin/delta"; - }; - init.defaultBranch = cfg.defaultBranch; - push.autoSetupRemote = true; - commit = { - verbose = true; - # gpgsign = true; - }; - # gpg.format = "ssh"; -# user.signingkey = "key::${cfg.signingKey}"; - merge.conflictstyle = "zdiff3"; - interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only"; - diff.algorithm = "histogram"; - transfer.fsckobjects = true; - fetch.fsckobjects = true; - receive.fsckobjects = true; - pull.rebase = cfg.pullRebase; - }; - }; - }; - }; -} diff --git a/modules/cli/starship.nix b/modules/cli/starship.nix deleted file mode 100644 index 60acfdc..0000000 --- a/modules/cli/starship.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ - config, - lib, - ... -}: with lib; let - cfg = config.modules.programs.starship; - username = config.modules.other.system.username; -in { - options.modules.programs.starship.enable = mkEnableOption "starship"; - - config = mkIf cfg.enable { - home-manager.users.${username} = { - programs.starship = { - enable = true; - enableZshIntegration = config.modules.programs.zsh.enable; - settings = { - add_newline = false; - command_timeout = 1000; - line_break = { - disabled = true; - }; - directory = { - truncation_length = 3; - truncate_to_repo = false; - truncation_symbol = "…/"; - }; - c.symbol = " "; - directory.read_only = " 󰌾"; - git_branch.symbol = " "; - haskell.symbol = " "; - hostname.ssh_symbol = " "; - java.symbol = " "; - kotlin.symbol = " "; - meson.symbol = "󰔷 "; - nix_shell.symbol = " "; - package.symbol = "󰏗 "; - rust.symbol = " "; - }; - }; - }; - }; -} diff --git a/modules/cli/zsh.nix b/modules/cli/zsh.nix deleted file mode 100644 index 579efa8..0000000 --- a/modules/cli/zsh.nix +++ /dev/null @@ -1,98 +0,0 @@ -{ config, lib, pkgs, ... }: -with lib; let - cfg = config.modules.programs.zsh; - username = config.modules.other.system.username; - hostname = config.modules.other.system.hostname; - gitPath = config.modules.other.system.gitPath; -in { - options.modules.programs.zsh = { - enable = mkEnableOption "zsh"; - extraAliases = mkOption { - type = types.attrs; - description = "extra shell aliases"; - default = {}; - }; - profiling = mkOption { - type = types.bool; - description = "enable zsh profiling"; - default = false; - }; - ohmyzsh = { - enable = mkEnableOption "ohmyzsh"; - theme = mkOption { - type = types.str; - description = "oh-my-zsh theme"; - default = "alanpeabody"; - }; - plugins = mkOption { - type = types.listOf(types.str); - description = "oh-my-zsh plugins (like git)"; - default = [ "git" ]; - }; - }; - }; - - config = mkIf cfg.enable { - programs.zsh.enable = true; -# users.users.${username}.shell = pkgs.zsh; - environment = { - shells = [ pkgs.zsh ]; - pathsToLink = [ "/share/zsh" ]; - }; - home-manager.users.${username} = { - home.packages = with pkgs; [ nix-output-monitor ]; - programs.zoxide.enable = true; - programs.zoxide.enableZshIntegration = true; - programs.zsh = { - enable = true; - shellAliases = { - c = "clear"; - cc = "cd ~ && clear"; - mv = "mv -iv"; - # rm = "trash -v"; - ls = "eza"; - l = "eza -a --icons"; - la = "eza -lha --icons --git"; - ll = "eza -l"; - kys = "shutdown now"; - cd = "z"; - nv = "nvim"; - #TODO fix hardcoding of git repo path and profile name - update = "sudo -p 'password: ' echo 'Your daughter is just a fork of your wife.' && sudo nixos-rebuild switch --flake \"${gitPath}#${hostname}\" --log-format internal-json |& nom --json"; - flake = "cd '${gitPath}'"; - - } // cfg.extraAliases; - initExtraFirst = mkIf cfg.profiling "zmodload zsh/zprof"; - initExtra = mkIf cfg.profiling "zprof"; - history = { - path = "${config.home-manager.users.${username}.xdg.dataHome}/zsh/zsh_history"; - size = 99999; - save = 99999; - extended = true; - ignoreSpace = true; - }; - autosuggestion.enable = true; - enableCompletion = true; - autocd = false; - dotDir = ".config/zsh"; - plugins = [ - { - name = "fast-syntax-highlighting"; - file = "fast-syntax-highlighting.plugin.zsh"; - src = pkgs.fetchFromGitHub { - owner = "zdharma-continuum"; - repo = "fast-syntax-highlighting"; - rev = "cf318e06a9b7c9f2219d78f41b46fa6e06011fd9"; - sha256 = "sha256-RVX9ZSzjBW3LpFs2W86lKI6vtcvDWP6EPxzeTcRZua4="; - }; - } - ]; - oh-my-zsh = mkIf cfg.ohmyzsh.enable { - enable = true; - theme = cfg.ohmyzsh.theme; - plugins = cfg.ohmyzsh.plugins; - }; - }; - }; - }; -} diff --git a/modules/gui/WM/default.nix b/modules/gui/WM/default.nix deleted file mode 100644 index 90f980b..0000000 --- a/modules/gui/WM/default.nix +++ /dev/null @@ -1,5 +0,0 @@ -_: { - imports = [ - ./hyprland.nix - ]; -} diff --git a/modules/gui/WM/hyprland.nix b/modules/gui/WM/hyprland.nix deleted file mode 100644 index f332a5f..0000000 --- a/modules/gui/WM/hyprland.nix +++ /dev/null @@ -1,59 +0,0 @@ -{ config, lib, pkgs, ... }: - -with lib; -let - cfg = config.modules.WM.hyprland; - username = config.modules.other.system.username; - monitors = config.modules.other.system.monitors; -in -{ - options.modules.WM.hyprland = { - enable = mkEnableOption "hyprland"; - gnome-keyring = mkEnableOption "gnome-keyring"; - }; - - - config = mkIf cfg.enable { - programs.xwayland.enable = true; - programs.hyprland = { - enable = true; - }; - services.gnome.gnome-keyring.enable = cfg.gnome-keyring; - systemd.user.services.polkit-gnome-authentication-agent-1 = mkIf cfg.gnome-keyring { - description = "polkit-gnome-authentication-agent-1"; - wantedBy = [ "graphical-session.target" ]; - wants = [ "graphical-session.target" ]; - after = [ "graphical-session.target" ]; - serviceConfig = { - Type = "simple"; - ExecStart = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"; - Restart = "on-failure"; - RestartSec = 1; - TimeoutStopSec = 10; - }; - }; - - home-manager.users.${username} = { - home.packages = with pkgs; [ - bluetuith - brightnessctl - # needed for wayland copy / paste support in neovim - wl-clipboard - ]; - - wayland.windowManager.hyprland = { - enable = true; - systemd.enable = true; - xwayland.enable = true; - settings = { - exec-once = (if cfg.gnome-keyring then - ["${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1"] - else []); - monitor = map ( - m: "${m.device},${builtins.toString m.resolution.x}x${builtins.toString m.resolution.y}@${builtins.toString m.refresh_rate},${builtins.toString m.position.x}x${builtins.toString m.position.y},${builtins.toString m.scale},transform,${builtins.toString m.transform}" - ) monitors; #TODO: default value - }; - }; - }; - }; -} diff --git a/modules/gui/default.nix b/modules/gui/default.nix index f7eb384..a66e86a 100644 --- a/modules/gui/default.nix +++ b/modules/gui/default.nix @@ -7,7 +7,6 @@ _: { ./qt.nix ./zathura.nix ./rofi.nix - ./WM ./kitty.nix ./vivado.nix ./firefox.nix