33 lines
945 B
Nix
33 lines
945 B
Nix
### Initialization file used to deploy network-wide configuration
|
|
|
|
# Reference by real-life examples:
|
|
# - https://github.com/balsoft/nixos-config
|
|
# - https://github.com/MatthewCroughan/nixcfg
|
|
|
|
{ config, lib, ... }:
|
|
let
|
|
# Global variables
|
|
homeNixDir = "$HOME/.local/share/home-manager";
|
|
|
|
# NOTE(Krey): Handling of https://github.com/NixOS/nixpkgs/issues/128286
|
|
nixFilesIn = path:
|
|
let
|
|
names = lib.filter (lib.hasSuffix ".nix") (lib.attrNames (builtins.readDir path));
|
|
in
|
|
map (x: path + "/${x}") names;
|
|
in {
|
|
imports = [
|
|
(/. + "${homeNixDir}" + /users/kreyren.nix)
|
|
|
|
(import "${homeNixDir}/machines/${config.networking.hostName}.nix" {inherit homeNixDir;})
|
|
] ++ nixFilesIn "${homeNixDir}/programs/";
|
|
|
|
# Use preferred location for home-manager
|
|
programs.home-manager.path = "${homeNixDir}";
|
|
|
|
# Global packages
|
|
programs.bash.enable = true;
|
|
programs.vim.enable = true;
|
|
programs.gpg.enable = true;
|
|
programs.htop.enable = true;
|
|
} |