ctucx.git: nixfiles

ctucx' nixfiles

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
{ inputs, ctucxConfig, config, pkgs, lib, ... }:

let
  NIXPKGS_PATH = lib.cleanSource pkgs.path;

in {

  imports = [
    ctucxConfig.programs.networkUtilities
  ];

  time.timeZone = "Europe/Berlin";

  home-manager = {
    useGlobalPkgs    = true;
    extraSpecialArgs = {
      inputs       = inputs;
      systemConfig = config;
    };
    
    users.katja = {
      home.sessionVariables = {
        NIXPKGS_PATH = NIXPKGS_PATH;
        NIX_PATH     = "nixpkgs=${NIXPKGS_PATH}";
      };
    };

    sharedModules = [
      ctucxConfig.homeManager.programs.bash
      ctucxConfig.homeManager.programs.starship
      ctucxConfig.homeManager.programs.mcfly
      ctucxConfig.homeManager.programs.eza
      ctucxConfig.homeManager.programs.bat

      ctucxConfig.homeManager.programs.micro
      ctucxConfig.homeManager.programs.tmux
      ctucxConfig.homeManager.programs.htop

      ctucxConfig.homeManager.programs.deploymentUtilities

      ctucxConfig.homeManager.programs.shellUtilities

      ctucxConfig.homeManager.programs.nix-cleanup
    ];
  };

  environment.systemPackages = with pkgs; [
    alacritty.terminfo
    ghostty.terminfo
  ];

  nix = {
    nixPath  = lib.mkForce [ "nixpkgs=${NIXPKGS_PATH}" ];
    settings = {
      nix-path              = config.nix.nixPath;
      trusted-users         = [ "@wheel" ];
      experimental-features = [ "nix-command" "flakes" ];
      extra-substituters    = [
        "https://cache.lix.systems"
      ];
      trusted-public-keys   = [
        "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
      ];
    };
  };

}