-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
141 lines (135 loc) · 4.17 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
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
{
description = "flake for UnknownDevice-ux535";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
nixpkgs-openlp = {
url = "github:Green-D-683/nixpkgs/openlp";
};
flake-utils={
url = "github:numtide/flake-utils";
};
home-manager={
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
screenpad-driver={
url = "github:MatthewCash/asus-wmi-screenpad-module";
inputs.nixpkgs.follows="nixpkgs";
};
plasma-manager = {
url = "github:nix-community/plasma-manager";
# url = "github:Green-D-683/plasma-manager/PowerDevil-Additions";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
nixos-hardware = {
# url = "github:Green-D-683/nixos-hardware/ux535"; # Temporary until PR merged
url = "github:NixOS/nixos-hardware/master";
};
};
outputs = inputs@{self, nixpkgs, home-manager, nixpkgs-openlp, flake-utils, screenpad-driver, plasma-manager, nixos-hardware, ...}:
let
mylib = import ./lib {inherit self; lib = nixpkgs.lib;};
lib = nixpkgs.lib.extend (
final: prev: self.lib // home-manager.lib
);
overlays = (system: import ./pkgs/overlays {inherit inputs; inherit system; lib = lib; inherit self;});
pkgsForSys = (system: import inputs.nixpkgs {
system = system;
overlays = (self.overlays.${system}.default);
config = {
allowBroken = true;
allowUnfree = true;
permittedInsecurePackages = [
"qtwebkit-5.212.0-alpha4"
"electron-28.3.3"
"electron-27.3.11"
];
};
});
in
{
nixosConfigurations = {
UnknownDevice_ux535 = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
inherit lib;
pkgs = pkgsForSys system;
modules = [
./nixos/systems/specific/ux535/config.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
plasma-manager.homeManagerModules.plasma-manager
#self.homeManagerModules.shared
];
backupFileExtension="backup";
};
}
];
specialArgs = {inherit inputs system self;};
};
UnknownDevice_b50-10 = inputs.nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
inherit lib;
pkgs = pkgsForSys system;
modules = [
./nixos/systems/specific/b50-10/config.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
sharedModules = [
plasma-manager.homeManagerModules.plasma-manager
#self.homeManagerModules.shared
];
backupFileExtension="backup";
};
}
];
specialArgs = {inherit inputs system self;};
};
};
homeConfigurations = {
daniel=home-manager.lib.homeManagerConfiguration rec {
pkgs = pkgsForSys system;
system = "x86_64-linux";
modules = [
./home/daniel/home/home.nix
];
extraSpecialArgs = {inherit inputs;};
};
};
homeManagerModules = {
shared = {...}:{
imports = [./home/.shared];
};
rclone = {...}:{
imports = [./home/.shared/rclone.nix];
};
};
packageListNames = (lib.getDirNamesOnly ./pkgs/programs);
lib = mylib;
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = pkgsForSys system;
in {
devShells = {
default = pkgs.mkShell {
packages = with pkgs; [
nil
];
};
};
overlays.default = overlays system;
packages = let
package = name: {${name} = import ./pkgs/derivations/${name} {inherit pkgs; lib = self.lib;};};
in lib.attrListMerge (builtins.map package (lib.getSubDirNames ./pkgs/derivations));
});
}