From f6cf9bea4125ce0501c72374fa4ed82dc03d3147 Mon Sep 17 00:00:00 2001 From: schererleander Date: Sun, 11 May 2025 16:48:04 +0200 Subject: chore, formatting --- modules/chromium.nix | 6 ++---- modules/default.nix | 1 - modules/emacs.nix | 8 +++----- modules/firefox.nix | 14 +++++++------- modules/foot.nix | 7 ++----- modules/git.nix | 7 ++----- modules/nextcloud.nix | 6 ++---- modules/nixcord.nix | 6 ++---- modules/nixvim.nix | 13 ------------- modules/nvf.nix | 11 +++++------ modules/spicetify.nix | 6 ++++-- modules/sway.nix | 10 ++++++++-- modules/tmux.nix | 7 ++----- modules/vscode.nix | 8 ++++---- modules/waybar.nix | 10 +++++----- modules/wezterm.nix | 6 ++---- modules/zathura.nix | 7 +++---- modules/zsh.nix | 7 ++----- 18 files changed, 55 insertions(+), 85 deletions(-) delete mode 100644 modules/nixvim.nix (limited to 'modules') diff --git a/modules/chromium.nix b/modules/chromium.nix index fab8632..7f9a1fe 100644 --- a/modules/chromium.nix +++ b/modules/chromium.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.chromium; -in { +{ options.chromium.enable = lib.mkEnableOption "Enable chromium and setup with extension"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.chromium.enable { programs.chromium = { enable = true; package = pkgs.ungoogled-chromium; diff --git a/modules/default.nix b/modules/default.nix index e26dd1f..911b8b1 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -16,6 +16,5 @@ ./wezterm.nix ./firefox.nix ./nvf.nix - ./nixvim.nix ]; } diff --git a/modules/emacs.nix b/modules/emacs.nix index 47192a4..661e065 100644 --- a/modules/emacs.nix +++ b/modules/emacs.nix @@ -1,13 +1,11 @@ { config, lib, pkgs, ... }: -let - cfg = config.emacs; -in { +{ options.emacs.enable = lib.mkEnableOption "Enable emacs and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.emacs.enable { programs.emacs = { enable = true; package = pkgs.emacs; }; }; -} +} \ No newline at end of file diff --git a/modules/firefox.nix b/modules/firefox.nix index f8ecc68..c7bc6d9 100644 --- a/modules/firefox.nix +++ b/modules/firefox.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, inputs, ... }: -let - cfg = config.firefox; -in { +{ options.firefox.enable = lib.mkEnableOption "Setup firefox"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.firefox.enable { programs.firefox = { enable = true; profiles.default = { @@ -79,7 +76,7 @@ in { /* Transparent background tabs (above url bar) */ #navigator-toolbox { -moz-appearance: -moz-vibrant-titlebar !important; - background: rgba(0, 0, 0, 0.85) !important; + background: rgba(0, 0, 0, 0.8) !important; } /* Transparent background (behind url bar) */ @@ -199,6 +196,9 @@ in { Preferences = { "toolkit.legacyUserProfileCustomizations.stylesheets" = true; "browser.toolbars.bookmarks.visibility" = "never"; + + # Hide pip controls + "media.videocontrols.picture-in-picture.video-toggle.enabled" = false; # Set homepage "browser.startup.homepage" = "about:blank"; @@ -254,4 +254,4 @@ in { }; }; }; -} +} \ No newline at end of file diff --git a/modules/foot.nix b/modules/foot.nix index 4fe4e4b..902dd56 100644 --- a/modules/foot.nix +++ b/modules/foot.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.foot; -in { +{ options.foot.enable = lib.mkEnableOption "Enable and configure the Foot terminal emulator"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.foot.enable { home.packages = with pkgs; [ (nerdfonts.override { fonts = [ "SpaceMono" "IBMPlexMono" "Terminus" ]; }) ]; diff --git a/modules/git.nix b/modules/git.nix index caf445c..d123ca2 100644 --- a/modules/git.nix +++ b/modules/git.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.git; -in { +{ options.git.enable = lib.mkEnableOption "Enable and configure Git"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.git.enable { programs.git = { enable = true; userName = "schererleander"; diff --git a/modules/nextcloud.nix b/modules/nextcloud.nix index 9d9ba3c..81561d9 100644 --- a/modules/nextcloud.nix +++ b/modules/nextcloud.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.nextcloud; -in { +{ options.nextcloud.enable = lib.mkEnableOption "Enable nextcloud and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.nextcloud.enable { home.file.".netrc".text = ''default login exmaple password test123 diff --git a/modules/nixcord.nix b/modules/nixcord.nix index fa0135b..0be180b 100644 --- a/modules/nixcord.nix +++ b/modules/nixcord.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, inputs, ... }: -let - cfg = config.nixcord; -in { +{ options.nixcord.enable = lib.mkEnableOption "Enable nixcord and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.nixcord.enable { programs.nixcord = { enable = true; # enable Nixcord. Also installs discord package #quickCss = "some CSS"; # quickCSS file diff --git a/modules/nixvim.nix b/modules/nixvim.nix deleted file mode 100644 index dd418b2..0000000 --- a/modules/nixvim.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, pkgs, ... }: - -let - cfg = config.nixvim; -in { - options.nixvim.enable = lib.mkEnableOption "Setup nixvim"; - - config = lib.mkIf cfg.enable { - programs.nixvim = { - enable = true; - }; - }; -} diff --git a/modules/nvf.nix b/modules/nvf.nix index 5b6f6d7..1f3c93a 100644 --- a/modules/nvf.nix +++ b/modules/nvf.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.nvf; -in { +{ options.nvf.enable = lib.mkEnableOption "Setup nvf"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.nvf.enable { programs.nvf = { enable = true; settings = { @@ -59,6 +56,8 @@ in { nix.enable = true; }; + formatter.conform-nvim.enable = true; + visuals = { nvim-web-devicons.enable = true; }; @@ -86,4 +85,4 @@ in { }; }; }; -} +} \ No newline at end of file diff --git a/modules/spicetify.nix b/modules/spicetify.nix index 6873d35..5d245d9 100644 --- a/modules/spicetify.nix +++ b/modules/spicetify.nix @@ -1,10 +1,10 @@ { config, lib, pkgs, inputs, ... }: + let - cfg = config.spicetify; spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system}; in { options.spicetify.enable = lib.mkEnableOption "Enable Spicetify integration"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.spicetify.enable { programs.spicetify = { enable = true; enabledSnippets = with spicePkgs.snippets; [ @@ -14,9 +14,11 @@ in { nyanCatProgressBar declutterNowPlayingBar ]; + enabledExtensions = with spicePkgs.extensions; [ keyboardShortcut ]; + theme = spicePkgs.themes.sleek; colorScheme = "Coral"; }; diff --git a/modules/sway.nix b/modules/sway.nix index a935c57..36ad4b4 100644 --- a/modules/sway.nix +++ b/modules/sway.nix @@ -1,11 +1,10 @@ { config, lib, pkgs, ... }: let - cfg = config.sway; mod = config.wayland.windowManager.sway.config.modifier; in { options.sway.enable = lib.mkEnableOption "Enable sway and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.sway.enable { home.packages = with pkgs; [ wmenu swaybg @@ -35,20 +34,25 @@ in { xkb_layout = "de"; }; }; + output = { DP-1 = { resolution = "1920x1080@240Hz"; bg = "/etc/nixos/jaison-lin-2WHTac8jVA8-unsplash.jpg fill"; }; }; + gaps = { inner = 15; }; + window = { titlebar = false; border = 0; }; + modifier = "Mod4"; + keybindings = lib.mkOptionDefault { "${mod}+q" = "kill"; "XF86AudioPlay" = "exec playerctl play-pause"; @@ -58,9 +62,11 @@ in { "XF86AudioLowerVolume" = "exec wpctl set-volume @DEFAULT_AUDIO_DEVICE@ -5%"; "XF86AudioMute" = "exec wpctl set-mute @DEFAULT_AUDIO_DEVICE@ toggle"; }; + menu = "${pkgs.wmenu}/bin/wmenu-run -b -N 000000"; terminal = "${pkgs.foot}/bin/foot"; defaultWorkspace = "workspace number 1"; + bars = [{ "command" = "${pkgs.waybar}/bin/waybar"; }]; diff --git a/modules/tmux.nix b/modules/tmux.nix index 57b4aae..e109375 100644 --- a/modules/tmux.nix +++ b/modules/tmux.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.tmux; -in { +{ options.tmux.enable = lib.mkEnableOption "Enable and configure Tmux"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.tmux.enable { programs.tmux = { enable = true; extraConfig = '' diff --git a/modules/vscode.nix b/modules/vscode.nix index 93f9743..86a5341 100644 --- a/modules/vscode.nix +++ b/modules/vscode.nix @@ -1,15 +1,14 @@ { config, lib, pkgs, ... }: -let - cfg = config.vscode; -in { +{ options.vscode.enable = lib.mkEnableOption "Enable vscode and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.vscode.enable { programs.vscode = { enable = true; enableUpdateCheck = true; enableExtensionUpdateCheck = true; mutableExtensionsDir = false; + userSettings = { "workbench.colorTheme" = "Minimal"; "editor.fontFamily" = "'SpaceMono Nerd Font Mono', monospace"; @@ -22,6 +21,7 @@ in { "git.autofetch" = true; "window.controlsStyle" = "custom"; }; + extensions = (with pkgs.vscode-extensions; [ ms-vscode.cmake-tools ms-azuretools.vscode-docker diff --git a/modules/waybar.nix b/modules/waybar.nix index fccebd4..5653b08 100644 --- a/modules/waybar.nix +++ b/modules/waybar.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.waybar; -in { +{ options.waybar.enable = lib.mkEnableOption "Enable and configure Waybar"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.waybar.enable { programs.waybar = { enable = true; settings = { @@ -21,10 +18,12 @@ in { "clock" "tray" ]; + clock = { format-alt = "{:%Y-%m-%d}"; tooltip-format = "{:%Y-%m-%d | %H:%M}"; }; + pulseaudio = { format = "{volume}% {icon}"; format-bluetooth = "{volume}% {icon}"; @@ -34,6 +33,7 @@ in { }; }; }; + style = '' * { border: none; diff --git a/modules/wezterm.nix b/modules/wezterm.nix index c9e52ae..ca19e1a 100644 --- a/modules/wezterm.nix +++ b/modules/wezterm.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.wezterm; -in { +{ options.wezterm.enable = lib.mkEnableOption "Enable wezterm and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.wezterm.enable { home.packages = with pkgs; [ (nerdfonts.override { fonts = [ "SpaceMono" "IBMPlexMono" "Terminus" ]; }) ]; diff --git a/modules/zathura.nix b/modules/zathura.nix index 164c760..592119b 100644 --- a/modules/zathura.nix +++ b/modules/zathura.nix @@ -1,10 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.zathura; -in { +{ options.zathura.enable = lib.mkEnableOption "Enable zathura and setup"; - config = lib.mkIf cfg.enable { + config = lib.mkIf config.zathura.enable { programs.zathura = { enable = true; options = { @@ -18,6 +16,7 @@ in { pages-per-row = 1; scroll-page-aware = true; }; + mappings = { i = "recolor"; j = "navigate previous"; diff --git a/modules/zsh.nix b/modules/zsh.nix index 68b9a23..adb51a4 100644 --- a/modules/zsh.nix +++ b/modules/zsh.nix @@ -1,11 +1,8 @@ { config, lib, pkgs, ... }: -let - cfg = config.zsh; -in { +{ options.zsh.enable = lib.mkEnableOption "Configure zsh"; - - config = lib.mkIf cfg.enable { + config = lib.mkIf config.zsh.enable { home.packages = with pkgs; [ zoxide ]; -- cgit v1.3.1