Compare commits

...

2 commits

Author SHA1 Message Date
2a31c33166
added a static config dir
Some checks failed
CI / formatting (push) Failing after 9m22s
CI / nix_flake_check (push) Failing after 9m22s
2025-12-11 12:51:20 +01:00
4bfb8f9fce
edit home.nix @2025-12-11 12:38:54 2025-12-11 12:38:54 +01:00
4 changed files with 29 additions and 7 deletions

View file

@ -10,22 +10,18 @@
flake-utils.url = "github:numtide/flake-utils";
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-ai-tools.url = "github:numtide/nix-ai-tools";
};
outputs = { self, nixpkgs, home-manager, flake-utils, nixvim, nix-ai-tools } @ inputs: {
# Reusable modules
homeManagerModules.copilot-cli = import ./modules/home/copilot-cli.nix;
nixosModules.auto-upgrade = import ./modules/system/auto-upgrade.nix;
# Host configurations
nixosConfigurations.nxs = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
specialArgs = { inherit inputs self; }; # pass self if you want it in system modules too
modules = [
./hosts/nxs
./hosts/nxs/hardware.nix
@ -35,7 +31,7 @@
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
extraSpecialArgs = { inherit inputs self; }; # pass self to home-manager modules
users.narrator = import ./hosts/nxs/home.nix;
sharedModules = [
self.homeManagerModules.copilot-cli

View file

@ -72,6 +72,7 @@
"storage"
"libvirtd"
"video"
"podman"
"render"
];
shell = pkgs.fish;

View file

@ -1,5 +1,15 @@
{ config, lib, pkgs, inputs, ... }:
{ config, lib, pkgs, inputs, self, ... }:
let
staticDir = self + "/static";
cfgDirs =
let
entries = builtins.readDir staticDir; # { nvim = "directory"; foo = "regular"; ... }
onlyDirs = lib.attrsets.filterAttrs (_name: type: type == "directory") entries;
in
builtins.attrNames onlyDirs; # [ "nvim" "kitty" ... ]
in
{
imports = [
inputs.nixvim.homeManagerModules.nixvim
@ -102,4 +112,19 @@
defaultCacheTtlSsh = 28800;
sshKeys = [ ];
};
xdg.configFile =
builtins.listToAttrs (map
(name: {
inherit name; # attr name, e.g. "nvim"
value = {
source = "${staticDir}/${name}"; # /nix/store/...-source/static/nvim
recursive = true;
};
})
cfgDirs);
}

0
static/testconf/test.txt Normal file
View file