-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
87 lines (85 loc) · 2.73 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
79
80
81
82
83
84
85
86
87
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
helix = {
url = "github:mattwparas/helix/steel-event-system";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { nixpkgs, home-manager, sops-nix, helix, ... } @ inputs: let
eachSystem = fn: nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-linux"
] (system: (fn {
inherit system;
pkgs = (import nixpkgs { inherit system; });
}));
hardware = builtins.fetchGit { url = "https://github.com/NixOS/nixos-hardware.git"; };
wayland = false;
in {
templates = import ./templates;
devShells = eachSystem ({ pkgs, ... }: { default = pkgs.callPackage ./shell.nix {}; });
nixosConfigurations.desktop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs wayland; };
modules = [
"${hardware}/msi/b550-a-pro"
./configuration.nix
./gpu/nvidia.nix
home-manager.nixosModules.home-manager {
home-manager.sharedModules = [
sops-nix.homeManagerModules.sops
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit wayland helix;
theme = import ./theme.nix inputs;
monitors = [
"DP-1,3440x1440,0x0,1"
"HDMI-1,1920x1080,3440x360,1"
];
};
home-manager.users.josephd = import ./home.nix;
}
];
};
nixosConfigurations.laptop = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs wayland; };
modules = [
"${hardware}/asus/fx506hm"
./configuration.nix
({ pkgs, ... }: {
hardware.asus.battery = {
chargeUpto = 85;
enableChargeUptoScript = true;
};
boot.kernelModules = [ "i2c-dev" ];
hardware.i2c.enable = true;
services.udev.packages = [ pkgs.openrgb ];
services.hardware.openrgb.enable = true;
})
home-manager.nixosModules.home-manager {
home-manager.sharedModules = [
sops-nix.homeManagerModules.sops
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {
inherit wayland helix;
theme = import ./theme.nix inputs;
monitors = [ "eDP-1,1920x1080,0x0,1" ];
};
home-manager.users.josephd = import ./home.nix;
}
];
};
};
}