centralized hypr & noctalia config control + added fws1 correct hardware
This commit is contained in:
1 parent
bdfcb9e814
commit
76e396cd43
11 files changed
+94
-159
No files matched your search
@@ -2,6 +2,6 @@
|
|||||||
-- Autostart
|
-- Autostart
|
||||||
-- =========================
|
-- =========================
|
||||||
hl.on("hyprland.start", function()
|
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")
|
hl.exec_cmd("steam -tenfoot")
|
||||||
end)
|
end)
|
||||||
@@ -17,7 +17,6 @@ include "shared/index.kdl"
|
|||||||
// For DankMaterialShell (DMS)
|
// For DankMaterialShell (DMS)
|
||||||
include "dms/index.kdl"
|
include "dms/index.kdl"
|
||||||
|
|
||||||
// For Noctalia
|
|
||||||
//include "noctalia/index.kdl"
|
//include "noctalia/index.kdl"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -50,7 +50,10 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
tools.enable = true;
|
tools.enable = true;
|
||||||
};
|
};
|
||||||
noctalia.enable = true;
|
noctalia = {
|
||||||
|
enable = true;
|
||||||
|
configLink.enable = true;
|
||||||
|
};
|
||||||
quickshell.enable = true;
|
quickshell.enable = true;
|
||||||
niri = {
|
niri = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|||||||
@@ -51,6 +51,9 @@ in
|
|||||||
enable = true;
|
enable = true;
|
||||||
tiler = {
|
tiler = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
noctalia = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
hyprland = {
|
hyprland = {
|
||||||
enable = true;
|
enable = true;
|
||||||
tools.enable = true;
|
tools.enable = true;
|
||||||
|
|||||||
@@ -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, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -6,27 +9,27 @@
|
|||||||
(modulesPath + "/installer/scan/not-detected.nix")
|
(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.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-intel" ];
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/2d96049a-938b-4f08-b73a-5baae8eaef2a";
|
device = "/dev/disk/by-uuid/3fbf3ccf-655a-4040-b898-b97a1d555912";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{
|
{
|
||||||
device = "/dev/disk/by-uuid/0B62-BBC0";
|
device = "/dev/disk/by-uuid/3342-B2BE";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices = [{
|
||||||
[{ device = "/dev/disk/by-uuid/cf34dac4-3757-44a8-9458-14943c60d418"; }];
|
device = "/var/lib/swapfile";
|
||||||
|
size = 64 * 1024;
|
||||||
networking.useDHCP = lib.mkDefault true;
|
}];
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, user, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
bat.enable = true;
|
bat.enable = true;
|
||||||
neovim = {
|
neovim = {
|
||||||
@@ -87,8 +87,6 @@
|
|||||||
'';
|
'';
|
||||||
plugins = with pkgs.nushellPlugins; [
|
plugins = with pkgs.nushellPlugins; [
|
||||||
polars
|
polars
|
||||||
# net
|
|
||||||
# highlight # broken: compiled for nushell 0.110.0, nixpkgs 26.05 ships 0.112.2
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
carapace = {
|
carapace = {
|
||||||
@@ -97,7 +95,6 @@
|
|||||||
enableBashIntegration = true;
|
enableBashIntegration = true;
|
||||||
enableZshIntegration = true;
|
enableZshIntegration = true;
|
||||||
};
|
};
|
||||||
# environment.pathsToLink = [ "/share/zsh" ];
|
|
||||||
zsh = {
|
zsh = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableCompletion = true;
|
enableCompletion = true;
|
||||||
@@ -153,85 +150,4 @@
|
|||||||
set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | %a %h-%d %H:%M '
|
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"
|
|
||||||
# ];
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
# };
|
|
||||||
}
|
}
|
||||||
@@ -15,6 +15,7 @@ let
|
|||||||
skygUtils = import ./skyg-utils.nix {
|
skygUtils = import ./skyg-utils.nix {
|
||||||
pkgs = allPkgs.x86_64-linux;
|
pkgs = allPkgs.x86_64-linux;
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
|
rootDir = rootDir;
|
||||||
};
|
};
|
||||||
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
eachSystem = nixpkgs.lib.genAttrs (import systems);
|
||||||
allPkgs = eachSystem (
|
allPkgs = eachSystem (
|
||||||
|
|||||||
@@ -10,55 +10,18 @@ let
|
|||||||
system = pkgs.stdenv.hostPlatform.system;
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
hyprlandPkg = hyprland.packages.${system}.hyprland;
|
hyprlandPkg = hyprland.packages.${system}.hyprland;
|
||||||
hyprlandPortal = hyprland.packages.${system}.xdg-desktop-portal-hyprland;
|
hyprlandPortal = hyprland.packages.${system}.xdg-desktop-portal-hyprland;
|
||||||
|
bakedConfig = skygUtils.bakeConfig {
|
||||||
# When mountAsSource is set, build a real, GC-protected copy of the hypr config
|
configName = cfg.configLink.name;
|
||||||
# dir. The flake self-source path (skyg.rootDir) is not referenced by the system
|
configType = "hypr";
|
||||||
# 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"
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
skyg.nixos.desktop.tiler.hyprland = {
|
skyg.nixos.desktop.tiler.hyprland = {
|
||||||
enable = lib.mkEnableOption "hyprland";
|
enable = lib.mkEnableOption "hyprland";
|
||||||
configName = lib.mkOption {
|
configLink = skygUtils.makeConfigLinkOptions {
|
||||||
type = lib.types.str;
|
hostName = config.skyg.core.hostName;
|
||||||
default = config.skyg.core.hostName;
|
configType = "hypr";
|
||||||
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.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
tools = {
|
tools = {
|
||||||
enable = lib.mkEnableOption "Hyprland shell tools (hypridle, wofi, rofi, grim, slurp, satty)";
|
enable = lib.mkEnableOption "Hyprland shell tools (hypridle, wofi, rofi, grim, slurp, satty)";
|
||||||
@@ -93,16 +56,16 @@ in
|
|||||||
grim
|
grim
|
||||||
slurp
|
slurp
|
||||||
satty
|
satty
|
||||||
]) ++ (lib.optionals cfg.configLink.mountAsSource [ bakedHyprConfig ]);
|
]) ++ (lib.optionals cfg.configLink.mountAsSource [ bakedConfig ]);
|
||||||
|
|
||||||
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
|
# Symlink ~/.config/hypr -> configs/<configName>/hypr (host-specific).
|
||||||
system.userActivationScripts.hyprlandConfig = lib.mkIf cfg.configLink.enable {
|
system.userActivationScripts.hyprlandConfig = lib.mkIf cfg.configLink.enable {
|
||||||
text = skygUtils.makeHyperlinkScriptToConfigs {
|
text = skygUtils.makeHyperlinkScriptToConfigs {
|
||||||
filePath = "${cfg.configName}/hypr";
|
filePath = "${cfg.configLink.name}/hypr";
|
||||||
targetPath = "hypr";
|
targetPath = "hypr";
|
||||||
configSource =
|
configSource =
|
||||||
if cfg.configLink.mountAsSource then
|
if cfg.configLink.mountAsSource then
|
||||||
"${bakedHyprConfig}"
|
"${bakedConfig}"
|
||||||
else
|
else
|
||||||
"/home/${config.skyg.user.name}/nixos-setup/configs";
|
"/home/${config.skyg.user.name}/nixos-setup/configs";
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -9,30 +9,35 @@ let
|
|||||||
cfg = config.skyg.nixos.desktop.tiler.noctalia;
|
cfg = config.skyg.nixos.desktop.tiler.noctalia;
|
||||||
system = pkgs.stdenv.hostPlatform.system;
|
system = pkgs.stdenv.hostPlatform.system;
|
||||||
noctaliaPkg = noctalia.packages.${system}.default;
|
noctaliaPkg = noctalia.packages.${system}.default;
|
||||||
|
bakedConfig = skygUtils.bakeConfig {
|
||||||
|
configName = cfg.configLink.name;
|
||||||
|
configType = "noctalia";
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
skyg.nixos.desktop.tiler.noctalia = {
|
skyg.nixos.desktop.tiler.noctalia = {
|
||||||
enable = lib.mkEnableOption "noctalia";
|
enable = lib.mkEnableOption "noctalia";
|
||||||
configName = lib.mkOption {
|
configLink = skygUtils.makeConfigLinkOptions {
|
||||||
type = lib.types.str;
|
hostName = config.skyg.core.hostName;
|
||||||
default = config.skyg.core.hostName;
|
configType = "noctalia";
|
||||||
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`).
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
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).
|
# Symlink ~/.config/noctalia -> configs/<configName>/noctalia (host-specific).
|
||||||
system.userActivationScripts.noctaliaCfg.text = skygUtils.makeHyperlinkScriptToConfigs {
|
system.userActivationScripts.noctaliaCfg = lib.mkIf cfg.configLink.enable {
|
||||||
filePath = "${cfg.configName}/noctalia";
|
text = skygUtils.makeHyperlinkScriptToConfigs {
|
||||||
targetPath = "noctalia";
|
filePath = "${cfg.configLink.name}/noctalia";
|
||||||
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs";
|
targetPath = "noctalia";
|
||||||
|
configSource =
|
||||||
|
if cfg.configLink.mountAsSource then
|
||||||
|
"${bakedConfig}"
|
||||||
|
else
|
||||||
|
"/home/${config.skyg.user.name}/nixos-setup/configs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+47
-5
@@ -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 =
|
makeHyperlinkScriptToConfigs =
|
||||||
{ filePath
|
{ filePath
|
||||||
, configSource
|
, 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
|
, targetPath ? filePath
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
@@ -22,4 +31,37 @@
|
|||||||
}
|
}
|
||||||
fi
|
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.
Reference in new issue
Block a user