should prob push this

This commit is contained in:
Mars 2024-09-28 22:03:51 -04:00
parent fefde6933f
commit 479e93469e
Signed by: pupbrained
GPG key ID: 0FF5B8826803F895
9 changed files with 585 additions and 310 deletions

View file

@ -22,7 +22,6 @@
in { in {
agenix = mkInput "ryantm/agenix"; agenix = mkInput "ryantm/agenix";
catppuccin = mkInput "catppuccin/nix"; catppuccin = mkInput "catppuccin/nix";
chaotic = mkInput "chaotic-cx/nyx/nyxpkgs-unstable"; chaotic = mkInput "chaotic-cx/nyx/nyxpkgs-unstable";
emacs = mkCustomUrl "git+https://git.pupbrained.xyz/pupbrained/nixmacs.git"; emacs = mkCustomUrl "git+https://git.pupbrained.xyz/pupbrained/nixmacs.git";
hyprland = mkWithSubmodules "https://github.com/hyprwm/Hyprland"; hyprland = mkWithSubmodules "https://github.com/hyprwm/Hyprland";
@ -33,6 +32,8 @@
nix-super = mkCustomUrl "git+https://git.privatevoid.net/max/nix-super.git"; nix-super = mkCustomUrl "git+https://git.privatevoid.net/max/nix-super.git";
nixvim = mkInput "pupbrained/nvim-config"; nixvim = mkInput "pupbrained/nvim-config";
treefmt-nix = mkInput "numtide/treefmt-nix"; treefmt-nix = mkInput "numtide/treefmt-nix";
xmonad-contrib = mkInput "xmonad/xmonad-contrib";
zen-browser = mkInput "fufexan/zen-browser-flake";
cosmic = mkFollowingNixpkgs "lilyinstarlight/nixos-cosmic"; cosmic = mkFollowingNixpkgs "lilyinstarlight/nixos-cosmic";
darwin = mkFollowingNixpkgs "LnL7/nix-darwin/master"; darwin = mkFollowingNixpkgs "LnL7/nix-darwin/master";
@ -61,13 +62,15 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
}; };
systems.modules.nixos = [ systems.modules.nixos =
[
agenix.nixosModules.default agenix.nixosModules.default
catppuccin.nixosModules.catppuccin catppuccin.nixosModules.catppuccin
chaotic.nixosModules.default chaotic.nixosModules.default
cosmic.nixosModules.default cosmic.nixosModules.default
impermanence.nixosModules.impermanence impermanence.nixosModules.impermanence
]; ]
++ xmonad-contrib.nixosModules;
systems.modules.darwin = [ systems.modules.darwin = [
"${home-manager}/nix-darwin" "${home-manager}/nix-darwin"

File diff suppressed because it is too large Load diff

View file

@ -45,6 +45,8 @@
url = "github:snowfallorg/lib/dev"; url = "github:snowfallorg/lib/dev";
}; };
treefmt-nix.url = "github:numtide/treefmt-nix"; treefmt-nix.url = "github:numtide/treefmt-nix";
xmonad-contrib.url = "github:xmonad/xmonad-contrib";
zen-browser.url = "github:fufexan/zen-browser-flake";
}; };
outputs = inputs: inputs.flakegen ./flake.in.nix inputs; outputs = inputs: inputs.flakegen ./flake.in.nix inputs;
} }

View file

