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
+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 =
|
||||
{ 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.
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in new issue
Block a user