summaryrefslogtreecommitdiff
path: root/hosts/akashi/default.nix
blob: 7722ea54801fced873084968b1f3526ae4444b74 (plain) (blame)
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
{
  lib,
  inputs,
  kansaiPkgs,
  pcModules,
  self,
  outputs,
  secrets,
  ...
}:
{
  flake.nixosConfigurations.akashi =
    let
      system = "x86_64-linux";

      pkgs =
        (kansaiPkgs {
          nixpkgsAllowUnfree = true;
          nixpkgsExtraConfig.joypixels.acceptLicense = true;

          nixpkgsAllowUnfreePredicate =
            pkg:
            builtins.elem (lib.getName pkg) [
              "joypixels"
            ];
        }).${system};
    in
    lib.nixosSystem {
      inherit pkgs;

      modules = [
        ./configuration.nix
        ./hardware-configuration.nix
        inputs.home-manager.nixosModules.home-manager
        {
          home-manager = {
            useGlobalPkgs = true;
            useUserPackages = true;
            users.ebisu = import "${self}/home/ebisu/akashi";

            extraSpecialArgs = {
              inherit
                inputs
                self
                secrets
                system
                ;

              flakeDirectory = "";
            };
          };
        }
      ] ++ pcModules pkgs.system;

      specialArgs = {
        inherit
          inputs
          outputs
          secrets
          self
          ;
      };
    };
}