centralized hypr & noctalia config control + added fws1 correct hardware

This commit is contained in:
ari committed 2026-09-09 12:56:26 -04:00
1 parent bdfcb9e814
commit 76e396cd43
11 files changed
+94 -159

No files matched your search

+1 -1
View File
@@ -2,6 +2,6 @@
-- Autostart
-- =========================
hl.on("hyprland.start", function()
-- Lounge console: drop straight into Steam Big Picture.
hl.exec_cmd("setpriv --ambient-caps -all -- noctalia")
hl.exec_cmd("steam -tenfoot")
end)
-1
View File
@@ -17,7 +17,6 @@ include "shared/index.kdl"
// For DankMaterialShell (DMS)
include "dms/index.kdl"
// For Noctalia
//include "noctalia/index.kdl"
+4 -1
View File
@@ -50,7 +50,10 @@ in
enable = true;
tools.enable = true;
};
noctalia.enable = true;
noctalia = {
enable = true;
configLink.enable = true;
};
quickshell.enable = true;
niri = {
enable = true;
+3
View File
@@ -51,6 +51,9 @@ in
enable = true;
tiler = {
enable = true;
noctalia = {
enable = true;
};
hyprland = {
enable = true;
tools.enable = true;
+10 -7
View File
@@ -1,3 +1,6 @@
# Do not modify this file! It was generated by ‘nixos-generate-config’
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
@@ -6,27 +9,27 @@
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usbhid" ];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/2d96049a-938b-4f08-b73a-5baae8eaef2a";
device = "/dev/disk/by-uuid/3fbf3ccf-655a-4040-b898-b97a1d555912";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/0B62-BBC0";
device = "/dev/disk/by-uuid/3342-B2BE";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-uuid/cf34dac4-3757-44a8-9458-14943c60d418"; }];
networking.useDHCP = lib.mkDefault true;
swapDevices = [{
device = "/var/lib/swapfile";
size = 64 * 1024;
}];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
+1 -85
View File
@@ -1,4 +1,4 @@
{ pkgs, user, ... }:
{ pkgs, ... }:
{
bat.enable = true;
neovim = {
@@ -87,8 +87,6 @@
'';
plugins = with pkgs.nushellPlugins; [
polars
# net
# highlight # broken: compiled for nushell 0.110.0, nixpkgs 26.05 ships 0.112.2
];
};
carapace = {
@@ -97,7 +95,6 @@
enableBashIntegration = true;
enableZshIntegration = true;
};
# environment.pathsToLink = [ "/share/zsh" ];
zsh = {
enable = true;
enableCompletion = true;
@@ -153,85 +150,4 @@
set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '
'';
};
# ghostty = {
# enable = true;
# settings = {
# # Font Configuration
# font-size = 12;
# # Window Configuration
# window-decoration = false;
# window-padding-x = 12;
# window-padding-y = 12;
# background-opacity = 1.0;
# background-blur-radius = 32;
# # Cursor Configuration
# cursor-style = "block";
# cursor-style-blink = true;
# # Scrollback
# scrollback-limit = 3023;
# # Terminal features
# mouse-hide-while-typing = true;
# copy-on-select = false;
# confirm-close-surface = false;
# # Disable annoying copied to clipboard
# app-notifications = "no-clipboard-copy,no-config-reload";
# # Material 3 UI elements
# unfocused-split-opacity = 0.7;
# unfocused-split-fill = "#44464f";
# # Tab configuration
# gtk-titlebar = false;
# # Shell integration
# shell-integration = "detect";
# shell-integration-features = "cursor,sudo,title,no-cursor";
# # Rando stuff
# gtk-single-instance = true;
# # Theme
# theme = "dankcolors";
# };
# keybindings = {
# "ctrl+shift+n" = "new_window";
# "ctrl+t" = "new_tab";
# "ctrl+plus" = "increase_font_size:1";
# "ctrl+minus" = "decrease_font_size:1";
# "ctrl+zero" = "reset_font_size";
# "shift+enter" = "text:\\n";
# };
# themes = {
# dankcolors = {
# background = "#101418";
# foreground = "#e0e2e8";
# cursor-color = "#42a5f5";
# selection-background = "#0d47a1";
# selection-foreground = "#e0e2e8";
# palette = [
# "0=#101418"
# "1=#ff3270"
# "2=#42f558"
# "3=#fff332"
# "4=#1c8de8"
# "5=#003e71"
# "6=#42a5f5"
# "7=#e8f4ff"
# "8=#8d979f"
# "9=#ff739e"
# "10=#7cff8d"
# "11=#fff77c"
# "12=#60b8ff"
# "13=#7cc4ff"
# "14=#abd9ff"
# "15=#f5faff"
# ];
# };
# };
# };
}
+1
View File
@@ -15,6 +15,7 @@ let
skygUtils = import ./skyg-utils.nix {
pkgs = allPkgs.x86_64-linux;
lib = nixpkgs.lib;
rootDir = rootDir;
};
eachSystem = nixpkgs.lib.genAttrs (import systems);
allPkgs = eachSystem (
+9 -46
View File
@@ -10,55 +10,18 @@ let
system = pkgs.stdenv.hostPlatform.system;
hyprlandPkg = hyprland.packages.${system}.hyprland;
hyprlandPortal = hyprland.packages.${system}.xdg-desktop-portal-hyprland;
# When mountAsSource is set, build a real, GC-protected copy of the hypr config
# dir. The flake self-source path (skyg.rootDir) is not referenced by the system
# closure, so it gets garbage-collected and the ~/.config/hypr symlink dangles.
# This derivation is added to the system profile, pinning it against GC.
bakedHyprConfig = pkgs.stdenv.mkDerivation {
pname = "${cfg.configName}-hypr-config";
version = "1";
src = "${config.skyg.rootDir}/configs/${cfg.configName}/hypr";
buildPhase = "true";
installPhase = ''
mkdir -p "$out/${cfg.configName}"
cp -r "$src" "$out/${cfg.configName}/hypr"
'';
bakedConfig = skygUtils.bakeConfig {
configName = cfg.configLink.name;
configType = "hypr";
};
in
{
options = {
skyg.nixos.desktop.tiler.hyprland = {
enable = lib.mkEnableOption "hyprland";
configName = lib.mkOption {
type = lib.types.str;
default = config.skyg.core.hostName;
description = ''
Name of the per-host Hyprland config directory under `configs/`.
The module symlinks `~/.config/hypr` -> `configs/<configName>/hypr`.
Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/hypr`).
'';
};
configLink = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to symlink `~/.config/hypr` -> `configs/<configName>/hypr`.
Disable on hosts that manage their own Hyprland config elsewhere.
'';
};
mountAsSource = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
If `configLink.enable` is true, embed the config dir in the build.
A GC-protected copy of the config is baked into the system closure
(via a derivation added to the system profile) instead of symlinking
to the live `~/nixos-setup/configs` checkout, making the config part
of the built system and reproducible.
'';
};
configLink = skygUtils.makeConfigLinkOptions {
hostName = config.skyg.core.hostName;
configType = "hypr";
};
tools = {
enable = lib.mkEnableOption "Hyprland shell tools (hypridle, wofi, rofi, grim, slurp, satty)";
@@ -93,16 +56,16 @@ in
grim
slurp
satty
]) ++ (lib.optionals cfg.configLink.mountAsSource [ bakedHyprConfig ]);
]) ++ (lib.optionals cfg.configLink.mountAsSource [ bakedConfig ]);
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
system.userActivationScripts.hyprlandConfig = lib.mkIf cfg.configLink.enable {
text = skygUtils.makeHyperlinkScriptToConfigs {
filePath = "${cfg.configName}/hypr";
filePath = "${cfg.configLink.name}/hypr";
targetPath = "hypr";
configSource =
if cfg.configLink.mountAsSource then
"${bakedHyprConfig}"
"${bakedConfig}"
else
"/home/${config.skyg.user.name}/nixos-setup/configs";
};
+18 -13
View File
@@ -9,30 +9,35 @@ let
cfg = config.skyg.nixos.desktop.tiler.noctalia;
system = pkgs.stdenv.hostPlatform.system;
noctaliaPkg = noctalia.packages.${system}.default;
bakedConfig = skygUtils.bakeConfig {
configName = cfg.configLink.name;
configType = "noctalia";
};
in
{
options = {
skyg.nixos.desktop.tiler.noctalia = {
enable = lib.mkEnableOption "noctalia";
configName = lib.mkOption {
type = lib.types.str;
default = config.skyg.core.hostName;
description = ''
Name of the per-host noctalia config directory under `configs/`.
The module symlinks `~/.config/noctalia` -> `configs/<configName>/noctalia`.
Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/noctalia`).
'';
configLink = skygUtils.makeConfigLinkOptions {
hostName = config.skyg.core.hostName;
configType = "noctalia";
};
};
};
config = lib.mkIf cfg.enable {
environment.systemPackages = [ noctaliaPkg ];
environment.systemPackages = [ noctaliaPkg ] ++ (lib.optionals cfg.configLink.mountAsSource [ bakedConfig ]);
# Symlink ~/.config/noctalia -> configs/<configName>/noctalia (host-specific).
system.userActivationScripts.noctaliaCfg.text = skygUtils.makeHyperlinkScriptToConfigs {
filePath = "${cfg.configName}/noctalia";
targetPath = "noctalia";
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
system.userActivationScripts.noctaliaCfg = lib.mkIf cfg.configLink.enable {
text = skygUtils.makeHyperlinkScriptToConfigs {
filePath = "${cfg.configLink.name}/noctalia";
targetPath = "noctalia";
configSource =
if cfg.configLink.mountAsSource then
"${bakedConfig}"
else
"/home/${config.skyg.user.name}/nixos-setup/configs";
};
};
};
}
+47 -5
View File
@@ -1,12 +1,21 @@
{ pkgs, lib }:
{ pkgs, lib, rootDir }:
{
bakeConfig =
{ configName
, configType
}: pkgs.stdenv.mkDerivation {
pname = "skyg-${configName}-${configType}-config";
version = "1";
src = "${rootDir}/configs/${configName}/${configType}";
buildPhase = "true";
installPhase = ''
mkdir -p "$out/${configName}"
cp -r "$src" "$out/${configName}/${configType}"
'';
};
makeHyperlinkScriptToConfigs =
{ filePath
, configSource
# Where the symlink is created under ~/.config. Defaults to filePath so
# existing callers keep linking ~/.config/<filePath> -> <configSource>/<filePath>.
# Set this when the source lives under a subdir but should surface at a
# flatter ~/.config path, e.g. filePath = "fwbook/hypr", targetPath = "hypr".
, targetPath ? filePath
}:
let
@@ -22,4 +31,37 @@
}
fi
'';
makeConfigLinkOptions =
{ configType
, hostName
}: {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether to symlink `~/.config/${configType}` -> `configs/<configName>/${configType}`.
Disable on hosts that manage their own ${configType} config elsewhere.
'';
};
name = lib.mkOption {
type = lib.types.str;
default = hostName;
description = ''
Name of the per-host ${configType} config directory under `configs/`.
The module symlinks `~/.config/${configType}` -> `configs/<configName>/${configType}`.
Defaults to the machine's hostName (e.g. `fwbook` -> `configs/fwbook/${configType}`).
'';
};
mountAsSource = lib.mkOption {
type = lib.types.bool;
default = false;
description = ''
If `configLink.enable` is true, embed the config dir in the build.
A GC-protected copy of the config is baked into the system closure
(via a derivation added to the system profile) instead of symlinking
to the live `~/nixos-setup/configs` checkout, making the config part
of the built system and reproducible.
'';
};
};
}
Binary file not shown.