This commit is contained in:
zack 2025-05-23 11:58:24 -04:00
parent 916f497b84
commit 7aed32eea7
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
15 changed files with 210 additions and 154 deletions

View file

@ -25,8 +25,6 @@ in {
bold_font ${fonts.mono} Bold Italic
italic_font ${fonts.mono} Italic
bold_italic_font ${fonts.mono} Bold Italic
shell ${lib.getExe pkgs.nushell}
'';
catppuccin.enable = true;

View file

@ -16,6 +16,7 @@ in {
programs.starship = {
enable = true;
enableZshIntegration = config.programs.zsh.enable;
enableFishIntegration = config.programs.fish.enable;
enableNushellIntegration = config.programs.nushell.enable;
settings = {
add_newline = false;

View file

@ -24,7 +24,7 @@ in {
programs.tmux = {
enable = true;
shell = "${lib.getExe pkgs.nushell}";
shell = "${lib.getExe pkgs.fish}";
historyLimit = 100000;
plugins = with pkgs; [
tmuxPlugins.sensible

View file

@ -29,7 +29,7 @@ with pkgs; {
ls = "${getExe eza} -h --git --icons --color=auto --group-directories-first -s extension";
tree = "${getExe eza} --tree --icons --tree";
kys = "shutdown now";
w = ''| nvim -c "setlocal buftype=nofile bufhidden=wipe" -c "nnoremap <buffer> q :q!<CR>" -'';
# w = ''| nvim -c "setlocal buftype=nofile bufhidden=wipe" -c "nnoremap <buffer> q :q!<CR>" -'';
lv = "nvim -c \"normal '\''0\"";
pf = ''
fzf --bind ctrl-y:preview-up,ctrl-e:preview-down \
@ -38,7 +38,6 @@ with pkgs; {
--bind ctrl-k:up,ctrl-j:down \
--preview='bat --style=numbers --color=always --line-range :100 {}'
'';
ff = "for file in \`pf\`; do cmd=\"v \$file\" && print -rs -- \$cmd && eval \$cmd; done";
gpl = "curl https://www.gnu.org/licenses/gpl-3.0.txt -o LICENSE";
agpl = "curl https://www.gnu.org/licenses/agpl-3.0.txt -o LICENSE";
tsm = "transmission-remote";

View file

@ -20,9 +20,13 @@ in {
interactiveShellInit = ''
set -gx LC_ALL en_US.UTF-8
set -gx SSH_AUTH_SOCK /run/user/1000/keyring/ssh
set -gx FLAKE /home/zoey/nixos/
set -gx NH_FLAKE /home/zoey/nixos/
set -g FZF_PREVIEW_FILE_CMD "head -n 10"
set -g FZF_PREVIEW_DIR_CMD "ls"
if not set -q TMUX
tmux
end
'';
plugins = [

View file

@ -110,6 +110,7 @@ in {
height = 1440;
refresh = 239.972;
};
variable-refresh-rate = "on-demand";
scale = 1;
transform = {
# "normal"
@ -277,7 +278,18 @@ in {
y = 16;
};
}
{
matches = [
{
app-id = "^cyberpunk2077.exe$";
}
{
app-id = "^Overwatch2.exe$";
}
];
variable-refresh-rate = true;
}
{
matches = [
{

View file

@ -106,6 +106,26 @@ with lib.custom; let
# Change to powersave governor
echo powersave | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
'';
libvirtd-cfg = config.virtualisation.libvirtd;
qemuConfigFile = pkgs.writeText "qemu.conf" ''
${optionalString libvirtd-cfg.qemu.ovmf.enable ''
nvram = [
"/run/libvirt/nix-ovmf/AAVMF_CODE.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.fd",
"/run/libvirt/nix-ovmf/AAVMF_CODE.ms.fd:/run/libvirt/nix-ovmf/AAVMF_VARS.ms.fd",
"/run/libvirt/nix-ovmf/OVMF_CODE.fd:/run/libvirt/nix-ovmf/OVMF_VARS.fd",
"/run/libvirt/nix-ovmf/OVMF_CODE.ms.fd:/run/libvirt/nix-ovmf/OVMF_VARS.ms.fd"
]
''}
${optionalString (!libvirtd-cfg.qemu.runAsRoot) ''
user = "qemu-libvirtd"
group = "qemu-libvirtd"
''}
${libvirtd-cfg.qemu.verbatimConfig}
'';
dirName = "libvirt";
in {
options.hardware.gpu-passthru = with types; {
enable = mkBoolOpt false "Enable support for single gpu-passthru";
@ -173,9 +193,45 @@ in {
in [env];
};
systemd.services.libvirtd-config = {
enable = lib.mkForce false;
};
systemd.services.libvirtd-config.script = lib.mkForce ''
# Copy default libvirt network config .xml files to /var/lib
# Files modified by the user will not be overwritten
for i in $(cd ${libvirtd-cfg.package}/var/lib && echo \
libvirt/qemu/networks/*.xml \
libvirt/nwfilter/*.xml );
do
# Intended behavior
# shellcheck disable=SC2174
mkdir -p "/var/lib/$(dirname "$i")" -m 755
if [ ! -e "/var/lib/$i" ]; then
cp -pd "${libvirtd-cfg.package}/var/lib/$i" "/var/lib/$i"
fi
done
# Copy generated qemu config to libvirt directory
cp -f ${qemuConfigFile} /var/lib/${dirName}/qemu.conf
# stable (not GC'able as in /nix/store) paths for using in <emulator> section of xml configs
for emulator in ${libvirtd-cfg.package}/libexec/libvirt_lxc ${libvirtd-cfg.qemu.package}/bin/qemu-kvm ${libvirtd-cfg.qemu.package}/bin/qemu-system-*; do
ln -s --force "$emulator" /run/${dirName}/nix-emulators/
done
ln -s --force ${libvirtd-cfg.qemu.package}/bin/qemu-pr-helper /run/${dirName}/nix-helpers/
${optionalString libvirtd-cfg.qemu.ovmf.enable (
let
ovmfpackage = pkgs.buildEnv {
name = "qemu-ovmf";
paths = libvirtd-cfg.qemu.ovmf.packages;
};
in ''
ln -s --force ${ovmfpackage}/FV/AAVMF_CODE{,.ms}.fd /run/${dirName}/nix-ovmf/
ln -s --force ${ovmfpackage}/FV/OVMF_CODE{,.ms}.fd /run/${dirName}/nix-ovmf/
ln -s --force ${ovmfpackage}/FV/AAVMF_VARS{,.ms}.fd /run/${dirName}/nix-ovmf/
ln -s --force ${ovmfpackage}/FV/OVMF_VARS{,.ms}.fd /run/${dirName}/nix-ovmf/
''
)}
'';
system.activationScripts.libvirt-hooks.text = ''
ln -Tfs /etc/libvirt/hooks /var/lib/libvirt/hooks

View file

@ -20,6 +20,9 @@ in {
hydraURL = "https://hydra.zoeys.computer";
useSubstitutes = true;
notificationSender = "hydra@localhost"; # e-mail of hydra service
extraConfig = ''
Include /var/lib/hydra/github_authorizations.conf
'';
};
services.nginx.virtualHosts."hydra.zoeys.computer" = {