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

View file

@ -31,7 +31,6 @@
eternal-terminal
glow
grc
iamb
jamesdsp
jdk21
killall
@ -44,6 +43,25 @@
python3
slack
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
youki
(pkgs.buildFHSUserEnv {
@ -63,6 +81,7 @@
])
++ (with inputs; [
nixvim.packages.${pkgs.system}.default
zen-browser.packages.${pkgs.system}.specific
])
++ (with inputs.chaotic.packages.${pkgs.system}; [
distrobox_git
@ -138,6 +157,8 @@
};
programs = {
xmobar.enable = true;
emacs = {
enable = true;
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";
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";
terminal = "wezterm";
screenshot = 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}";
screenshot = mode: "${hyprshot}/bin/hyprshot --clipboard-only -m ${mode}";
in {
decoration.rounding = 10;
dwindle.preserve_split = true;

View file

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

View file

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

View file

@ -4,9 +4,10 @@
inputs,
lib,
...
}:
with lib // pkgs // inputs; {
imports = [./hardware.nix];
}: {
imports = [
./hardware.nix
];
security = {
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;
@ -40,7 +45,7 @@ with lib // pkgs // inputs; {
];
systemd.user.extraConfig = let
path = concatStringsSep ":" [
path = lib.concatStringsSep ":" [
"/run/wrappers/bin"
"/etc/profiles/per-user/%u/bin"
"/nix/var/nix/profiles/default/bin"
@ -51,7 +56,7 @@ with lib // pkgs // inputs; {
'';
age = {
secrets.passwd.file = "${self}/secrets/passwd.age";
secrets.passwd.file = ../../../secrets/passwd.age;
identityPaths = ["/persist/root/.ssh/id_ed25519"];
};
@ -60,11 +65,6 @@ with lib // pkgs // inputs; {
enable = true;
scheduler = "scx_rusty";
};
steam.extraCompatPackages = [
luxtorpeda
proton-ge-custom
];
};
virtualisation = {
@ -77,11 +77,11 @@ with lib // pkgs // inputs; {
onShutdown = "shutdown";
qemu = {
package = qemu_kvm;
package = pkgs.qemu_kvm;
swtpm.enable = true;
runAsRoot = false;
ovmf.enable = true;
ovmf.packages = [OVMFFull.fd];
ovmf.packages = [pkgs.OVMFFull.fd];
};
};
@ -100,8 +100,8 @@ with lib // pkgs // inputs; {
TERMINAL = "wezterm";
};
systemPackages = [
agenix.packages.${system}.default
systemPackages = with pkgs; [
inputs.agenix.packages.${system}.default
nautilus
internal.lightly-boehs-qt6
looking-glass-client
@ -132,13 +132,13 @@ with lib // pkgs // inputs; {
boot = {
blacklistedKernelModules = ["nouveau" "i915"];
kernelPackages = linuxPackages_cachyos;
kernelPackages = pkgs.linuxPackages_cachyos;
supportedFilesystems = ["btrfs" "ntfs"];
initrd.systemd = {
enable = true;
emergencyAccess = true; # No password needed because of LUKS
};
# initrd.systemd = {
# enable = true;
# emergencyAccess = true; # No password needed because of LUKS
# };
plymouth = {
enable = true;
@ -147,7 +147,7 @@ with lib // pkgs // inputs; {
extraModprobeConfig =
"options nvidia "
+ concatStringsSep " " [
+ lib.concatStringsSep " " [
"NVreg_UsePageAttributeTable=1"
"NVreg_EnablePCIeGen3=1"
"NVreg_RegistryDwords=RMUseSwI2c=0x01;RMI2cSpeed=100"
@ -172,17 +172,9 @@ with lib // pkgs // inputs; {
};
nix = let
mappedRegistry = pipe inputs [
(filterAttrs (_: isType "flake"))
(mapAttrs (_: flake: {inherit flake;}))
(x: x // {nixpkgs.flake = nixpkgs;})
];
nixSuper = nix-super.packages.${system}.default;
nixSuper = inputs.nix-super.packages.${pkgs.system}.default;
in {
package = mkForce nixSuper;
registry = mappedRegistry // optionalAttrs (config.nix.package == nixSuper) {default = mappedRegistry.nixpkgs;};
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
package = lib.mkForce nixSuper;
daemonCPUSchedPolicy = "batch";
daemonIOSchedClass = "idle";
@ -261,7 +253,7 @@ with lib // pkgs // inputs; {
hyprland = {
enable = true;
package = hyprland.packages.${system}.hyprland;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
nh = {
@ -391,7 +383,7 @@ with lib // pkgs // inputs; {
};
networking = {
useDHCP = mkDefault true;
useDHCP = lib.mkDefault true;
hostName = "navis";
firewall.enable = false;
nameservers = ["1.1.1.1" "1.0.0.1"];
@ -415,23 +407,11 @@ with lib // pkgs // inputs; {
emacs = {
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;
desktopManager.cosmic.enable = true;
libinput = {
enable = true;
@ -441,6 +421,18 @@ with lib // pkgs // inputs; {
xserver = {
enable = true;
videoDrivers = ["nvidia"];
displayManager.startx.enable = true;
windowManager.xmonad = {
enable = true;
enableContribAndExtras = true;
enableConfiguredRecompile = true;
flake = {
enable = true;
compiler = "ghc982";
};
};
};
pipewire = {
@ -457,7 +449,7 @@ with lib // pkgs // inputs; {
users.marshall = {
isNormalUser = true;
extraGroups = ["wheel" "gamemode" "libvirtd" "qemu-libvirtd" "disk" "networkmanager"];
shell = fish;
shell = pkgs.fish;
hashedPasswordFile = config.age.secrets.passwd.path;
};
};
@ -476,7 +468,7 @@ with lib // pkgs // inputs; {
graphics = {
enable = true;
enable32Bit = true;
extraPackages = [
extraPackages = with pkgs; [
vaapiVdpau
nvidia-vaapi-driver
];
@ -489,13 +481,6 @@ with lib // pkgs // inputs; {
modesetting.enable = true;
powerManagement.enable = true;
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"];
};
boot.initrd.systemd.services.wipe-root = {
requires = ["dev-mapper-enc.device"];
after = ["dev-mapper-enc.device"];
wantedBy = ["initrd.target"];
script = lib.mkAfter ''
mkdir /btrfs_tmp
mount /dev/disk/by-uuid/d375c3a3-63a3-47f8-8b77-58fabbb8f67b /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
'';
};
# boot.initrd.systemd.services.wipe-root = {
# requires = ["dev-mapper-enc.device"];
# after = ["dev-mapper-enc.device"];
# wantedBy = ["initrd.target"];
# script = lib.mkAfter ''
# mkdir /btrfs_tmp
# mount /dev/disk/by-uuid/d375c3a3-63a3-47f8-8b77-58fabbb8f67b /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
# '';
# };
boot.initrd.luks.devices."enc".device = "/dev/disk/by-uuid/9952fcd1-46eb-4c9c-ab7d-361d31fdb9a2";