This repository has been archived by the owner on May 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
153 lines (120 loc) · 5.2 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
142
143
144
145
146
147
148
149
150
151
152
153
{
description = "minego's NixOS Configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; };
nur.url = "github:nix-community/NUR";
# Secret management
agenix = { url = "github:ryantm/agenix"; inputs.nixpkgs.follows = "nixpkgs"; };
# Neovim, with my configuration, plugins and custommizations
neovim-minego = { url = "github:minego/nixvim"; inputs.nixpkgs.follows = "nixpkgs"; };
# DWL, with my patches etc
dwl-minego-customized = { url = "github:minego/dwl/main"; inputs.nixpkgs.follows = "nixpkgs"; };
# My plugins for interception-tools
mackeys = { url = "github:minego/mackeys"; inputs.nixpkgs.follows = "nixpkgs"; };
swapmods = { url = "github:minego/swapmods"; inputs.nixpkgs.follows = "nixpkgs"; };
chrkbd = { url = "github:minego/chrkbd"; inputs.nixpkgs.follows = "nixpkgs"; };
# NixOS generators allow outputting to formats like an iso, image, etc
nixos-generators = { url = "github:nix-community/nixos-generators"; inputs.nixpkgs.follows = "nixpkgs"; };
# Support for Avahi, ie Linux on Apple Silicon
apple-silicon = { url = "github:tpwrules/nixos-apple-silicon"; inputs.nixpkgs.follows = "nixpkgs"; };
# Support for phones, including my PinePhone Pro
mobile-nixos = { url = "github:NixOS/mobile-nixos"; flake = false; };
sxmo-nix = { url = "github:chuangzhu/nixpkgs-sxmo"; flake = false; };
# Support for nix on macOS
darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; };
nixpkgs-firefox-darwin = { url = "github:bandithedoge/nixpkgs-firefox-darwin"; inputs.nixpkgs.follows = "nixpkgs"; };
# Support for nixos on the Steam Deck (and similar devices)
jovian-nixos = { url = "github:Jovian-Experiments/Jovian-NixOS"; inputs.nixpkgs.follows = "nixpkgs"; };
zsh-vi-mode = { url = "github:jeffreytse/zsh-vi-mode"; flake = false; };
# nixtheplanet = { url = "github:matthewcroughan/nixtheplanet"; inputs.nixpkgs.follows = "nixpkgs"; };
p81 = { url = "github:devusb/p81.nix"; inputs.nixpkgs.follows = "nixpkgs"; };
};
outputs = { nixpkgs, ... }@inputs:
let
overlays = [
inputs.neovim-minego.overlays.default
inputs.nur.overlay
inputs.agenix.overlays.default
(import ./overlays/fonts.nix)
# Allow grabbing specific packages from the previous release to
# deal with things that are broken by unstable.
(final: _prev: {
stable = import inputs.nixpkgs-stable {
system = final.system;
config.allowUnfree = true;
};
})
# Get the latest zsh-vi-mode
(self: super: {
zsh-vi-mode = super.zsh-vi-mode.overrideDerivation (oldAttrs: {
src = inputs.zsh-vi-mode;
});
})
];
linuxOverlays = [
inputs.dwl-minego-customized.overlays.default
inputs.swapmods.overlay
inputs.mackeys.overlay
inputs.chrkbd.overlay
inputs.p81.overlays.default
];
darwinOverlays = [
inputs.nixpkgs-firefox-darwin.overlay
];
in rec {
nixosConfigurations = {
# My main desktop computer
dent = import ./hosts/dent { inherit inputs overlays linuxOverlays; };
# Thinkpad
lord = import ./hosts/lord { inherit inputs overlays linuxOverlays; };
# Home server
hotblack = import ./hosts/hotblack { inherit inputs overlays linuxOverlays; };
# Macbook pro (m2 max) running NixOS with Asahi
zaphod2 = import ./hosts/zaphod2 { inherit inputs overlays linuxOverlays; };
# Gateway VM
gateway-vm = import ./hosts/gateway-vm { inherit inputs overlays linuxOverlays; };
# PinePhone Pro
marvin = import ./hosts/marvin { inherit inputs overlays linuxOverlays; };
# Steam Deck
wonko = import ./hosts/wonko { inherit inputs overlays linuxOverlays; };
# Pixel Slate Tablet
trillian = import ./hosts/trillian { inherit inputs overlays linuxOverlays; };
};
darwinConfigurations = {
# Macbook pro (m2 max)
zaphod = import ./hosts/zaphod { inherit inputs overlays darwinOverlays; };
# Mac mini (m1)
random = import ./hosts/random { inherit inputs overlays darwinOverlays; };
};
homeConfigurations = {
# NixOS
dent = nixosConfigurations.dent.config.home-manager.users.m.home;
hotblack = nixosConfigurations.hotblack.config.home-manager.users.m.home;
zaphod2 = nixosConfigurations.zaphod2.config.home-manager.users.m.home;
# Gavin's NixOS Laptop
lord-m = nixosConfigurations.lord.config.home-manager.users.m.home;
lord-gavin = nixosConfigurations.lord.config.home-manager.users.gavin.home;
# Darwin
zaphod = nixosConfigurations.zaphod.config.home-manager.users.m.home;
random = nixosConfigurations.random.config.home-manager.users.m.home;
};
marvin-image = nixosConfigurations.marvin.config.mobile.outputs.u-boot.disk-image;
devShells.x86_64-linux.default = let
pkgs = nixpkgs.legacyPackages.x86_64-linux;
in pkgs.mkShell {
name = "minego-nixos-config";
packages = with pkgs; [
nvd gnumake
];
};
devShells.aarch64-linux.default = let
pkgs = nixpkgs.legacyPackages.aarch64-linux;
in pkgs.mkShell {
name = "minego-nixos-config";
packages = with pkgs; [
nvd gnumake
];
};
};
}