daily configuration optimization
Fix - airplay: systemd wantedBy target - fcitx5: remove redundant systemd service Remove - move scripts into configuration Style - ghostty: add more transparency to background Add - zellij
This commit is contained in:
parent
44c152fdc9
commit
9c9acc3494
24 changed files with 941 additions and 856 deletions
|
|
@ -6,6 +6,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) optionalString;
|
||||
monitors = [
|
||||
"desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271"
|
||||
"desc:Acer Technologies XV272U V3 1322131231233"
|
||||
|
|
@ -52,141 +53,9 @@ in
|
|||
../../modules/davinci-resolve.nix
|
||||
../../modules/webcam.nix
|
||||
./nginx.nix
|
||||
|
||||
];
|
||||
|
||||
home-manager = {
|
||||
users."${username}" = {
|
||||
imports = [
|
||||
../../../home/presets/basic.nix
|
||||
|
||||
# Bitwarden client
|
||||
(import ../../../home/user/bitwarden.nix {
|
||||
email = "danny@net.dn";
|
||||
baseUrl = "https://bitwarden.net.dn";
|
||||
})
|
||||
|
||||
# Proton Extra Versions
|
||||
{
|
||||
home.file.".steam/root/compatibilitytools.d/GE-Proton10-10" = {
|
||||
source = fetchTarball {
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton10-10/GE-Proton10-10.tar.gz";
|
||||
sha256 = "sha256:1vkj66x84yqmpqm857hjzmx1s02h2lffcbc60jdfqz9xj34dx5jc";
|
||||
};
|
||||
};
|
||||
home.file.".steam/root/compatibilitytools.d/CachyOS-Proton10-0_v3" = {
|
||||
source = fetchTarball {
|
||||
url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-10.0-20250714-slr/proton-cachyos-10.0-20250714-slr-x86_64_v3.tar.xz";
|
||||
sha256 = "sha256:0hp22hkfv3f1p75im3xpif0pmixkq2i3hq3dhllzr2r7l1qx16iz";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# waybar
|
||||
(import ../../../home/user/waybar.nix {
|
||||
settings =
|
||||
let
|
||||
id = 5;
|
||||
in
|
||||
[
|
||||
# monitor 1
|
||||
{
|
||||
output = "DP-${toString id}";
|
||||
height = 48;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = (
|
||||
[
|
||||
"wlr/taskbar"
|
||||
]
|
||||
++ (
|
||||
if config.programs.gamemode.enable then
|
||||
[
|
||||
"gamemode"
|
||||
]
|
||||
else
|
||||
[ ]
|
||||
)
|
||||
++ [
|
||||
"custom/bitwarden"
|
||||
"custom/airplay"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
"custom/swaync"
|
||||
]
|
||||
);
|
||||
}
|
||||
# monitor 2
|
||||
{
|
||||
output = "DP-${toString (id + 1)}";
|
||||
height = 54;
|
||||
modules-left = [
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
|
||||
# Hyprland
|
||||
(import ../../../home/user/hyprland.nix { inherit monitors; })
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = [
|
||||
''desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271, 2560x1440@165, 0x0, 1''
|
||||
''desc:Acer Technologies XV272U V3 1322131231233, 2560x1440@180, -1440x-600, 1, transform, 1''
|
||||
];
|
||||
|
||||
misc = {
|
||||
vrr = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# Git
|
||||
(import ../../../home/user/git.nix {
|
||||
inherit username;
|
||||
email = "danny10132024@gmail.com";
|
||||
})
|
||||
|
||||
# Cs go
|
||||
{
|
||||
home.file.".steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg".text =
|
||||
''
|
||||
fps_max "250"
|
||||
|
||||
# Wheel Jump
|
||||
bind "mwheeldown" "+jump"
|
||||
bind "mwheelup" "+jump"
|
||||
bind "space" "+jump"
|
||||
|
||||
echo "AUTOEXEC LOADED SUCCESSFULLY!"
|
||||
host_writeconfig
|
||||
'';
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Power Management
|
||||
services.tlp = {
|
||||
enable = true;
|
||||
|
|
@ -219,4 +88,117 @@ in
|
|||
];
|
||||
};
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
users."${username}" = {
|
||||
imports = [
|
||||
../../../home/presets/basic.nix
|
||||
|
||||
# Bitwarden client
|
||||
(import ../../../home/user/bitwarden.nix {
|
||||
email = "danny@net.dn";
|
||||
baseUrl = "https://bitwarden.net.dn";
|
||||
})
|
||||
|
||||
# waybar
|
||||
(import ../../../home/user/waybar.nix {
|
||||
settings = [
|
||||
# monitor 1
|
||||
{
|
||||
output = "DP-3";
|
||||
height = 48;
|
||||
modules-left = [
|
||||
"custom/os"
|
||||
"hyprland/workspaces"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
(optionalString config.programs.gamemode.enable "custom/gamemode")
|
||||
"custom/bitwarden"
|
||||
"custom/airplay"
|
||||
"custom/wallRand"
|
||||
"custom/wireguard"
|
||||
"custom/recording"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
"custom/swaync"
|
||||
];
|
||||
}
|
||||
# monitor 2
|
||||
{
|
||||
output = "DP-2";
|
||||
height = 54;
|
||||
modules-left = [
|
||||
"clock"
|
||||
"mpris"
|
||||
];
|
||||
modules-right = [
|
||||
"wlr/taskbar"
|
||||
"temperature"
|
||||
"cpu"
|
||||
"memory"
|
||||
"pulseaudio"
|
||||
];
|
||||
}
|
||||
];
|
||||
})
|
||||
|
||||
# Hyprland
|
||||
(import ../../../home/user/hyprland.nix { inherit monitors; })
|
||||
{
|
||||
wayland.windowManager.hyprland = {
|
||||
settings = {
|
||||
monitor = [
|
||||
''desc:ASUSTek COMPUTER INC ASUS VG32VQ1B 0x00002271, 2560x1440@165, 0x0, 1''
|
||||
''desc:Acer Technologies XV272U V3 1322131231233, 2560x1440@180, -1440x-600, 1, transform, 1''
|
||||
];
|
||||
misc = {
|
||||
vrr = 0;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
# Git
|
||||
(import ../../../home/user/git.nix {
|
||||
inherit username;
|
||||
email = "danny10132024@gmail.com";
|
||||
})
|
||||
];
|
||||
|
||||
home.file = {
|
||||
# CS go
|
||||
".steam/steam/steamapps/common/Counter-Strike Global Offensive/game/csgo/cfg/autoexec.cfg".text = ''
|
||||
fps_max "250"
|
||||
|
||||
# Wheel Jump
|
||||
bind "mwheeldown" "+jump"
|
||||
bind "mwheelup" "+jump"
|
||||
bind "space" "+jump"
|
||||
|
||||
echo "AUTOEXEC LOADED SUCCESSFULLY!"
|
||||
host_writeconfig
|
||||
'';
|
||||
# Proton GE
|
||||
".steam/root/compatibilitytools.d/GE-Proton10-10" = {
|
||||
source = fetchTarball {
|
||||
url = "https://github.com/GloriousEggroll/proton-ge-custom/releases/download/GE-Proton10-10/GE-Proton10-10.tar.gz";
|
||||
sha256 = "sha256:1vkj66x84yqmpqm857hjzmx1s02h2lffcbc60jdfqz9xj34dx5jc";
|
||||
};
|
||||
};
|
||||
".steam/root/compatibilitytools.d/CachyOS-Proton10-0_v3" = {
|
||||
source = fetchTarball {
|
||||
url = "https://github.com/CachyOS/proton-cachyos/releases/download/cachyos-10.0-20250714-slr/proton-cachyos-10.0-20250714-slr-x86_64_v3.tar.xz";
|
||||
sha256 = "sha256:0hp22hkfv3f1p75im3xpif0pmixkq2i3hq3dhllzr2r7l1qx16iz";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
{
|
||||
boot.swraid.enable = true;
|
||||
boot.swraid.mdadmConf = "\n MAILADDR smitty\n ARRAY /dev/md126 metadata=1.2 name=stuff:0\n UUID=f3c41e6f:7e27b57f:8b44503a:42538a51\n ";
|
||||
}
|
||||
|
|
@ -10,15 +10,16 @@
|
|||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
./disk.nix
|
||||
./boot.nix
|
||||
./hardware-configuration.nix
|
||||
../../modules/nixsettings.nix
|
||||
];
|
||||
|
||||
# boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.grub = {
|
||||
enable = true;
|
||||
devices = [ "/dev/sda" ];
|
||||
efiSupport = true;
|
||||
efiInstallAsRemovable = true;
|
||||
devices = [ "/dev/md126" ];
|
||||
};
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
|
@ -42,7 +43,7 @@
|
|||
];
|
||||
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBzLpMKn0Q24ACC6k/7lOX0FIdcFhq15NY6849yROeUK danny@dn-pre7780"
|
||||
''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJSAOufpee7f8D8ONIIGU3qsN+8+DGO7BfZnEOTYqtQ5 danny@pre7780.dn''
|
||||
];
|
||||
|
||||
system.stateVersion = nix-version;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
device = "/dev/disk/by-id/md-uuid-f3c41e6f:7e27b57f:8b44503a:42538a51";
|
||||
device = "/dev/sda";
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
|
|
|
|||
22
system/dev/generic/hardware-configuration.nix
Normal file
22
system/dev/generic/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "virtio_scsi" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens4.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
|
|
@ -25,9 +25,9 @@ in
|
|||
];
|
||||
|
||||
systemd.user.services.uxplay = {
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
wantedBy = [ "default.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
Type = "simple";
|
||||
ExecStart = "${pkgs.uxplay}/bin/uxplay ${
|
||||
optionalString (hostname != null) "-n ${hostname} -fs -fps 60 -nh"
|
||||
} -p";
|
||||
|
|
|
|||
|
|
@ -1,9 +1,31 @@
|
|||
{ pkgs, config, ... }:
|
||||
|
||||
let
|
||||
getIconScript = pkgs.writeShellScript "get-icon" (
|
||||
builtins.readFile ../../home/config/scripts/getIcons.sh
|
||||
);
|
||||
getIconScript = pkgs.writeShellScript "get-icon" ''
|
||||
get_icons() {
|
||||
local session_name="$1"
|
||||
local result=""
|
||||
|
||||
local panes=($(tmux list-panes -t "$session_name" -F '#{pane_current_command}'))
|
||||
|
||||
for i in "''\${panes[@]}"; do
|
||||
case "$i" in
|
||||
nvim) result+=" " ;;
|
||||
zsh | *) result+=" " ;;
|
||||
esac
|
||||
done
|
||||
|
||||
echo "$result"
|
||||
}
|
||||
|
||||
if (($# != 1)); then
|
||||
echo "Usage: $0 <session-name>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
get_icons "$1"
|
||||
'';
|
||||
|
||||
prefixKey = "C-Space";
|
||||
tmuxConfigPath = "/etc/tmux.conf";
|
||||
in
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue