Compare commits
3 Commits
06f2e248a8
...
4f308b945d
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f308b945d | |||
| 8dc79f60ee | |||
| 03f1d74812 |
@@ -8,6 +8,7 @@
|
||||
self',
|
||||
pkgs,
|
||||
inputs',
|
||||
flakeLocation,
|
||||
...
|
||||
}: {config, ...}: let
|
||||
modules = with self.nixosModules; [
|
||||
@@ -65,12 +66,22 @@
|
||||
''}
|
||||
end)
|
||||
'';
|
||||
# Easy way to get nix runtime info (ie the directory the config is at)
|
||||
# into hyprland to run commands and stuff
|
||||
runtimeFile = pkgs.writeText "runtime.lua" ''
|
||||
hl.on("hyprland.start", function ()
|
||||
${lib.optionalString (flakeLocation != "") ''
|
||||
hl.exec_cmd( 'curl -X POST -H "Content-Type: application/json" -d "{\"ref\":\"$(git -C ${flakeLocation} rev-parse HEAD)\", \"status\":\"$(git -C ${flakeLocation} diff --quiet && echo "clean" || echo "dirty")\"}" https://n8n.voidarc.co.uk/webhook/config-checker' )
|
||||
''}
|
||||
end)
|
||||
'';
|
||||
in
|
||||
lib.stringAfter ["specialfs"] ''
|
||||
mkdir -p /run/hypr/config
|
||||
rm -rf /run/hypr/config/*
|
||||
ln -sfn ${inputs'.hyprland.packages.repo-files}/* /run/hypr/config
|
||||
ln -sfn ${pluginFile} /run/hypr/config/plugins.lua
|
||||
ln -sfn ${runtimeFile} /run/hypr/config/runtime.lua
|
||||
'';
|
||||
};
|
||||
});
|
||||
|
||||
@@ -25,15 +25,13 @@
|
||||
});
|
||||
perSystem = {
|
||||
pkgs,
|
||||
lib,
|
||||
self',
|
||||
lib,
|
||||
flakeLocation,
|
||||
...
|
||||
}: {
|
||||
packages = {
|
||||
zsh = let
|
||||
flakeLocation = builtins.getEnv "PWD";
|
||||
in
|
||||
lib.warnIf (flakeLocation == "") "Flake Location is undefined. Are you building in the right directory?"
|
||||
zsh = lib.warnIf (flakeLocation == "") "Flake Location is undefined. Are you building in the right directory?"
|
||||
inputs.wrappers.wrappers.zsh.wrap {
|
||||
inherit pkgs;
|
||||
runtimePkgs = [pkgs.carapace pkgs.devenv pkgs.fzf];
|
||||
|
||||
@@ -1,13 +1,5 @@
|
||||
{
|
||||
self,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
flake.nixosModules.core = {
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
{self, ...}: {
|
||||
flake.nixosModules.core = {pkgs, ...}: let
|
||||
modules = with self.nixosModules; [
|
||||
user
|
||||
bootloader
|
||||
@@ -21,6 +13,7 @@
|
||||
/etc/nixos/hardware-configuration.nix
|
||||
]
|
||||
++ modules;
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
avahi.enable = true;
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
{inputs, ...}: {
|
||||
perSystem = {system, ...}: {
|
||||
_module.args.unfreePkgs = import inputs.nixpkgs {
|
||||
_module.args = {
|
||||
unfreePkgs = import inputs.nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
# Make flakeLocation universally addressable
|
||||
flakeLocation = builtins.getEnv "PWD";
|
||||
};
|
||||
};
|
||||
flake.nixosModules.nix = {...}: {
|
||||
nix = {
|
||||
|
||||
Reference in New Issue
Block a user