-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake-configurations.nix
111 lines (106 loc) · 3.05 KB
/
flake-configurations.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
{ self, inputs, ... }:
let
system = "x86_64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system};
flakepkgs = self.packages.${pkgs.hostPlatform.system};
extraArgs = [
({ pkgs, ... }: {
config._module.args = {
# This is the new, hip extraArgs.
inherit flakepkgs;
};
})
];
specialArgs = {
inherit inputs;
inherit self;
};
nixosSystem = inputs.nixpkgs.lib.nixosSystem;
in
{
# TODO: merge this file somehow with the home config as stated in configuration.nix
systems = [ system ];
perSystem = { self', pkgs, ... }: {
apps = {
# today i had to fix stuff using:
# sudo mkdir -m 0755 -p /nix/var/nix/{profiles,gcroots}/per-user/$USER
# sudo chown -R $USER /nix/var/nix/{profiles,gcroots}/per-user/$USER
doctor-home =
let
activation-script = pkgs.writeShellScript "activate" ''
${inputs.home-manager.packages.${pkgs.system}.home-manager}/bin/home-manager --option keep-going true --flake "${self}#peter-doctor-cluster" "$@"
'';
in
{
type = "app";
program = "${activation-script}";
};
};
#packages = {
# flake-app-doctor-home = pkgs.writeScriptBin "flake-app-doctor-home" ''
# ${self.homeConfigurations.peter-doctor-cluster.activationPackage}/activate
# '';
#};
};
flake = {
homeConfigurations.peter = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./homeManager/peter.nix
];
extraSpecialArgs = {
inherit inputs;
inherit (inputs) astro-nvim;
inherit flakepkgs;
username = "peter";
homeDirectory = "/home/peter";
my-gui = true;
};
};
homeConfigurations.peter-doctor-cluster = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = [
./homeManager/peter.nix
];
extraSpecialArgs = {
inherit inputs;
inherit (inputs) astro-nvim;
inherit flakepkgs;
username = "okelmann";
homeDirectory = "/home/okelmann";
my-gui = false;
};
};
nixosConfigurations.aendernix = nixosSystem {
system = "x86_64-linux";
modules = extraArgs ++ [
./modules/hardware/hardware-aendernix.nix
./aendernix.nix
./config-common.nix
./modules/gnome.nix
./modules/android-dev.nix
];
inherit specialArgs;
};
nixosConfigurations.aenderpad = nixosSystem {
system = "x86_64-linux";
modules = extraArgs ++ [
./modules/hardware/hardware-aenderpad.nix
./aenderpad.nix
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-e14-amd
./config-common.nix
./modules/gnome.nix
];
inherit specialArgs;
};
# nixosConfigurations.aendernext = nixosSystem {
# system = "x86_64-linux";
# modules = extraArgs ++ [
# ./modules/hardware/hardware-aendernext.nix
# ./aenderpad.nix
# ./config-common.nix
# ];
# inherit specialArgs;
# };
};
}