Compare commits
2 commits
6a4d493911
...
2a31c33166
| Author | SHA1 | Date | |
|---|---|---|---|
| 2a31c33166 | |||
| 4bfb8f9fce |
4 changed files with 29 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -72,6 +72,7 @@
|
|||
"storage"
|
||||
"libvirtd"
|
||||
"video"
|
||||
"podman"
|
||||
"render"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
|
|
|
|||
|
|
@ -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
0
static/testconf/test.txt
Normal file
Loading…
Add table
Add a link
Reference in a new issue