-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
154 lines (143 loc) · 5.38 KB
/
Copy pathflake.nix
File metadata and controls
154 lines (143 loc) · 5.38 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
{
description = "Community Call of Duty clients packaged for NixOS - Home Manager launcher module (umu + Proton + bubblewrap)";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
git-hooks = {
url = "github:cachix/git-hooks.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
std = {
url = "github:Daaboulex/nix-packaging-standard?ref=v2.29.0";
inputs.nixpkgs.follows = "nixpkgs";
inputs.git-hooks.follows = "git-hooks";
};
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ];
imports = [ inputs.std.flakeModules.base ];
flake.homeModules.default = import ./hm-module.nix;
flake.homeModules.cod-clients = import ./hm-module.nix;
flake.overlays.default =
_final: prev:
let
clients = (prev.callPackage ./pkgs/cod-launcher/clients.nix { }) { };
in
{
cod-plutonium = clients.plutonium;
cod-t7x = clients.t7x;
cod-h1 = clients.h1;
cod-h2 = clients.h2;
cod-steamlink = clients.steamlink;
cod-steam-add = clients.steamadd;
cod-steam-native = clients.steamnative;
cod-cleanops = clients.cleanops;
cod-iw5 = clients.iw5;
cod-iw6 = clients.iw6;
cod-s1 = clients.s1;
cod-iw2 = clients.iw2;
cod-hmw = clients.hmw;
cod-boiii = clients.boiii;
cod-cblauncher = clients.cblauncher;
cod-proton = clients.protonpicker;
};
perSystem =
{ system, ... }:
let
pkgs = import inputs.nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = [ inputs.self.overlays.default ];
};
in
{
_module.args.pkgs = pkgs;
packages.cod-plutonium = pkgs.cod-plutonium;
packages.cod-t7x = pkgs.cod-t7x;
packages.cod-h1 = pkgs.cod-h1;
packages.cod-h2 = pkgs.cod-h2;
packages.cod-steamlink = pkgs.cod-steamlink;
packages.cod-steam-add = pkgs.cod-steam-add;
packages.cod-steam-native = pkgs.cod-steam-native;
packages.cod-cleanops = pkgs.cod-cleanops;
packages.cod-iw5 = pkgs.cod-iw5;
packages.cod-iw6 = pkgs.cod-iw6;
packages.cod-s1 = pkgs.cod-s1;
packages.cod-iw2 = pkgs.cod-iw2;
packages.cod-hmw = pkgs.cod-hmw;
packages.cod-boiii = pkgs.cod-boiii;
packages.cod-cblauncher = pkgs.cod-cblauncher;
packages.cod-proton = pkgs.cod-proton;
packages.default = pkgs.cod-plutonium;
checks.module-eval-hm = inputs.std.lib.homeModuleCheck {
inherit (inputs) nixpkgs home-manager;
inherit system;
module = ./hm-module.nix;
config.myModules.home.cod-clients = {
enable = true;
plutonium.enable = true;
t7x.enable = true;
t7x.extraWinetricks = [ "mf" ];
h1.enable = true;
h1.extraWinetricks = [ "mf" ];
h2.enable = true;
h2.extraWinetricks = [ "mf" ];
alterware = {
iw5.enable = true;
iw6.enable = true;
s1.enable = true;
iw2.enable = true;
};
hmw.enable = true;
hmw.extraWinetricks = [ "mf" ];
boiii.enable = true;
boiii.extraWinetricks = [ "mf" ];
cblauncher.enable = true;
cblauncher.gameDirs = [ "/tmp/cb-games" ];
cblauncher.extraWinetricks = [ "dotnet472" ];
cblauncher.extraArgs = [ "-someflag" ];
cblauncher.env.PROTON_LOG = "1";
cblauncher.subProton."probe.exe" = {
protonPath = "/probe-proton";
gameDir = "/tmp/cb-games/probe";
env.PROTON_ENABLE_WAYLAND = "1";
};
cblauncher.subProton."iw3mp.exe".protonPath = "/probe-proton";
steamAdd.enable = true;
steamNative.enable = true;
steamLink.enable = true;
cleanops.enable = true;
};
};
checks.sub-proton-build =
((pkgs.callPackage ./pkgs/cod-launcher/clients.nix { }) {
cblauncherSubProton."probe.exe" = {
protonPath = "/probe-proton";
gameDir = "/probe-games";
};
}).cblauncher;
checks.steam-add-logic =
let
py = pkgs.python3.withPackages (ps: [ ps.vdf ]);
in
pkgs.runCommand "steam-add-logic" { nativeBuildInputs = [ py ]; } ''
python3 ${./pkgs/cod-launcher/steam-add-test.py} ${./pkgs/cod-launcher/steam-add.py}
touch $out
'';
checks.steam-native-logic =
let
py = pkgs.python3.withPackages (ps: [ ps.vdf ]);
in
pkgs.runCommand "steam-native-logic" { nativeBuildInputs = [ py ]; } ''
python3 ${./pkgs/cod-launcher/steam-native-test.py} ${./pkgs/cod-launcher/steam-native.py}
touch $out
'';
};
};
}