-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
163 lines (155 loc) · 4.97 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
154
155
156
157
158
159
160
161
162
163
{
# nix-repl> :lf .
# nix-repl> pkgs = import inputs.nixpkgs { system = builtins.currentSystem; }
description = "My Personal NixOS System Flake Configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/release-24.11";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-index-database = {
url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-alien = {
url = "github:thiagokokada/nix-alien";
inputs.nixpkgs.follows = "nixpkgs";
inputs.nix-index-database.follows = "nix-index-database";
};
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
inputs.home-manager.follows = "home-manager";
};
yazi-plugins = {
url = "github:yazi-rs/plugins";
flake = false;
};
starship-yazi = {
url = "github:Rolv-Apneseth/starship.yazi";
flake = false;
};
nixos-generators = {
url = "github:nix-community/nixos-generators";
inputs.nixpkgs.follows = "nixpkgs";
};
arcsearch = {
url = "github:massivebird/arcsearch";
inputs.nixpkgs.follows = "nixpkgs";
};
wayland-pipewire-idle-inhibit = {
url = "github:rafaelrc7/wayland-pipewire-idle-inhibit";
inputs.nixpkgs.follows = "nixpkgs";
};
catppuccin-btop = {
url = "github:catppuccin/btop";
flake = false;
};
nvim-origami = {
url = "github:chrisgrieser/nvim-origami";
flake = false;
};
workspace-diagnostics-nvim = {
url = "github:artemave/workspace-diagnostics.nvim";
flake = false;
};
};
outputs = inputs: {
nixosModules = {
generators-custom-formats = { config, ... }: {
imports = [ inputs.nixos-generators.nixosModules.all-formats ];
formatConfigs = {
install-iso-plasma = { modulesPath, ... }: {
formatAttr = "isoImage";
fileExtension = ".iso";
imports = [ "${toString modulesPath}/installer/cd-dvd/installation-cd-graphical-calamares-plasma5.nix" ];
};
install-iso-gnome = { modulesPath, ... }: {
formatAttr = "isoImage";
fileExtension = ".iso";
imports = [ "${toString modulesPath}/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix" ];
};
};
};
};
homeConfigurations = {
marlene = inputs.home-manager.lib.homeManagerConfiguration {
pkgs = import inputs.nixpkgs { system = "aarch64-darwin"; };
modules = [
./hosts/marlene/home.nix
./modules/common/home.nix
# Only need to import this as a hm module in standalone hm configs
./modules/common/nixpkgs.nix
];
extraSpecialArgs = {
inherit inputs;
};
};
};
nixosConfigurations =
let
nixosMachine = { system, hostName }:
inputs.nixpkgs.lib.nixosSystem {
inherit system;
specialArgs = { inherit inputs; };
modules = [
{ networking.hostName = hostName; }
./modules/common
./hosts/${hostName}
];
};
in
{
# 12th gen intel framework laptop
yuffie = nixosMachine {
hostName = "yuffie";
system = "x86_64-linux";
};
# desktop tower
terra = nixosMachine {
hostName = "terra";
system = "x86_64-linux";
};
# 2013 macbook air
aerith = nixosMachine {
hostName = "aerith";
system = "x86_64-linux";
};
# mac mini 2011 beatrix
beatrix = nixosMachine {
hostName = "beatrix";
system = "x86_64-linux";
};
# raspberry pi 3B+
# nix build .#nixosConfigurations.boko.config.formats.sd-aarch64 (build is failing atm)
# https://hydra.nixos.org/job/nixos/trunk-combined/nixos.sd_image.aarch64-linux
# https://nix.dev/tutorials/nixos/installing-nixos-on-a-raspberry-pi.html
boko = nixosMachine {
hostName = "boko";
system = "aarch64-linux";
};
# basic virtual machine for experimenting
sandbox = nixosMachine {
hostName = "sandbox";
system = "x86_64-linux";
};
installer = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
inputs.self.nixosModules.generators-custom-formats
({ pkgs, config, ... }: {
nixpkgs.config.allowUnfree = true;
environment.systemPackages = [ pkgs.git pkgs.neovim ];
boot = {
kernelModules = [ "wl" ];
extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
};
})
];
};
};
};
}