-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
139 lines (134 loc) · 3.86 KB
/
flake.nix
File metadata and controls
139 lines (134 loc) · 3.86 KB
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
{
description = "My personal NixOS configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager/master";
inputs.nixpkgs.follows = "nixpkgs";
};
firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme/beta";
flake = false;
};
firefox-nightly.url = "github:nix-community/flake-firefox-nightly";
flatpaks.url = "github:GermanBread/declarative-flatpak/latest";
anyrun = {
url = "github:anyrun-org/anyrun";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpak = {
url = "github:nixpak/nixpak";
inputs.nixpkgs.follows = "nixpkgs";
};
nixpak-pkgs = {
url = "github:nixpak/pkgs";
inputs.nixpak.follows = "nixpak";
};
nvim = {
url = "github:poly2it/nvim";
inputs.nixpkgs.follows = "nixpkgs";
};
silentium = {
url = "github:poly2it/silentium";
inputs.nixpkgs.follows = "nixpkgs";
inputs.firefox-gnome-theme.follows = "firefox-gnome-theme";
};
zed-editor.url = "github:HPsaucii/zed-editor-flake";
# zed-editor.url = "github:HPsaucii/zed-editor-flake?rev=c4b6e1817d1d28efa068b70d71d54d0189626ca8";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
squads = {
url = "github:IanTerzo/Squads";
inputs.nixpkgs.follows = "nixpkgs";
};
depot = {
url = "git+ssh://forgejo@git.cenitly.com/cenitly/depot";
# inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ { nixpkgs, home-manager, flatpaks, rust-overlay, squads, ... }:
let
system = "x86_64-linux";
pkgsFor = system: import ./packages (inputs // {inherit system;});
pkgs = pkgsFor system;
inherit (pkgs) lib;
mkUser = username: { configuration, home ? "/home/${username}" }: {
users.users.${username} = {
home = home;
group = "users";
extraGroups = [ "adbusers" "audio" "kvm" "libvirtd" "podman" "systemd-journal" ];
isNormalUser = true;
initialPassword = "nixos";
};
home-manager.users.${username} = configuration;
};
mkHost = hostname: { modules }: inputs.nixpkgs.lib.nixosSystem {
inherit system;
inherit pkgs;
modules = [
./modules/nix.nix
./modules/locale.nix
./modules/graphics.nix
./modules/sound.nix
./modules/gnome.nix
./modules/fonts.nix
./modules/network.nix
./modules/packages.nix
./modules/vm.nix
./modules/printing.nix
./modules/security.nix
./modules/certs.nix
# ./modules/update.nix
home-manager.nixosModules.home-manager
flatpaks.nixosModules.default
{
networking.hostName = hostname;
users.users.gdm = { extraGroups = [ "video" ]; };
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "shadowed";
};
}
] ++ modules;
};
in
{
devShells.${system} = {
default = pkgs.mkShell {
buildInputs = with pkgs; [
go
];
};
};
nixosConfigurations = {
fractal = mkHost "fractal" {
modules = [
./hosts/fractal
(mkUser "bach" { configuration = import ./users/bach.nix; })
];
};
lenoving = mkHost "lenoving" {
modules = [
./hosts/lenoving
(mkUser "bach" { configuration = import ./users/bach.nix; })
];
};
thinki = mkHost "thinki" {
modules = [
./hosts/thinki
(mkUser "holst" { configuration = import ./users/holst.nix; })
];
};
};
packages.${system} = {
inherit
(pkgs)
dynamic-certs
;
};
};
}