@ -31,7 +31,6 @@
eternal-terminal eternal-terminal
glow glow
grc grc
iamb
jamesdsp jamesdsp
jdk21 jdk21
killall killall
@ -44,6 +43,25 @@
python3 python3
slack slack
telegram-desktop telegram-desktop
xdotool
zed-editor
(xwinwrap.overrideAttrs {
src = fetchFromGitHub {
owner = "camonater62";
repo = "xwinwrap";
rev = "ec74e730072225ffa740bf5076a1dd0a343bb113";
sha256 = "0vfwbcx5y1aphiaix2zps1bl7lhbhdvm6vhys2m0kwvl6igy0cc8";
};
buildPhase = ''
make all
'';
installPhase = ''
mkdir -p $out/bin
mv xwinwrap $out/bin
'';
})
vesktop vesktop
youki youki
(pkgs.buildFHSUserEnv { (pkgs.buildFHSUserEnv {
@ -63,6 +81,7 @@
]) ])
++ (with inputs; [ ++ (with inputs; [
nixvim.packages.${pkgs.system}.default nixvim.packages.${pkgs.system}.default
zen-browser.packages.${pkgs.system}.specific
]) ])
++ (with inputs.chaotic.packages.${pkgs.system}; [ ++ (with inputs.chaotic.packages.${pkgs.system}; [
distrobox_git distrobox_git
@ -138,6 +157,8 @@
}; };
programs = { programs = {
xmobar.enable = true;
emacs = { emacs = {
enable = true; enable = true;
package = inputs.emacs.packages.${pkgs.system}.default; package = inputs.emacs.packages.${pkgs.system}.default;
@ -157,6 +178,53 @@
}; };
}; };
services = {
picom = {
enable = true;
backend = "glx";
fadeDelta = 5;
fade = true;
shadow = true;
vSync = true;
shadowExclude = [
"class_g = 'firefox' && argb"
"class_g *?= 'slop'"
];
settings = {
corner-radius = 10;
blur-background-exclude = [
"class_g = 'slop'"
];
rounded-corners-exclude = [
"window_type = 'dock'"
"window_type = 'desktop'"
];
blur = {
method = "gaussian";
size = 10;
deviation = 5.0;
};
};
};
dunst = {
enable = true;
settings.global = {
corner_radius = 10;
offset = "18x53";
frame_width = 2;
font = "SN Pro 12";
frame_color = lib.mkForce "#a6e3a1";
};
catppuccin.enable = true;
};
};
systemd.user.startServices = "sd-switch"; systemd.user.startServices = "sd-switch";
nix.package = lib.mkForce inputs.nix-super.packages.${pkgs.system}.default; nix.package = lib.mkForce inputs.nix-super.packages.${pkgs.system}.default;

View file

@ -62,17 +62,7 @@ with pkgs; {
clipboard = "rofi -modi '':${rofi-clipboard}/bin/rofi-clipboard -show '' -show-icons"; clipboard = "rofi -modi '':${rofi-clipboard}/bin/rofi-clipboard -show '' -show-icons";
terminal = "wezterm"; terminal = "wezterm";
screenshot = mode: "${ screenshot = mode: "${hyprshot}/bin/hyprshot --clipboard-only -m ${mode}";
hyprshot.overrideAttrs {
# Fixes cursors showing in region shots
src = pkgs.fetchFromGitHub {
owner = "BenCarmichael01";
repo = "Hyprshot";
rev = "84e2adcd5dd9060178d0d028ad032734797fba23";
hash = "sha256-XDKwBiUMWvxoWpkdJ0EK4kEqPSTZLcF6axHjom3c5Jk=";
};
}
}/bin/hyprshot --clipboard-only -m ${mode}";
in { in {
decoration.rounding = 10; decoration.rounding = 10;
dwindle.preserve_split = true; dwindle.preserve_split = true;

View file

@ -114,14 +114,14 @@ local config = {
default_cursor_style = 'BlinkingBar', default_cursor_style = 'BlinkingBar',
enable_kitty_graphics = true, enable_kitty_graphics = true,
enable_scroll_bar = false, enable_scroll_bar = false,
enable_wayland = false, enable_wayland = true,
font_size = 12, font_size = 12,
font = wezterm.font('Maple Mono NF'), font = wezterm.font('Maple Mono NF'),
front_end = 'OpenGL', front_end = 'WebGpu',
initial_cols = 160,
keys = keybinds, keys = keybinds,
underline_position = -4, underline_position = -4,
use_fancy_tab_bar = false, use_fancy_tab_bar = false,
window_decorations = 'NONE',
warn_about_missing_glyphs = false, warn_about_missing_glyphs = false,
window_background_opacity = 0.8, window_background_opacity = 0.8,
window_padding = { left = 0, right = 0, top = 0, bottom = 0 }, window_padding = { left = 0, right = 0, top = 0, bottom = 0 },

View file

@ -8,18 +8,18 @@ with pkgs; {
interface = "wlp4s0"; interface = "wlp4s0";
show = [ show = [
"DesktopEnvironment"
"Distribution" "Distribution"
"Kernel" "Kernel"
"LocalIP" "LocalIP"
"Memory" "DesktopEnvironment"
"Packages"
"ProcessorLoad"
"Resolution"
"Shell"
"Terminal"
"Uptime"
"WindowManager" "WindowManager"
"Packages"
"Resolution"
"Terminal"
"Shell"
"Uptime"
"ProcessorLoad"
"Memory"
]; ];
}; };
@ -67,7 +67,7 @@ with pkgs; {
border = "rounded"; border = "rounded";
visible = true; visible = true;
inner_margin = { inner_margin = {
x = 0; x = 1;
y = 1; y = 1;
}; };
}; };

View file

@ -4,9 +4,10 @@
inputs, inputs,
lib, lib,
... ...
}: }: {
with lib // pkgs // inputs; { imports = [
imports = [./hardware.nix]; ./hardware.nix
];
security = { security = {
rtkit.enable = true; rtkit.enable = true;
@ -30,7 +31,11 @@ with lib // pkgs // inputs; {
]; ];
}; };
sudo.wheelNeedsPassword = false; sudo-rs = {
enable = true;
wheelNeedsPassword = false;
execWheelOnly = true;
};
}; };
console.catppuccin.enable = true; console.catppuccin.enable = true;
@ -40,7 +45,7 @@ with lib // pkgs // inputs; {
]; ];
systemd.user.extraConfig = let systemd.user.extraConfig = let
path = concatStringsSep ":" [ path = lib.concatStringsSep ":" [
"/run/wrappers/bin" "/run/wrappers/bin"
"/etc/profiles/per-user/%u/bin" "/etc/profiles/per-user/%u/bin"
"/nix/var/nix/profiles/default/bin" "/nix/var/nix/profiles/default/bin"
@ -51,7 +56,7 @@ with lib // pkgs // inputs; {
''; '';
age = { age = {
secrets.passwd.file = "${self}/secrets/passwd.age"; secrets.passwd.file = ../../../secrets/passwd.age;
identityPaths = ["/persist/root/.ssh/id_ed25519"]; identityPaths = ["/persist/root/.ssh/id_ed25519"];
}; };
@ -60,11 +65,6 @@ with lib // pkgs // inputs; {
enable = true; enable = true;
scheduler = "scx_rusty"; scheduler = "scx_rusty";
}; };
steam.extraCompatPackages = [
luxtorpeda
proton-ge-custom
];
}; };
virtualisation = { virtualisation = {
@ -77,11 +77,11 @@ with lib // pkgs // inputs; {
onShutdown = "shutdown"; onShutdown = "shutdown";
qemu = { qemu = {
package = qemu_kvm; package = pkgs.qemu_kvm;
swtpm.enable = true; swtpm.enable = true;
runAsRoot = false; runAsRoot = false;
ovmf.enable = true; ovmf.enable = true;
ovmf.packages = [OVMFFull.fd]; ovmf.packages = [pkgs.OVMFFull.fd];
}; };
}; };
@ -100,8 +100,8 @@ with lib // pkgs // inputs; {
TERMINAL = "wezterm"; TERMINAL = "wezterm";
}; };
systemPackages = [ systemPackages = with pkgs; [
agenix.packages.${system}.default inputs.agenix.packages.${system}.default
nautilus nautilus
internal.lightly-boehs-qt6 internal.lightly-boehs-qt6
looking-glass-client looking-glass-client
@ -132,13 +132,13 @@ with lib // pkgs // inputs; {
boot = { boot = {
blacklistedKernelModules = ["nouveau" "i915"]; blacklistedKernelModules = ["nouveau" "i915"];
kernelPackages = linuxPackages_cachyos; kernelPackages = pkgs.linuxPackages_cachyos;
supportedFilesystems = ["btrfs" "ntfs"]; supportedFilesystems = ["btrfs" "ntfs"];
initrd.systemd = { # initrd.systemd = {
enable = true; # enable = true;
emergencyAccess = true; # No password needed because of LUKS # emergencyAccess = true; # No password needed because of LUKS
}; # };
plymouth = { plymouth = {
enable = true; enable = true;
@ -147,7 +147,7 @@ with lib // pkgs // inputs; {
extraModprobeConfig = extraModprobeConfig =
"options nvidia " "options nvidia "
+ concatStringsSep " " [ + lib.concatStringsSep " " [
"NVreg_UsePageAttributeTable=1" "NVreg_UsePageAttributeTable=1"
"NVreg_EnablePCIeGen3=1" "NVreg_EnablePCIeGen3=1"
"NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100" "NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100"
@ -172,17 +172,9 @@ with lib // pkgs // inputs; {
}; };
nix = let nix = let
mappedRegistry = pipe inputs [ nixSuper = inputs.nix-super.packages.${pkgs.system}.default;
(filterAttrs (_: isType "flake"))
(mapAttrs (_: flake: {inherit flake;}))
(x: x // {nixpkgs.flake = nixpkgs;})
];
nixSuper = nix-super.packages.${system}.default;
in { in {
package = mkForce nixSuper; package = lib.mkForce nixSuper;
registry = mappedRegistry // optionalAttrs (config.nix.package == nixSuper) {default = mappedRegistry.nixpkgs;};
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
daemonCPUSchedPolicy = "batch"; daemonCPUSchedPolicy = "batch";
daemonIOSchedClass = "idle"; daemonIOSchedClass = "idle";
@ -261,7 +253,7 @@ with lib // pkgs // inputs; {
hyprland = { hyprland = {
enable = true; enable = true;
package = hyprland.packages.${system}.hyprland; package = inputs.hyprland.packages.${pkgs.system}.hyprland;
}; };
nh = { nh = {
@ -391,7 +383,7 @@ with lib // pkgs // inputs; {
}; };
networking = { networking = {
useDHCP = mkDefault true; useDHCP = lib.mkDefault true;
hostName = "navis"; hostName = "navis";
firewall.enable = false; firewall.enable = false;
nameservers = ["1.1.1.1" "1.0.0.1"]; nameservers = ["1.1.1.1" "1.0.0.1"];
@ -415,23 +407,11 @@ with lib // pkgs // inputs; {
emacs = { emacs = {
enable = true; enable = true;
package = inputs.emacs.packages.${system}.default; package = inputs.emacs.packages.${pkgs.system}.default;
}; };
# greetd = {
# enable = true;
# settings = rec {
# initial_session = {
# command = "${pkgs.hyprland}/bin/hyprland";
# user = "marshall";
# };
#
# default_session = initial_session;
# };
# };
desktopManager.cosmic.enable = true;
displayManager.cosmic-greeter.enable = true; displayManager.cosmic-greeter.enable = true;
desktopManager.cosmic.enable = true;
libinput = { libinput = {
enable = true; enable = true;
@ -441,6 +421,18 @@ with lib // pkgs // inputs; {
xserver = { xserver = {
enable = true; enable = true;
videoDrivers = ["nvidia"]; videoDrivers = ["nvidia"];
displayManager.startx.enable = true;
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
enableConfiguredRecompile = true;
flake = {
enable = true;
compiler = "ghc982";
};
};
}; };
pipewire = { pipewire = {
@ -457,7 +449,7 @@ with lib // pkgs // inputs; {
users.marshall = { users.marshall = {
isNormalUser = true; isNormalUser = true;
extraGroups = ["wheel" "gamemode" "libvirtd" "qemu-libvirtd" "disk" "networkmanager"]; extraGroups = ["wheel" "gamemode" "libvirtd" "qemu-libvirtd" "disk" "networkmanager"];
shell = fish; shell = pkgs.fish;
hashedPasswordFile = config.age.secrets.passwd.path; hashedPasswordFile = config.age.secrets.passwd.path;
}; };
}; };
@ -476,7 +468,7 @@ with lib // pkgs // inputs; {
graphics = { graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = [ extraPackages = with pkgs; [
vaapiVdpau vaapiVdpau
nvidia-vaapi-driver nvidia-vaapi-driver
]; ];
@ -489,13 +481,6 @@ with lib // pkgs // inputs; {
modesetting.enable = true; modesetting.enable = true;
powerManagement.enable = true; powerManagement.enable = true;
open = false; open = false;
prime = {
sync.enable = true;
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
}; };
}; };

View file

@ -20,35 +20,35 @@
options = ["subvol=root"]; options = ["subvol=root"];
}; };
boot.initrd.systemd.services.wipe-root = { # boot.initrd.systemd.services.wipe-root = {
requires = ["dev-mapper-enc.device"]; # requires = ["dev-mapper-enc.device"];
after = ["dev-mapper-enc.device"]; # after = ["dev-mapper-enc.device"];
wantedBy = ["initrd.target"]; # wantedBy = ["initrd.target"];
script = lib.mkAfter '' # script = lib.mkAfter ''
mkdir /btrfs_tmp # mkdir /btrfs_tmp
mount /dev/disk/by-uuid/d375c3a3-63a3-47f8-8b77-58fabbb8f67b /btrfs_tmp # mount /dev/disk/by-uuid/d375c3a3-63a3-47f8-8b77-58fabbb8f67b /btrfs_tmp
if [[ -e /btrfs_tmp/root ]]; then # if [[ -e /btrfs_tmp/root ]]; then
mkdir -p /btrfs_tmp/old_roots # mkdir -p /btrfs_tmp/old_roots
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S") # timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp" # mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
fi # fi
#
delete_subvolume_recursively() { # delete_subvolume_recursively() {
IFS=$'\n' # IFS=$'\n'
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do # for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
delete_subvolume_recursively "/btrfs_tmp/$i" # delete_subvolume_recursively "/btrfs_tmp/$i"
done # done
btrfs subvolume delete "$1" # btrfs subvolume delete "$1"
} # }
#
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do # for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
delete_subvolume_recursively "$i" # delete_subvolume_recursively "$i"
done # done
#
btrfs subvolume create /btrfs_tmp/root # btrfs subvolume create /btrfs_tmp/root
umount /btrfs_tmp # umount /btrfs_tmp
''; # '';
}; # };
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/9952fcd1-46eb-4c9c-ab7d-361d31fdb9a2"; boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/9952fcd1-46eb-4c9c-ab7d-361d31fdb9a2";