-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
78 lines (73 loc) · 2.46 KB
/
flake.nix
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
{
description = "Home Manager configuration for mnaveau";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
system-manager = {
url = "github:numtide/system-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-system-graphics = {
url = "github:soupglasses/nix-system-graphics";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, system-manager, nix-system-graphics, ... }:
let
system = "x86_64-linux";
username = "mnaveau";
# pkgs = nixpkgs.legacyPackages.${system};
pkgs = import nixpkgs { system = "x86_64-linux"; config.allowUnfree = true; };
in {
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
defaultPackage.x86_64-darwin = home-manager.defaultPackage.x86_64-darwin;
systemConfigs.default = system-manager.lib.makeSystemConfig {
modules = [
nix-system-graphics.systemModules.default
({
config = {
nixpkgs.hostPlatform = "${system}";
system-manager.allowAnyDistro = true;
system-graphics = let
nvidia-drivers = (pkgs.linuxPackages.nvidiaPackages.mkDriver {
version = "535.183.01";
sha256_64bit = "sha256-9nB6+92pQH48vC5RKOYLy82/AvrimVjHL6+11AXouIM=";
sha256_aarch64 = "";
openSha256 = "";
settingsSha256 = "";
persistencedSha256 = "";
patches = pkgs.linuxPackages.nvidiaPackages.legacy_535.patches;
}).override { libsOnly = true; kernel = null; };
in {
enable = true;
enable32Bit = true;
package = nvidia-drivers;
package32 = nvidia-drivers.lib32;
};
};
})
];
};
devShells."${system}".default = pkgs.mkShellNoCC {
packages = [
system-manager.packages."${system}".default
];
};
homeConfigurations = {
"${username}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./home.nix
({
home.packages = [ system-manager.packages."${system}".default ];
})
];
};
};
};
}