skyg utils
This commit is contained in:
1 parent
320d63216e
commit
5dff13db1e
6 files changed
+227
-4
No files matched your search
+2
-1
@@ -7,6 +7,7 @@
|
||||
, specialArgs
|
||||
}:
|
||||
let
|
||||
skygUtils = import ./skyg-utils.nix;
|
||||
makeImports =
|
||||
{ attrs
|
||||
, extraConfiguration ? [ ]
|
||||
@@ -29,7 +30,7 @@ let
|
||||
in
|
||||
nixpkgs.lib.nixosSystem {
|
||||
specialArgs = specialArgs // {
|
||||
inherit system;
|
||||
inherit system skygUtils;
|
||||
};
|
||||
system = system;
|
||||
modules = (makeImports {
|
||||
|
||||
@@ -13,6 +13,7 @@ in
|
||||
./gnome.nix
|
||||
./tiler.nix
|
||||
./hyprland.nix
|
||||
./niri.nix
|
||||
];
|
||||
|
||||
options = {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
{ config, lib, pkgs, skygUtils, ... }:
|
||||
let
|
||||
cfg = config.skyg.nixos.desktop.niri;
|
||||
in
|
||||
@@ -13,11 +13,13 @@ in
|
||||
skyg.nixos.desktop.tiler.enable = true;
|
||||
programs.niri = {
|
||||
enable = true;
|
||||
withUWSM = true;
|
||||
};
|
||||
programs.niri.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
hypridle
|
||||
];
|
||||
system.userActivationScripts.niriConfig.text = skygUtils.makeHyperlinkScriptToConfigs {
|
||||
filePath = "niri.kdl";
|
||||
configSource = "/home/${config.skyg.user.name}/nixos-setup/configs/niri";
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{
|
||||
makeHyperlinkScriptToConfigs =
|
||||
{ filePath
|
||||
, configSource
|
||||
}:
|
||||
let
|
||||
homePath = "$HOME/.config/${filePath}";
|
||||
sourcePath = "${configSource}/${filePath}";
|
||||
in
|
||||
''
|
||||
rm -f "${homePath}"
|
||||
if [[ ! -h "$HOME/.config/${filePath}" ]]; then
|
||||
ln -s "${sourcePath}" "${homePath}"
|
||||
fi
|
||||
'';
|
||||
}
|
||||
Reference in new issue
Block a user