desktop for homebox

This commit is contained in:
2026-05-14 12:42:08 -05:00
parent ee314f20b7
commit 57df8775c9
3 changed files with 57 additions and 14 deletions

View File

@@ -51,6 +51,12 @@
hardened = false;
};
ui = {
enable = lib.mkDefault config.hardware.graphics.enable;
#package = pkgs-us.netbird-ui;
#package = pkgs.netbird-ui;
};
package = pkgs-us.netbird;
#package = pkgs.netbird;
};

View File

@@ -36,7 +36,6 @@
virtual-machines
minecraft
];
config = {
@@ -54,7 +53,7 @@
users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAsU69CxfQk58CvItPN426h5Alnpb60SH37wet97Vb57 nathan@laptop"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEnUhN2uHwAJF/SLRX3wlGRmfhV3zpP88JQAYB+gh8jW nathan@localhost"
];
programs.zsh.enable = true;
@@ -70,17 +69,47 @@
networkmanager = {
enable = true;
dns = "none";
unmanaged = [ "enp6s0" ];
};
useDHCP = false;
dhcpcd.enable = false;
nftables = {};
interfaces."enp6s0" = {
ipv4.addresses = [{ address = "192.168.121.1"; prefixLength = 24; }];
};
nat = {
enable = true;
internalInterfaces = [ "ve-.+" ];
internalInterfaces = [ "ve-.+" "enp6s0" ];
externalInterface = "wlp7s0"; # wifi
#externalInterface = "enp6s0"; # ethernet
};
firewall.interfaces."enp6s0" = {
allowedUDPPorts = [ 53 67 68 ];
allowedTCPPorts = [ 53 67 68 ];
};
};
services.dnsmasq = {
enable = true;
settings = {
interface = "enp6s0";
dhcp-range = [ "192.168.121.2,192.168.121.254,1h" ];
};
};
specialisation = {
desktop = {
configuration = with self.nixosModules; lib.mkMerge [
aurora-greeter
pipewire
steam
hyprland
];
};
};
sops.secrets."netbirdKey".sopsFile = lib.mkForce ./secrets.yaml;

View File

@@ -7,6 +7,7 @@
pi4 = [ "pi4" ];
z2w = [ "red-black" "blue-white" "z2w" ];
useWith = x: y: (lib.mkIf (builtins.any (z: z == config.networking.hostName) x) y);
useWithGraphical = x: y: (lib.mkIf (builtins.any (z: z == config.networking.hostName && config.hardware.graphics.enable) x) y);
in {
config = {
@@ -49,17 +50,17 @@
home-manager.users.nathan = with self.homeModules; lib.mkMerge [
self.homeModules.nathan
(useWith (laptop ++ iso) nathan-aurora)
(useWith (laptop ++ iso) nathan-firefox)
(useWith (laptop ++ iso) nathan-rofi)
(useWith (laptop ++ iso) nathan-hypridle)
(useWith (laptop ++ iso) nathan-hyprland)
(useWith (laptop ++ iso) nathan-kitty)
(useWith (laptop ++ iso) nathan-scripts)
(useWith (laptop ++ iso) nathan-pywal)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-aurora)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-firefox)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-rofi)
(useWithGraphical (laptop ++ iso) nathan-hypridle)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-hyprland)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-kitty)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-scripts)
(useWithGraphical (laptop ++ homebox ++ iso) nathan-pywal)
(useWith (laptop ++ homebox) nathan-sops)
(useWith laptop {
(useWithGraphical laptop {
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'
@@ -67,17 +68,24 @@
'';
})
(useWith (iso) {
(useWithGraphical (iso ++ homebox) {
wayland.windowManager.hyprland.extraConfig = ''
monitor=,preferred,auto,1
'';
})
(useWithGraphical (homebox) {
olympus = {
packageSet = lib.mkForce "full";
};
})
(useWith (iso ++ pi4 ++ z2w ++ homebox) {
olympus = {
packageSet = "minimal";
packageSet = lib.mkDefault "minimal";
};
})
];