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 
{ inputs, config, pkgs, lib, currentSystem, ... }:

let
  NIXPKGS_PATH = lib.cleanSource pkgs.path;

in {

  imports = (builtins.concatLists [
    [
      ../../modules
      ./programs
      inputs.lix-module.nixosModules.default
    ]
    (if (currentSystem == "x86_64-linux") then [
      inputs.home-manager.nixosModules.home-manager
      ../linux
    ] else [])
    (if (currentSystem == "aarch64-darwin") || (currentSystem == "x86_64-darwin") then [
      inputs.home-manager.darwinModules.home-manager
      ../darwin
    ] else [])
  ]);

  time.timeZone              = "Europe/Berlin";

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

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

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

      trusted-public-keys = [
        "cache.lix.systems:aBnZUw8zA7H35Cz2RyKFVs3H4PlGTLawyY5KRbvJR8o="
      ];
    };
  };

}