mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-02-22 21:05:14 +08:00
chore: merge remote-tracking branch 'refs/remotes/origin/master'
This commit is contained in:
commit
817a83119f
14 changed files with 205 additions and 19 deletions
|
|
@ -4,7 +4,6 @@
|
||||||
[ (import ./docker.nix) ]
|
[ (import ./docker.nix) ]
|
||||||
++ [ (import ../security/default.nix) ]
|
++ [ (import ../security/default.nix) ]
|
||||||
++ [ (import ./hardware.nix) ]
|
++ [ (import ./hardware.nix) ]
|
||||||
++ [ (import ./displaylink.nix) ]
|
|
||||||
# ++ [(import ./printing.nix)]
|
# ++ [(import ./printing.nix)]
|
||||||
++ [ (import ./xserver.nix) ]
|
++ [ (import ./xserver.nix) ]
|
||||||
++ [ (import ./network.nix) ]
|
++ [ (import ./network.nix) ]
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,11 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
services.smartd = {
|
services.smartd = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autodetect = true;
|
autodetect = true;
|
||||||
};
|
};
|
||||||
|
hardware.logitech.wireless = {
|
||||||
|
enable = true;
|
||||||
|
enableGraphical = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,5 +12,29 @@
|
||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
avahi.enable = lib.mkDefault false;
|
avahi.enable = lib.mkDefault false;
|
||||||
|
tailscale = {
|
||||||
|
enable = true;
|
||||||
|
useRoutingFeatures = "client";
|
||||||
|
extraUpFlags = [
|
||||||
|
# "--accept-dns=false"
|
||||||
|
"--accept-routes"
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
wireshark.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dig
|
||||||
|
iftop
|
||||||
|
inetutils
|
||||||
|
ipcalc
|
||||||
|
iperf
|
||||||
|
nmap
|
||||||
|
tcpdump
|
||||||
|
traceroute
|
||||||
|
tshark
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,11 +8,4 @@
|
||||||
# pinentryFlavor = "";
|
# pinentryFlavor = "";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
wget
|
|
||||||
git
|
|
||||||
dig
|
|
||||||
traceroute
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@
|
||||||
libraries = with pkgs; [ ];
|
libraries = with pkgs; [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.envfs.enable = true;
|
||||||
|
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
overlays = [
|
overlays = [
|
||||||
self.overlays.default
|
self.overlays.default
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
++ [ (import ./swaync/default.nix) ]
|
++ [ (import ./swaync/default.nix) ]
|
||||||
++ [ (import ./sway/default.nix) ]
|
++ [ (import ./sway/default.nix) ]
|
||||||
++ [ (import ./fonts.nix) ]
|
++ [ (import ./fonts.nix) ]
|
||||||
|
++ [ (import ./htop.nix) ]
|
||||||
++ [ (import ./hyprland) ]
|
++ [ (import ./hyprland) ]
|
||||||
++ [ (import ./hyprlock) ]
|
++ [ (import ./hyprlock) ]
|
||||||
++ [ (import ./kitty.nix) ]
|
++ [ (import ./kitty.nix) ]
|
||||||
|
|
@ -16,8 +17,10 @@
|
||||||
++ [ (import ./packages.nix) ]
|
++ [ (import ./packages.nix) ]
|
||||||
++ [ (import ./scripts/scripts.nix) ]
|
++ [ (import ./scripts/scripts.nix) ]
|
||||||
++ [ (import ./spotify.nix) ]
|
++ [ (import ./spotify.nix) ]
|
||||||
|
++ [ (import ./ssh.nix) ]
|
||||||
++ [ (import ./waybar) ]
|
++ [ (import ./waybar) ]
|
||||||
++ [ (import ./zsh.nix) ]
|
++ [ (import ./zsh.nix) ]
|
||||||
++ [ (import ./qutebrowser.nix) ]
|
++ [ (import ./qutebrowser.nix) ]
|
||||||
|
++ [ (import ./xdg.nix) ]
|
||||||
++ [ (import ./tmux.nix) ];
|
++ [ (import ./tmux.nix) ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
59
modules/home/htop.nix
Normal file
59
modules/home/htop.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
|
||||||
|
programs.htop = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.htop;
|
||||||
|
};
|
||||||
|
|
||||||
|
home.file.".config/htop/htoprc" = {
|
||||||
|
text = ''
|
||||||
|
fields=0 48 38 39 40 2 46 109 110 47 49 1
|
||||||
|
hide_kernel_threads=1
|
||||||
|
hide_userland_threads=0
|
||||||
|
hide_running_in_container=0
|
||||||
|
shadow_other_users=0
|
||||||
|
show_thread_names=0
|
||||||
|
show_program_path=1
|
||||||
|
highlight_base_name=1
|
||||||
|
highlight_deleted_exe=1
|
||||||
|
shadow_distribution_path_prefix=0
|
||||||
|
highlight_megabytes=1
|
||||||
|
highlight_threads=1
|
||||||
|
highlight_changes=0
|
||||||
|
highlight_changes_delay_secs=5
|
||||||
|
find_comm_in_cmdline=1
|
||||||
|
strip_exe_from_cmdline=1
|
||||||
|
show_merged_command=0
|
||||||
|
header_margin=1
|
||||||
|
screen_tabs=1
|
||||||
|
detailed_cpu_time=1
|
||||||
|
cpu_count_from_one=0
|
||||||
|
show_cpu_usage=1
|
||||||
|
show_cpu_frequency=1
|
||||||
|
show_cpu_temperature=1
|
||||||
|
degree_fahrenheit=0
|
||||||
|
show_cached_memory=1
|
||||||
|
update_process_names=0
|
||||||
|
account_guest_in_cpu_meter=0
|
||||||
|
color_scheme=6
|
||||||
|
enable_mouse=1
|
||||||
|
delay=15
|
||||||
|
hide_function_bar=0
|
||||||
|
header_layout=two_50_50
|
||||||
|
column_meters_0=LeftCPUs2 MemorySwap PressureStallMemoryFull PressureStallIOFull DiskIO NetworkIO Uptime
|
||||||
|
column_meter_modes_0=1 1 2 2 2 2 2
|
||||||
|
column_meters_1=RightCPUs2 CPU PressureStallCPUSome LoadAverage Tasks System Systemd Battery
|
||||||
|
column_meter_modes_1=1 1 2 2 2 2 2 2
|
||||||
|
tree_view=0
|
||||||
|
sort_key=46
|
||||||
|
tree_sort_key=0
|
||||||
|
sort_direction=-1
|
||||||
|
tree_sort_direction=1
|
||||||
|
tree_view_always_by_pid=0
|
||||||
|
all_branches_collapsed=0
|
||||||
|
screen:Main=PID USER M_VIRT M_RESIDENT M_SHARE STATE PERCENT_CPU IO_READ_RATE IO_WRITE_RATE PERCENT_MEM TIME Command
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -124,6 +124,7 @@
|
||||||
"nwg-dock-hyprland -l top &"
|
"nwg-dock-hyprland -l top &"
|
||||||
"nextcloud &"
|
"nextcloud &"
|
||||||
"hyprland-monitor-attached dock-on-all-monitors dock-on-all-monitors &"
|
"hyprland-monitor-attached dock-on-all-monitors dock-on-all-monitors &"
|
||||||
|
"vicinae server &"
|
||||||
];
|
];
|
||||||
|
|
||||||
input = {
|
input = {
|
||||||
|
|
@ -279,7 +280,8 @@
|
||||||
"$mainMod SHIFT, X, exec, footclient --title 'float_foot' zsh -c 'bash ~/.local/src/bw-fzf/bw-fzf.sh"
|
"$mainMod SHIFT, X, exec, footclient --title 'float_foot' zsh -c 'bash ~/.local/src/bw-fzf/bw-fzf.sh"
|
||||||
|
|
||||||
# clipboard manager
|
# clipboard manager
|
||||||
"$mainMod SHIFT, V, exec, cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy"
|
# "$mainMod SHIFT, V, exec, cliphist list | bemenu -l 5 --ignorecase | cliphist decode | wl-copy"
|
||||||
|
"$mainMod SHIFT, V, exec, vicinae vicinae://extensions/vicinae/clipboard/history"
|
||||||
|
|
||||||
"$mainMod SHIFT, F, exec, librewolf"
|
"$mainMod SHIFT, F, exec, librewolf"
|
||||||
"$mainMod SHIFT, C, exec, chromium"
|
"$mainMod SHIFT, C, exec, chromium"
|
||||||
|
|
@ -398,6 +400,14 @@
|
||||||
# "opacity 0.5 0.5, match:class nwg-dock-hyprland"
|
# "opacity 0.5 0.5, match:class nwg-dock-hyprland"
|
||||||
"no_blur on, match:class ungoogled-chromium"
|
"no_blur on, match:class ungoogled-chromium"
|
||||||
"no_blur on, match:class librewolf"
|
"no_blur on, match:class librewolf"
|
||||||
|
"no_screen_share on, match:class element-desktop"
|
||||||
|
"match:title ^(.*Bitwarden Password Manager.*)$, float on"
|
||||||
|
"match:title ^(Picture-in-Picture)$, float on"
|
||||||
|
"match:title ^(Picture-in-Picture)$, pin on"
|
||||||
|
# stop idle when watching videos
|
||||||
|
"match:class ^(mpv|.+exe|celluloid)$, idle_inhibit focus"
|
||||||
|
"match:class ^(chromium)$, match:title ^(.*YouTube.*)$, idle_inhibit focus"
|
||||||
|
"match:class ^(chromium)$, idle_inhibit fullscreen"
|
||||||
# "noanim, class:^(bemenu)$"
|
# "noanim, class:^(bemenu)$"
|
||||||
# "float, title:^(Picture-in-Picture)$"
|
# "float, title:^(Picture-in-Picture)$"
|
||||||
# "opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
|
# "opacity 1.0 override 1.0 override, title:^(Picture-in-Picture)$"
|
||||||
|
|
@ -430,7 +440,10 @@
|
||||||
# "float,title:^(float_foot)$"
|
# "float,title:^(float_foot)$"
|
||||||
# "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
# "nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
|
||||||
];
|
];
|
||||||
|
layerrule = [
|
||||||
|
"match:class vicinae, blur on"
|
||||||
|
"match:class vicinae, ignore_alpha 0"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
extraConfig = "
|
extraConfig = "
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
criteria = "eDP-1";
|
criteria = "eDP-1";
|
||||||
status = if (host == "sakura") then "enable" else "disable";
|
status = if (host == "sakura") then "disable" else "disable";
|
||||||
position = if (host == "sakura") then "152,1440" else "300,1440";
|
position = if (host == "sakura") then "152,1440" else "300,1440";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,6 @@
|
||||||
pwgen
|
pwgen
|
||||||
jq
|
jq
|
||||||
tmux
|
tmux
|
||||||
htop
|
|
||||||
eza
|
eza
|
||||||
file
|
file
|
||||||
fzf
|
fzf
|
||||||
|
|
@ -66,6 +65,19 @@
|
||||||
nmap
|
nmap
|
||||||
aerc
|
aerc
|
||||||
|
|
||||||
|
aspell
|
||||||
|
aspellDicts.de
|
||||||
|
aspellDicts.nl
|
||||||
|
aspellDicts.uk
|
||||||
|
|
||||||
|
# Hunspell dictionaries for spell checking
|
||||||
|
hunspell
|
||||||
|
hunspellDicts.de_DE # German
|
||||||
|
hunspellDicts.en_GB-ise # UK English with -ise spellings
|
||||||
|
hunspellDicts.en_US
|
||||||
|
hunspellDicts.nl_NL # Dutch
|
||||||
|
hunspellDicts.nl_nl # Dutch (alternative)
|
||||||
|
|
||||||
# Install pip packages
|
# Install pip packages
|
||||||
# python3
|
# python3
|
||||||
# python3Packages.pip
|
# python3Packages.pip
|
||||||
|
|
|
||||||
9
modules/home/ssh.nix
Normal file
9
modules/home/ssh.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
programs.ssh = {
|
||||||
|
matchBlocks = {
|
||||||
|
"github.com gitlab.com" = {
|
||||||
|
user = "git";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -288,7 +288,8 @@
|
||||||
"orientation": "horizontal",
|
"orientation": "horizontal",
|
||||||
"modules": [
|
"modules": [
|
||||||
"battery",
|
"battery",
|
||||||
"custom/powerdraw"
|
"custom/powerdraw",
|
||||||
|
"power-profiles-daemon"
|
||||||
],
|
],
|
||||||
"drawer": {
|
"drawer": {
|
||||||
"transition-left-to-right": false,
|
"transition-left-to-right": false,
|
||||||
|
|
@ -318,6 +319,14 @@
|
||||||
"custom/powerdraw": {
|
"custom/powerdraw": {
|
||||||
"interval": 60,
|
"interval": 60,
|
||||||
"exec": "~/.local/bin/waybar-powerdraw",
|
"exec": "~/.local/bin/waybar-powerdraw",
|
||||||
|
"tooltip": false,
|
||||||
|
},
|
||||||
|
|
||||||
|
"power-profiles-daemon": {
|
||||||
|
"interval": 60,
|
||||||
|
"format": "{profile}",
|
||||||
|
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
|
||||||
|
"tooltip": true,
|
||||||
},
|
},
|
||||||
|
|
||||||
"group/clock": {
|
"group/clock": {
|
||||||
|
|
|
||||||
41
modules/home/xdg.nix
Normal file
41
modules/home/xdg.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
xdg.mimeApps = {
|
||||||
|
enable = true;
|
||||||
|
defaultApplications = {
|
||||||
|
"image/tiff" = "nsxiv.desktop";
|
||||||
|
"image/jp2" = "nsxiv.desktop";
|
||||||
|
"image/jxl" = "nsxiv.desktop";
|
||||||
|
"image/jpeg" = "nsxiv.desktop";
|
||||||
|
"image/x-canon-cr2" = "nsxiv.desktop";
|
||||||
|
"image/x-jp2-codestream" = "nsxiv.desktop";
|
||||||
|
"image/webp" = "nsxiv.desktop";
|
||||||
|
"image/x-nikon-nef" = "nsxiv.desktop";
|
||||||
|
"image/x-sony-arw" = "nsxiv.desktop";
|
||||||
|
"image/gif" = "nsxiv.desktop";
|
||||||
|
"image/x-fuji-raf" = "nsxiv.desktop";
|
||||||
|
"image/heif" = "nsxiv.desktop";
|
||||||
|
"audio/mpeg" = "mpv.desktop";
|
||||||
|
"audio/mp3" = "mpv.desktop";
|
||||||
|
"audio/vnd.wave" = "mpv.desktop";
|
||||||
|
"video/mp4" = "mpv.desktop";
|
||||||
|
"video/mkv" = "mpv.desktop";
|
||||||
|
"x-scheme-handler/sgnl" = "signal-desktop.desktop";
|
||||||
|
"x-scheme-handler/signalcaptcha" = "signal-desktop.desktop";
|
||||||
|
"x-scheme-handler/http" = "chromium-browser.desktop";
|
||||||
|
"x-scheme-handler/https" = "chromium-browser.desktop";
|
||||||
|
"x-scheme-handler/about" = "chromium-browser.desktop";
|
||||||
|
"x-scheme-handler/unknown" = "chromium-browser.desktop";
|
||||||
|
"x-scheme-handler/mailto" = "thunderbird.desktop";
|
||||||
|
"x-scheme-handler/chrome" = "thunderbird.desktop";
|
||||||
|
"text/calendar" = "thunderbird.desktop";
|
||||||
|
"application/pdf" = "org.pwmt.zathura-pdf-mupdf.desktop";
|
||||||
|
"application/x-extension-htm" = "chromium-browser.desktop";
|
||||||
|
"application/x-extension-html" = "chromium-browser.desktop";
|
||||||
|
"application/x-extension-shtml" = "chromium-browser.desktop";
|
||||||
|
"application/x-extension-xht" = "chromium-browser.desktop";
|
||||||
|
"application/x-extension-xhtml" = "chromium-browser.desktop";
|
||||||
|
"application/x-zerosize" = "nsxiv.desktop";
|
||||||
|
"application/xhtml+xml" = "chromium-browser.desktop";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -30,11 +30,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
# DisplayLink
|
# DisplayLink
|
||||||
services.xserver.videoDrivers = [
|
# imports = [ ../modules/core/displaylink.nix ];
|
||||||
"displaylink"
|
|
||||||
"modesetting"
|
|
||||||
];
|
|
||||||
systemd.services.dlm.wantedBy = [ "multi-user.target" ];
|
|
||||||
|
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
|
@ -48,6 +44,13 @@ in
|
||||||
thermald.enable = true;
|
thermald.enable = true;
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
|
|
||||||
|
udev.extraRules = ''
|
||||||
|
# Switch to power-save profile when on battery
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{online}=="0", RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set power-saver", RUN+="/bin/sh -c 'echo 30 | tee /sys/class/backlight/amdgpu_bl1/brightness'"
|
||||||
|
# Switch to balanced profile when plugged in
|
||||||
|
SUBSYSTEM=="power_supply", ATTR{online}=="1", RUN+="${pkgs.power-profiles-daemon}/bin/powerprofilesctl set balanced", RUN+="/bin/sh -c 'cat /sys/class/backlight/amdgpu_bl1/max_brightness > /sys/class/backlight/amdgpu_bl1/brightness'"
|
||||||
|
'';
|
||||||
|
|
||||||
upower = {
|
upower = {
|
||||||
enable = true;
|
enable = true;
|
||||||
percentageLow = 20;
|
percentageLow = 20;
|
||||||
|
|
@ -55,6 +58,21 @@ in
|
||||||
percentageAction = 5;
|
percentageAction = 5;
|
||||||
criticalPowerAction = "Hibernate";
|
criticalPowerAction = "Hibernate";
|
||||||
};
|
};
|
||||||
|
#auto-cpufreq = {
|
||||||
|
# enable = true;
|
||||||
|
# settings = {
|
||||||
|
# battery = {
|
||||||
|
# governor = "powersave";
|
||||||
|
# turbo = "never";
|
||||||
|
# energy_performance_preference = "balance_power";
|
||||||
|
# };
|
||||||
|
# charger = {
|
||||||
|
# governor = "performance";
|
||||||
|
# turbo = "auto";
|
||||||
|
# energy_performance_preference = "performance";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
#};
|
||||||
};
|
};
|
||||||
# powerManagement.powertop.enable = false; # somehow figure out how to let this not apply to specific USB devices, as they will auto suspend and that is annoying.
|
# powerManagement.powertop.enable = false; # somehow figure out how to let this not apply to specific USB devices, as they will auto suspend and that is annoying.
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue