diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-04-13 13:32:53 +0300 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2025-04-13 13:32:53 +0300 |
commit | b487953311497ac2544b16d2277f580159fedce7 (patch) | |
tree | 325327b6eb6042ea0a05db66b4a68721e75e253c /home-manager | |
parent | afc232ca26d4b4abb349935793e24fcc3f075e56 (diff) | |
download | nixos-configuration-main.tar.gz nixos-configuration-main.tar.bz2 nixos-configuration-main.zip |
Diffstat (limited to 'home-manager')
-rw-r--r-- | home-manager/stvnliu/home.nix | 2 | ||||
-rw-r--r-- | home-manager/stvnliu/hypr/hyprland/hyprbars.nix | 2 | ||||
-rw-r--r-- | home-manager/stvnliu/nixvim/lsp.nix | 2 | ||||
-rw-r--r-- | home-manager/stvnliu/nixvim/tagbar.nix | 3 | ||||
-rw-r--r-- | home-manager/stvnliu/packages/discord.nix | 2 | ||||
-rw-r--r-- | home-manager/stvnliu/packages/util-programs.nix | 1 | ||||
-rw-r--r-- | home-manager/stvnliu/programs/git.nix | 11 | ||||
-rw-r--r-- | home-manager/stvnliu/programs/git_config.nix | 13 | ||||
-rw-r--r-- | home-manager/stvnliu/scripts/launch-url-firefox.script.nix | 8 | ||||
-rw-r--r-- | home-manager/stvnliu/services/mpd.nix | 23 | ||||
-rw-r--r-- | home-manager/stvnliu/services/waybar.nix | 124 | ||||
-rw-r--r-- | home-manager/stvnliu/services/waybar_config.nix | 117 | ||||
-rw-r--r-- | home-manager/stvnliu/services/waybar_style.nix | 4 | ||||
-rw-r--r-- | home-manager/stvnliu/stylix.nix | 3 |
14 files changed, 158 insertions, 157 deletions
diff --git a/home-manager/stvnliu/home.nix b/home-manager/stvnliu/home.nix index 3462f1d..ae1589c 100644 --- a/home-manager/stvnliu/home.nix +++ b/home-manager/stvnliu/home.nix @@ -28,6 +28,7 @@ ]; # Configure your nixpkgs instance config = { + cudaSupport = true; permittedInsecurePackages = [ "dotnet-core-combined" "dotnet-sdk-6.0.428" @@ -58,7 +59,6 @@ kdePackages.kdenlive obsidian heroic - rustdesk ]; myAutostartCommands = [ #"${pkgs.clash-verge-rev}/bin/clash-verge" diff --git a/home-manager/stvnliu/hypr/hyprland/hyprbars.nix b/home-manager/stvnliu/hypr/hyprland/hyprbars.nix index 1279223..ef79e37 100644 --- a/home-manager/stvnliu/hypr/hyprland/hyprbars.nix +++ b/home-manager/stvnliu/hypr/hyprland/hyprbars.nix @@ -4,7 +4,7 @@ bar_color = "rgb(1e1e1e)"; "col.text" = "ffffff"; bar_text_size = 12; - bar_text_font = config.desktopFontFullName; + bar_text_font = config.desktopFont.fullName; bar_button_padding = 12; bar_padding = 10; bar_precedence_over_border = true; diff --git a/home-manager/stvnliu/nixvim/lsp.nix b/home-manager/stvnliu/nixvim/lsp.nix index 637fbf7..73124a1 100644 --- a/home-manager/stvnliu/nixvim/lsp.nix +++ b/home-manager/stvnliu/nixvim/lsp.nix @@ -11,7 +11,7 @@ #ruff.enable = true; #ruff_lsp.enable = true; - rust-analyzer = { + rust_analyzer = { enable = true; installCargo = false; installRustc = false; diff --git a/home-manager/stvnliu/nixvim/tagbar.nix b/home-manager/stvnliu/nixvim/tagbar.nix index e011bf7..2c7c1b0 100644 --- a/home-manager/stvnliu/nixvim/tagbar.nix +++ b/home-manager/stvnliu/nixvim/tagbar.nix @@ -1,9 +1,10 @@ { pkgs, ... }: { + + dependencies.ctags.package = pkgs.universal-ctags; plugins.tagbar = { enable = true; - tagsPackage = pkgs.universal-ctags; settings = { autoclose = false; autofocus = false; diff --git a/home-manager/stvnliu/packages/discord.nix b/home-manager/stvnliu/packages/discord.nix index 30e8bae..b0de476 100644 --- a/home-manager/stvnliu/packages/discord.nix +++ b/home-manager/stvnliu/packages/discord.nix @@ -1,7 +1,7 @@ { pkgs , ... }: { - home.packages = with pkgs; [ discord vesktop ]; + home.packages = with pkgs; [ discord vesktop cinny-desktop ]; /*xdg.desktopEntries.discord = { exec = "${pkgs.vesktop}/bin/vesktop"; terminal = false; diff --git a/home-manager/stvnliu/packages/util-programs.nix b/home-manager/stvnliu/packages/util-programs.nix index aeff855..59c3466 100644 --- a/home-manager/stvnliu/packages/util-programs.nix +++ b/home-manager/stvnliu/packages/util-programs.nix @@ -18,5 +18,6 @@ udiskie sxiv transmission_4-gtk + chromium ]; } diff --git a/home-manager/stvnliu/programs/git.nix b/home-manager/stvnliu/programs/git.nix index ebf934f..688902e 100644 --- a/home-manager/stvnliu/programs/git.nix +++ b/home-manager/stvnliu/programs/git.nix @@ -8,15 +8,6 @@ package = pkgs.gitFull; userName = config.myDisplayName; userEmail = config.myEmail; - extraConfig = { - core.autocrlf = "input"; - push.autoSetupRemote = true; - commit.gpgsign = true; - #gpg.format = "ssh"; - #gpg.ssh.allowedSignersFile = "/home/${config.myUserName}/.ssh/allowed_signers"; - #user.signingkey = "/home/${config.myUserName}/.ssh/id_ed25519.pub"; - user.signingkey = "DC8F48E7B4C40905"; - credential.helper = "libsecret"; - }; + extraConfig = import ./git_config.nix; }; } diff --git a/home-manager/stvnliu/programs/git_config.nix b/home-manager/stvnliu/programs/git_config.nix new file mode 100644 index 0000000..15011a0 --- /dev/null +++ b/home-manager/stvnliu/programs/git_config.nix @@ -0,0 +1,13 @@ +{ + core.autocrlf = "input"; + push = { + autoSetupRemote = true; + followTags = true; + }; + commit.gpgsign = true; + #gpg.format = "ssh"; + #gpg.ssh.allowedSignersFile = "/home/${config.myUserName}/.ssh/allowed_signers"; + #user.signingkey = "/home/${config.myUserName}/.ssh/id_ed25519.pub"; + user.signingkey = "DC8F48E7B4C40905"; + credential.helper = "libsecret"; +} diff --git a/home-manager/stvnliu/scripts/launch-url-firefox.script.nix b/home-manager/stvnliu/scripts/launch-url-firefox.script.nix new file mode 100644 index 0000000..b46d2b1 --- /dev/null +++ b/home-manager/stvnliu/scripts/launch-url-firefox.script.nix @@ -0,0 +1,8 @@ +{ pkgs, }: +let + # browserPath = lib.getExe config.programs.firefox.package; + # dmenuPath = lib.getExe pkgs.wmenu; +in +pkgs.writeShellScriptBin "urlmenu" '' + #!${pkgs.bash}/bin/bash +'' diff --git a/home-manager/stvnliu/services/mpd.nix b/home-manager/stvnliu/services/mpd.nix index 23e38e0..d8a1c4a 100644 --- a/home-manager/stvnliu/services/mpd.nix +++ b/home-manager/stvnliu/services/mpd.nix @@ -6,24 +6,11 @@ lib.mkIf config.usingMusicPlayerDaemon { network.listenAddress = "any"; network.port = 6600; extraConfig = '' - audio_output { - type "pipewire" - name "my pipewire output" - } - audio_output { - type "httpd" - name "My HTTP Stream" - encoder "vorbis" # optional, vorbis or lame - port "8000" - # bind_to_address "0.0.0.0" # optional, IPv4 or IPv6 - quality "5.0" # do not define if bitrate is defined - # bitrate "128" # do not define if quality is defined - format "44100:16:1" - max_clients "5" # optional 0=no limit - } + audio_output { + type "pipewire" + name "my pipewire output" + } ''; }; - services.mpd-mpris = { - enable = true; - }; + services.mpd-mpris = { enable = true; }; } diff --git a/home-manager/stvnliu/services/waybar.nix b/home-manager/stvnliu/services/waybar.nix index 9c6f655..ed489fa 100644 --- a/home-manager/stvnliu/services/waybar.nix +++ b/home-manager/stvnliu/services/waybar.nix @@ -2,127 +2,7 @@ programs.waybar = { enable = true; systemd = { enable = true; }; - style = '' - * { - font-family: JetBrainsMono Nerd Font; - } - ''; - settings = { - mainBar = { - layer = "top"; - position = "bottom"; - height = 30; - output = [ "eDP-1" "eDP-2" "HDMI-A-1" ]; - modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; - modules-center = [ "mpd" ]; - modules-right = - [ "clock" "group/trays" "group/monitor" "wireplumber" "temperature" ]; - "battery" = { - "bat" = "BAT1"; - "format" = "BAT {capacity}% @ {power}W"; - }; - "hyprland/workspaces" = { - disable-scroll = true; - all-outputs = true; - }; - "tray" = { - "icon-size" = 18; - "spacing" = 10; - }; - "custom/tray-label" = { "format" = "[TRAY]"; }; - "custom/monitor-label" = { "format" = "[HW]"; }; - "group/trays" = { - "orientation" = "inherit"; - "modules" = [ "custom/tray-label" "tray" ]; - "drawer" = { "click-to-reveal" = true; }; - }; - "group/monitor" = { - "orientation" = "inherit"; - "modules" = [ "custom/monitor-label" "battery" "cpu" "memory" ]; - "drawer" = { "click-to-reveal" = true; }; - }; - "mpd" = { - "artist-len" = 10; - "album-len" = 10; - "title-len" = 20; - "format" = - "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) "; - "format-disconnected" = "Disconnected "; - "format-stopped" = - "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; - "interval" = 10; - "consume-icons" = { - "on" = " "; # Icon shows only when "consume" is on - }; - "random-icons" = { - "off" = '' - <span color="#f53c3c"></span> ''; # Icon grayed out when "random" is off - "on" = " "; - }; - "repeat-icons" = { "on" = " "; }; - "single-icons" = { "on" = " 1 "; }; - "state-icons" = { - "paused" = ""; - "playing" = ""; - }; - "tooltip-format" = "MPD (connected)"; - "tooltip-format-disconnected" = "MPD (disconnected)"; - }; - "wireplumber" = { - "format" = "{volume}% {icon}"; - "format-muted" = ""; - "format-icons" = [ "" "" "" ]; - }; - "cpu" = { - "format" = "CPU {icon}"; - "format-icons" = [ - "<span color='#69ff94'>▁</span>" # green - "<span color='#2aa9ff'>▂</span>" # blue - "<span color='#f8f8f2'>▃</span>" # white - "<span color='#f8f8f2'>▄</span>" # white - "<span color='#ffffa5'>▅</span>" # yellow - "<span color='#ffffa5'>▆</span>" # yellow - "<span color='#ff9977'>▇</span>" # orange - "<span color='#dd532e'>█</span>" # red - ]; - "memory" = { "format" = "MEM {percentage}%"; }; - }; - "clock" = { - "format" = "{:%H:%M} "; - "format-alt" = "{:%A, %B %d, %Y (%R)}"; - "tooltip-format" = "<tt><small>{calendar}</small></tt>"; - "calendar" = { - "mode" = "year"; - "mode-mon-col" = 3; - "weeks-pos" = "right"; - "on-scroll" = 1; - "format" = { - "months" = "<span color='#ffead3'><b>{}</b></span>"; - "days" = "<span color='#ecc6d9'><b>{}</b></span>"; - "weeks" = "<span color='#99ffdd'><b>W{}</b></span>"; - "weekdays" = "<span color='#ffcc66'><b>{}</b></span>"; - "today" = "<span color='#ff6699'><b><u>{}</u></b></span>"; - }; - }; - /* "actions" = { - "on-click-right" = "mode"; - "on-scroll-up" = "tz_up"; - "on-scroll-down" = "tz_down"; - "on-scroll-up" = "shift_up"; - "on-scroll-down" = "shift_down"; - }; - */ - }; - /* "custom/hello-from-waybar" = { - format = "hello {}"; - max-length = 40; - interval = "once"; - exec = pkgs.writeShellScript "hello-from-waybar" '' - echo "from within waybar" - ''; - }; - */ - }; - }; + style = "${import ./waybar_style.nix { }}"; + settings = import ./waybar_config.nix; }; } diff --git a/home-manager/stvnliu/services/waybar_config.nix b/home-manager/stvnliu/services/waybar_config.nix new file mode 100644 index 0000000..382e096 --- /dev/null +++ b/home-manager/stvnliu/services/waybar_config.nix @@ -0,0 +1,117 @@ +{ + mainBar = { + layer = "top"; + position = "bottom"; + height = 30; + output = [ "eDP-1" "eDP-2" "HDMI-A-1" ]; + modules-left = [ "hyprland/workspaces" "hyprland/submap" ]; + modules-center = [ "mpd" ]; + modules-right = + [ "clock" "group/trays" "group/monitor" "wireplumber" "temperature" ]; + "battery" = { + "bat" = "BAT1"; + "format" = "BAT {capacity}% @ {power}W"; + }; + "hyprland/workspaces" = { + disable-scroll = true; + all-outputs = true; + }; + "tray" = { + "icon-size" = 18; + "spacing" = 10; + }; + "custom/tray-label" = { "format" = "[TRAY]"; }; + "custom/monitor-label" = { "format" = "[HW]"; }; + "group/trays" = { + "orientation" = "inherit"; + "modules" = [ "custom/tray-label" "tray" ]; + "drawer" = { "click-to-reveal" = true; }; + }; + "group/monitor" = { + "orientation" = "inherit"; + "modules" = [ "custom/monitor-label" "battery" "cpu" "memory" ]; + "drawer" = { "click-to-reveal" = true; }; + }; + "mpd" = { + "artist-len" = 10; + "album-len" = 10; + "title-len" = 20; + "format" = + "{stateIcon} {consumeIcon}{randomIcon}{repeatIcon}{singleIcon}{artist} - {album} - {title} ({elapsedTime:%M:%S}/{totalTime:%M:%S}) "; + "format-disconnected" = "Disconnected "; + "format-stopped" = + "{consumeIcon}{randomIcon}{repeatIcon}{singleIcon}Stopped "; + "interval" = 10; + "consume-icons" = { + "on" = " "; # Icon shows only when "consume" is on + }; + "random-icons" = { + "off" = '' + <span color="#f53c3c"></span> ''; # Icon grayed out when "random" is off + "on" = " "; + }; + "repeat-icons" = { "on" = " "; }; + "single-icons" = { "on" = " 1 "; }; + "state-icons" = { + "paused" = ""; + "playing" = ""; + }; + "tooltip-format" = "MPD (connected)"; + "tooltip-format-disconnected" = "MPD (disconnected)"; + }; + "wireplumber" = { + "format" = "{volume}% {icon}"; + "format-muted" = ""; + "format-icons" = [ "" "" "" ]; + }; + "cpu" = { + "format" = "CPU {icon}"; + "format-icons" = [ + "<span color='#69ff94'>▁</span>" # green + "<span color='#2aa9ff'>▂</span>" # blue + "<span color='#f8f8f2'>▃</span>" # white + "<span color='#f8f8f2'>▄</span>" # white + "<span color='#ffffa5'>▅</span>" # yellow + "<span color='#ffffa5'>▆</span>" # yellow + "<span color='#ff9977'>▇</span>" # orange + "<span color='#dd532e'>█</span>" # red + ]; + "memory" = { "format" = "MEM {percentage}%"; }; + }; + "clock" = { + "format" = "{:%H:%M} "; + "format-alt" = "{:%A, %B %d, %Y (%R)}"; + "tooltip-format" = "<tt><small>{calendar}</small></tt>"; + "calendar" = { + "mode" = "year"; + "mode-mon-col" = 3; + "weeks-pos" = "right"; + "on-scroll" = 1; + "format" = { + "months" = "<span color='#ffead3'><b>{}</b></span>"; + "days" = "<span color='#ecc6d9'><b>{}</b></span>"; + "weeks" = "<span color='#99ffdd'><b>W{}</b></span>"; + "weekdays" = "<span color='#ffcc66'><b>{}</b></span>"; + "today" = "<span color='#ff6699'><b><u>{}</u></b></span>"; + }; + }; + /* "actions" = { + "on-click-right" = "mode"; + "on-scroll-up" = "tz_up"; + "on-scroll-down" = "tz_down"; + "on-scroll-up" = "shift_up"; + "on-scroll-down" = "shift_down"; + }; + */ + }; + /* "custom/hello-from-waybar" = { + format = "hello {}"; + max-length = 40; + interval = "once"; + exec = pkgs.writeShellScript "hello-from-waybar" '' + echo "from within waybar" + ''; + }; + */ + }; +} diff --git a/home-manager/stvnliu/services/waybar_style.nix b/home-manager/stvnliu/services/waybar_style.nix new file mode 100644 index 0000000..2849206 --- /dev/null +++ b/home-manager/stvnliu/services/waybar_style.nix @@ -0,0 +1,4 @@ +{ ... }: '' + * { + font-family: JetBrainsMono Nerd Font; + }'' diff --git a/home-manager/stvnliu/stylix.nix b/home-manager/stvnliu/stylix.nix index b7e675b..f26a962 100644 --- a/home-manager/stvnliu/stylix.nix +++ b/home-manager/stvnliu/stylix.nix @@ -17,7 +17,7 @@ in package = pkgs.helvetica-neue-lt-std; }; monospace = { - name = config.desktopFontFullName; + name = config.desktopFont.fullName; package = pkgs.nerd-fonts.jetbrains-mono; }; sizes = { @@ -25,7 +25,6 @@ in applications = 14; }; }; - cursor.size = 24; opacity = { applications = globalOpacity; desktop = globalOpacity; |