-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
94 lines (82 loc) · 2.3 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
# This file is the entrypoint into all the system configurations
{
description = "System configuration for NixOS, Mac, Asahi, RaspberryPi, NixOS VMs";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
# Configuration and Program Management
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secrets
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Mac System Configuration
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
# Keyboard hotkey remapping
xremap-flake = {
url = "github:xremap/nix-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
# Text editor branch
toolong = {
url = "github:icecreammatt/toolong";
inputs.nixpkgs.follows = "nixpkgs";
};
# Text editor branch
helix-flake = {
url = "github:icecreammatt/helix/refs/tags/2024-01-29";
# changing this to follows will cause a build error herer
# put this back to follows after rebasing my fork
# inputs.nixpkgs.follows = "nixpkgs";
};
# Simple example on how to use flake input
worm = {
url = "github:icecreammatt/ssu-cs315-worm";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
self,
nixpkgs,
nixos-hardware,
home-manager,
darwin,
sops-nix,
helix-flake,
xremap-flake,
...
}: let
user = "matt";
username = "Matt Carrier";
darkmode = true;
in {
# Gaming PC, Mini, VM, Raspberry Pi
nixosConfigurations = (
import ./hosts/nixos {
inherit (nixpkgs) lib;
inherit inputs nixpkgs nixos-hardware home-manager sops-nix helix-flake user username darkmode;
}
);
# Asahi Linux (M1 Mac)
asahiConfiguration = (
import ./hosts/asahi {
inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager sops-nix helix-flake user username darkmode;
}
);
# Mac x86_64/aarch64 configs
darwinConfigurations = (
import ./hosts/darwin {
inherit (nixpkgs) lib;
inherit inputs nixpkgs home-manager darwin user username darkmode;
}
);
};
}