-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
125 lines (111 loc) · 3.92 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
{
description = "Machine configurations with nix";
inputs = {
nixpkgs-master.url = "github:NixOS/nixpkgs/master";
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-24.11-darwin";
nixpkgs-nixos.url = "github:NixOs/nixpkgs/nixos-24.11";
darwin.url = "github:lnl7/nix-darwin/nix-darwin-24.11";
darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
flake-utils.url = "github:numtide/flake-utils";
nix-kubectl-gs.url = "github:swoehrl-mw/nix-kubectl-gs";
# neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
# neovim-nightly-overlay.inputs.nixpkgs.follows = "nixpkgs";
# nvim-config = {
# url = "github:lockejan/neovim-config";
# flake = false;
# };
};
outputs = { self, home-manager, darwin, ... }@inputs:
let
system.silicon = "aarch64-darwin";
user.work = "schmitt";
user.m1 = "lockejan";
system.raspbi = "aarch64-linux";
pkgs = inputs.nixpkgs.legacyPackages.${system.silicon};
stateVersion = "24.11";
# pkgs = import inputs.nixpkgs {
# inherit system;
# config = { allowUnfree = true; };
# # overlays = [ inputs.neovim-nightly-overlay.overlay ];
# };
in
{
darwinConfigurations = {
m1 = darwin.lib.darwinSystem {
modules = [
home-manager.darwinModules.home-manager
./darwin/configuration.nix
{
home-manager = {
users.${user.m1}.imports =
[
./home-manager/home.nix
./home-manager/modules/alacritty.nix
# ./home-manager/modules/osx.nix
./home-manager/modules/cli.nix
./home-manager/modules/git.nix
./home-manager/modules/gpg.nix
./home-manager/modules/kitty.nix
./home-manager/modules/neovim.nix
./home-manager/modules/python.nix
./home-manager/modules/ssh.nix
./home-manager/modules/tmux.nix
./home-manager/machines/personal.nix
];
extraSpecialArgs = {
inherit inputs;
inherit stateVersion;
username = user.m1;
};
};
}
];
specialArgs = {
inherit inputs;
username = user.m1;
};
system = system.silicon;
};
};
homeConfigurations."${user.work}" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
# Specify your home configuration modules here, for example,
# the path to your home.nix.
modules = [
./home-manager/home.nix
./home-manager/modules/osx.nix
./home-manager/modules/cli.nix
./home-manager/modules/git.nix
./home-manager/modules/gpg.nix
./home-manager/modules/kitty.nix
./home-manager/modules/neovim.nix
./home-manager/modules/python.nix
./home-manager/modules/ssh.nix
./home-manager/modules/tmux.nix
./home-manager/machines/work.nix
];
# Optionally use extraSpecialArgs
# to pass through arguments to home.nix
extraSpecialArgs = {
inherit inputs;
inherit stateVersion;
username = user.work;
};
};
nixosConfigurations = {
nixos-raspbi = inputs.nixpkgs-nixos.lib.nixosSystem {
system = system.raspbi;
modules = [
./nixos/configuration.nix
inputs.nixos-hardware.nixosModules.raspberry-pi-4
];
};
};
};
}