do things

This commit is contained in:
zack 2025-01-09 13:33:20 -05:00
parent 0dc849ff14
commit 5c08802127
No known key found for this signature in database
GPG key ID: EE8A2B709E2401D1
14 changed files with 503 additions and 457 deletions

673
flake.lock generated

File diff suppressed because it is too large Load diff

View file

@ -34,7 +34,7 @@
}; };
}; };
shells.fish.enable = true; shells.zsh.enable = true;
rice.gtk.enable = true; rice.gtk.enable = true;
@ -45,30 +45,6 @@
services.udiskie.enable = true; services.udiskie.enable = true;
xdg.enable = true; xdg.enable = true;
home.persistence."/persist/home" = {
directories = [
"Downloads"
"Music"
"Pictures"
"Documents"
"Videos"
".gnupg"
".ssh"
".nixops"
".local/share/keyrings"
".local/share/direnv"
{
directory = ".local/share/Steam";
method = "symlink";
}
];
files = [
".screenrc"
];
allowOther = true;
};
programs = { programs = {
gpg.enable = true; gpg.enable = true;
man.enable = true; man.enable = true;
@ -83,11 +59,11 @@
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"text/html" = "zen.desktop"; "text/html" = "zen_twilight.desktop";
"x-scheme-handler/http" = "zen.desktop"; "x-scheme-handler/http" = "zen_twilight.desktop";
"x-scheme-handler/https" = "zen.desktop"; "x-scheme-handler/https" = "zen_twilight.desktop";
"x-scheme-handler/about" = "zen.desktop"; "x-scheme-handler/about" = "zen_twilight.desktop";
"x-scheme-handler/unknown" = "zen.desktop"; "x-scheme-handler/unknown" = "zen_twilight.desktop";
}; };
}; };

View file

