Begin Dendritic rewrite

This commit is contained in:
2026-03-06 16:25:14 -06:00
parent 37e225fad4
commit e627da5b4c
3 changed files with 120 additions and 154 deletions

View File

@@ -1,109 +1,112 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ self, inputs, ... }: {
{ config, pkgs, ... }:
flake.nixosConfigurations."laptop" = inputs.nixpkgs.lib.nixosSystem {
{
modules = [
self.nixosModules.laptop
];
};
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
];
flake.nixosModules.laptop = { config, pkgs, ... }:
config = {
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
{
hardware = {
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = true;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
config = {
prime = {
boot.kernelParams = [ "snd-intel-dspcfg.dsp_driver=1" ];
hardware = {
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = true;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
prime = {
# Make sure to use the correct Bus ID values for your system!
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
# WARNING: sync and offload are mutually exclusive.
# You can only pick one!!
#sync.enable = true;
offload = {
enable = true;
enableOffloadCmd = true;
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
};
};
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
"nathan/pass" = {
neededForUsers = true;
};
sops = {
defaultSopsFile = ./secrets.yaml;
secrets = {
"nathan/pass" = {
neededForUsers = true;
};
remoteBuildKey = {};
};
};
services.wyoming.satellite.user = "nathan";
sysconfig = {
services = {
wyoming = {
enable = true;
satellite = true;
remoteBuildKey = {};
};
};
remoteBuildClient = true;
users = {
nathan = {
isSuperuser = true;
extraGroups = [ "networkmanager" ];
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
shell = pkgs.zsh;
home-manager = {
services.wyoming.satellite.user = "nathan";
sysconfig = {
host = "laptop";
services = {
wyoming = {
enable = true;
standalone = false;
extraModules = [
{
homeconfig = {
minimal = false;
virtual-machines = true;
hyprland.enable = true;
hyprlock.enable = true;
wal.enable = true;
mpd.enable = true;
hyprpanel.enable = true;
calcurse.enable = true;
rofi.enable = true;
firefox.enable = true;
git.enable = true;
nh.enable = true;
};
satellite = true;
};
};
#monitor=eDP-1, addreserved, 40,0,0,0
wayland.windowManager.hyprland.extraConfig = ''
monitor=eDP-1,1920x1080@60,0x0,1
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
'';
remoteBuildClient = true;
}
];
users = {
nathan = {
isSuperuser = true;
extraGroups = [ "networkmanager" ];
hashedPasswordFile = config.sops.secrets."nathan/pass".path;
shell = pkgs.zsh;
home-manager = {
enable = true;
standalone = false;
extraModules = [
{
homeconfig = {
minimal = false;
virtual-machines = true;
hyprland.enable = true;
hyprlock.enable = true;
wal.enable = true;
mpd.enable = true;
hyprpanel.enable = true;
calcurse.enable = true;
rofi.enable = true;
firefox.enable = true;
git.enable = true;
nh.enable = true;
};
#monitor=eDP-1, addreserved, 40,0,0,0
wayland.windowManager.hyprland.extraConfig = ''
monitor=eDP-1,1920x1080@60,0x0,1
bind = CTRL SHIFT, XF86Launch2, exec, bash -c 'if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then pkexec --user root /nix/var/nix/profiles/system/bin/switch-to-configuration switch; else pkexec --user root /nix/var/nix/profiles/system/specialisation/docked/bin/switch-to-configuration switch; fi'
bind = ALT, Escape, exec, if [[ $(hyprctl monitors | grep 0x0 | sed -n -e "s/\t*1920x1080@//" -e "s/.[1234567890]* at 0x0//p") == 300 ]]; then hyprctl keyword monitor eDP-1,1920x1080@60,0x0,1; else hyprctl keyword monitor eDP-1,1920x1080@300,0x0,1; fi
'';
}
];
};
};
};
};
};
services.xserver.videoDrivers = [ "nvidia" ];
services.xserver.videoDrivers = [ "nvidia" ];
# This value determines the NixOS release from which the default
@@ -112,7 +115,8 @@
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.05"; # Did you read the comment?
};
system.stateVersion = "23.05"; # Did you read the comment?
};
};
}