@ -17,6 +17,8 @@ in {
config = mkIf cfg.enable { config = mkIf cfg.enable {
programs.waybar = { programs.waybar = {
enable = true; enable = true;
systemd.enable = true;
systemd.target = "graphical-session.target";
style = '' style = ''
* { * {
min-height: 0; min-height: 0;

View file

@ -13,7 +13,7 @@ in {
enable = mkBoolOpt false "Enable Git Integration"; enable = mkBoolOpt false "Enable Git Integration";
signByDefault = mkBoolOpt true "Sign by default"; signByDefault = mkBoolOpt true "Sign by default";
signingKey = mkStringOpt "5F873416BCF59F35" "The KeyID of your GPG signingKey"; signingKey = mkStringOpt "EE8A2B709E2401D1" "The KeyID of your GPG signingKey";
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {

View file

@ -8,4 +8,4 @@ if vim.g.neovide then
end end
-- in this case. -- in this case.
-- vim.g.lazyvim_blink_main = true vim.g.lazyvim_blink_main = true

View file

@ -26,7 +26,7 @@ return {
}, },
{ {
"catppuccin", "catppuccin",
opts = { transparent_background = true, integrations = { opts = { integrations = {
blink_cmp = true, blink_cmp = true,
} }, } },
}, },
@ -46,12 +46,6 @@ return {
}, },
}, },
}, },
{
"saghen/blink.cmp",
opts = {
nerd_font_variant = "mono",
},
},
{ {
"folke/snacks.nvim", "folke/snacks.nvim",
priority = 1000, priority = 1000,

View file

@ -38,7 +38,7 @@ in {
catppuccin.enable = false; catppuccin.enable = false;
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default; # package = inputs.neovim-nightly-overlay.packages.${pkgs.system}.default;
extraLuaPackages = ps: [ps.magick]; extraLuaPackages = ps: [ps.magick];
extraPackages = with pkgs; [ extraPackages = with pkgs; [
# Formatters # Formatters

View file

@ -12,9 +12,9 @@ with lib.custom; let
cfg = config.wms.hyprland; cfg = config.wms.hyprland;
mkService = recursiveUpdate { mkService = recursiveUpdate {
Unit.PartOf = ["hyprland-session.target"]; Unit.PartOf = ["graphical-session.target"];
Unit.After = ["hyprland-session.target"]; Unit.After = ["graphical-session.target"];
Install.WantedBy = ["hyprland-session.target"]; Install.WantedBy = ["graphical-session.target"];
}; };
mod = "SUPER"; mod = "SUPER";
@ -46,12 +46,10 @@ in {
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
xwayland.enable = true; xwayland.enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
systemd = { systemd = {
enable = true; enable = false;
# enableXdgAutostart = true; enableXdgAutostart = true;
variables = ["-all"];
}; };
}; };
@ -61,7 +59,6 @@ in {
# "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # "dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
# "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP" # "systemctl --user import-environment WAYLAND_DISPLAY XDG_CURRENT_DESKTOP"
"zen" "zen"
"telegram-desktop"
"thunderbird" "thunderbird"
"vesktop" "vesktop"
"spotify" "spotify"
@ -76,7 +73,7 @@ in {
bind = bind =
[ [
''${mod},RETURN,exec,${pkgs.ghostty}/bin/ghostty'' ''${mod},RETURN,exec,${lib.getExe pkgs.kitty}''
"${mod},D,exec,rofi -show drun" "${mod},D,exec,rofi -show drun"
"${mod},Q,killactive" "${mod},Q,killactive"
@ -216,7 +213,6 @@ in {
"workspace special silent, title:^(Firefox Sharing Indicator)$" "workspace special silent, title:^(Firefox Sharing Indicator)$"
"workspace special silent, title:^(.*is sharing (your screen|a window)\.)$" "workspace special silent, title:^(.*is sharing (your screen|a window)\.)$"
"opacity 0.9 override,class:^(zen)"
"workspace 5, class:^(thunderbird)$" "workspace 5, class:^(thunderbird)$"
"workspace 4, title:^(.*(Disc|WebC)ord.*)$" "workspace 4, title:^(.*(Disc|WebC)ord.*)$"
"workspace 4, class:^(.*Slack.*)$" "workspace 4, class:^(.*Slack.*)$"
@ -232,12 +228,12 @@ in {
# # fake a tray to let apps start # # fake a tray to let apps start
# # https://github.com/nix-community/home-manager/issues/2064 # # https://github.com/nix-community/home-manager/issues/2064
systemd.user.targets.tray = { # systemd.user.targets.tray = {
Unit = { # Unit = {
Description = "Home Manager System Tray"; # Description = "Home Manager System Tray";
Requires = ["graphical-session-pre.target"]; # Requires = ["graphical-session-pre.target"];
}; # };
}; # };
systemd.user.services = { systemd.user.services = {
swaybg = mkService { swaybg = mkService {

View file

@ -26,8 +26,8 @@ in {
extraConfig.pipewire.adjust-sample-rate = { extraConfig.pipewire.adjust-sample-rate = {
"context.properties" = { "context.properties" = {
"default.clock.rate" = 48000; "default.clock.rate" = 44100;
"default.allowed-rates" = [48000]; "default.allowed-rates" = [44100];
}; };
}; };

View file

@ -51,14 +51,14 @@ in {
GBM_BACKEND = "nvidia-drm"; GBM_BACKEND = "nvidia-drm";
WLR_NO_HARDWARE_CURSORS = "1"; WLR_NO_HARDWARE_CURSORS = "1";
LIBVA_DRIVER_NAME = "nvidia"; LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia"; # __GLX_VENDOR_LIBRARY_NAME = "nvidia";
__NV_PRIME_RENDER_OFFLOAD = "1"; # __NV_PRIME_RENDER_OFFLOAD = "1";
__VK_LAYER_NV_optimus = "NVIDIA_only"; # __VK_LAYER_NV_optimus = "NVIDIA_only";
NVD_BACKEND = "direct"; NVD_BACKEND = "direct";
# __GL_GSYNC_ALLOWED = "1"; # __GL_GSYNC_ALLOWED = "1";
# __GL_VRR_ALLOWED = "1"; # __GL_VRR_ALLOWED = "1";
XWAYLAND_NO_GLAMOR = "1"; # XWAYLAND_NO_GLAMOR = "1";
__GL_MaxFramesAllowed = "1"; # __GL_MaxFramesAllowed = "1";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [

View file

@ -21,7 +21,7 @@ in {
services = { services = {
greetd = { greetd = {
enable = true; enable = false;
settings = rec { settings = rec {
initial_session = { initial_session = {
# command = "sway --unsupported-gpu"; # command = "sway --unsupported-gpu";
@ -33,7 +33,12 @@ in {
}; };
}; };
services.xserver.displayManager.gdm.enable = true;
programs.uwsm.enable = true;
programs.hyprland = { programs.hyprland = {
withUWSM = true;
enable = true; enable = true;
}; };
@ -69,15 +74,14 @@ in {
hardware.pulseaudio.support32Bit = true; hardware.pulseaudio.support32Bit = true;
# xdg.portal = { xdg.portal = {
# enable = true; enable = true;
# wlr.enable = false; wlr.enable = false;
# config.common.default = "*"; config.common.default = "*";
# extraPortals = [ extraPortals = [
# pkgs.xdg-desktop-portal-gtk pkgs.xdg-desktop-portal-gtk
# # pkgs.xdg-desktop-portal-wlr pkgs.xwaylandvideobridge
# pkgs.xwaylandvideobridge ];
# ]; };
# };
}; };
} }

View file

@ -6,7 +6,7 @@
config, config,
... ...
}: { }: {
imports = [./hardware-configuration.nix (import ./disko.nix {device = "/dev/nvme0n1";})]; imports = [./hardware-configuration.nix];
nix.settings = { nix.settings = {
trusted-users = ["zoey"]; trusted-users = ["zoey"];
@ -46,11 +46,11 @@
services.fstrim.enable = true; services.fstrim.enable = true;
services.vpn.enable = true; services.vpn.enable = true;
services.xserver.enable = true; services.xserver.enable = true;
services.vpn.mullvad = true; services.vpn.mullvad = false;
services.lorri.enable = true; services.lorri.enable = true;
services.udisks2.enable = true; services.udisks2.enable = true;
services.transmission = { services.transmission = {
enable = true; enable = false;
package = pkgs.transmission_4; package = pkgs.transmission_4;
settings = { settings = {
download-dir = "/home/zoey/dl"; download-dir = "/home/zoey/dl";
@ -66,64 +66,13 @@
}; };
# Bootloader. # Bootloader.
boot.loader.systemd-boot.enable = lib.mkForce false; boot.loader.systemd-boot.enable = true;
boot.lanzaboote = { boot.lanzaboote = {
enable = true; enable = false;
pkiBundle = "/etc/secureboot"; pkiBundle = "/etc/secureboot";
}; };
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.postDeviceCommands = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/root_vg/root /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi
delete_subvolume_recursively() {
IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i"
done
btrfs subvolume delete "$1"
}
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i"
done
btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp
'';
fileSystems."/persist".neededForBoot = true;
environment.persistence."/persist/system" = {
hideMounts = true;
directories = [
"/etc/nixos"
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
{
directory = "/var/lib/colord";
user = "colord";
group = "colord";
mode = "u=rwx,g=rx,o=";
}
];
files = [
"/etc/machine-id"
{
file = "/var/keys/secret_file";
parentDirectory = {mode = "u=rwx,g=,o=";};
}
];
};
networking.hostName = "earth"; # Define your hostname. networking.hostName = "earth"; # Define your hostname.
networking.extraHosts = "127.0.0.1 local-cald.io"; networking.extraHosts = "127.0.0.1 local-cald.io";
@ -149,18 +98,23 @@
pkgs.sbctl pkgs.sbctl
pkgs.vesktop pkgs.vesktop
pkgs.mangohud pkgs.mangohud
pkgs.lutris
pkgs.podman-tui
pkgs.dive
pkgs.docker-compose
pkgs.podman-compose
pkgs.transmission_4 pkgs.transmission_4
inputs.agenix.packages.${system}.agenix inputs.agenix.packages.${system}.agenix
inputs.awsvpnclient.packages."${pkgs.system}".awsvpnclient inputs.awsvpnclient.packages."${pkgs.system}".awsvpnclient
]; ];
programs.fish.enable = true; programs.zsh.enable = true;
programs.fuse.userAllowOther = true; programs.fuse.userAllowOther = true;
users.users.zoey = { users.users.zoey = {
isNormalUser = true; isNormalUser = true;
description = "zoey"; description = "zoey";
extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"]; extraGroups = ["networkmanager" "wheel" "docker" "libvirtd" "plugdev"];
shell = pkgs.fish; shell = pkgs.zsh;
initialHashedPassword = "$6$rounds=2000000$rFBJH7LwdEHvv.0i$HdHorWqp8REPdWPk5fEgZXX1TujRJkMxumGK0f0elFN0KRPlBjJMW2.35A.ID/o3eC/hGTwbSJAcJcwVN2zyV/"; initialHashedPassword = "$6$rounds=2000000$rFBJH7LwdEHvv.0i$HdHorWqp8REPdWPk5fEgZXX1TujRJkMxumGK0f0elFN0KRPlBjJMW2.35A.ID/o3eC/hGTwbSJAcJcwVN2zyV/";
}; };
@ -180,7 +134,12 @@
sites.jellyfin.enable = true; sites.jellyfin.enable = true;
virtualisation.docker.enable = true; virtualisation.containers.enable = true;
virtualisation.podman = {
enable = true;
dockerCompat = true;
defaultNetwork.settings.dns_enabled = true;
};
virtualisation.libvirtd.enable = true; virtualisation.libvirtd.enable = true;
system.stateVersion = "24.05"; system.stateVersion = "24.05";

View file

@ -1,73 +0,0 @@
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
disko.devices = {
disk.main = {
inherit device;
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "4G";
content = {
type = "swap";
resumeDevice = true;
};
};
root = {
name = "root";
size = "100%";
content = {
type = "lvm_pv";
vg = "root_vg";
};
};
};
};
};
lvm_vg = {
root_vg = {
type = "lvm_vg";
lvs = {
root = {
size = "100%FREE";
content = {
type = "btrfs";
extraArgs = ["-f"];
subvolumes = {
"/root" = {
mountpoint = "/";
};
"/persist" = {
mountOptions = ["subvol=persist" "noatime"];
mountpoint = "/persist";
};
"/nix" = {
mountOptions = ["subvol=nix" "noatime"];
mountpoint = "/nix";
};
};
};
};
};
};
};
};
}

View file

@ -13,10 +13,25 @@
]; ];
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = ["dm-snapshot"]; boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-amd"]; boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = []; boot.extraModulePackages = [];
fileSystems."/" = {
device = "/dev/disk/by-uuid/ad6fa764-31b2-4dfd-9fc7-f2638c2e2e5e";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/AACF-2693";
fsType = "vfat";
options = ["fmask=0077" "dmask=0077"];
};
swapDevices = [
{device = "/dev/disk/by-uuid/5c74e955-26c7-4f71-9b48-975a89b1d5ec";}
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking # 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 # (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 # still possible to use this option, but it's recommended to use it in conjunction