-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
73 lines (68 loc) · 2.46 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
{
description = "My personal NixOS machines configuration";
inputs.deploy-rs.url = "github:serokell/deploy-rs";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
inputs.home-manager = {
url = "github:nix-community/home-manager/release-24.11";
};
inputs.simple-nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-24.05";
};
inputs.my_dotfiles = {
url = "github:mickours/dotfiles";
flake = false;
};
inputs.nixos-hardware.url = "github:NixOS/nixos-hardware/master";
outputs = { self, nixpkgs, home-manager, simple-nixos-mailserver, deploy-rs, my_dotfiles, nixos-hardware, ... }@inputs: {
nixosConfigurations = {
oursbook3 = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules =
let
nixpkgsUnfree = ({
nixpkgs = {
config.allowUnfree = true;
inherit system;
# overlays = [ (import ./overlays/fixes.nix) ];
#config.permittedInsecurePackages = [
# "teams-1.5.00.23861"
#];
};
});
in
[
nixpkgsUnfree
./deployments/oursbook3.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit my_dotfiles; };
home-manager.users.mmercier = import ./config/home.nix;
home-manager.users.mickours = import ./config/home.nix;
}
nixos-hardware.nixosModules.lenovo-thinkpad-x1-extreme-gen3
];
};
vps = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
simple-nixos-mailserver.nixosModules.mailserver
./deployments/vps.nix
];
};
};
deploy.nodes.vps.hostname = "vps";
deploy.nodes.vps.profiles.system = {
user = "root";
sshUser = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vps;
};
# This is highly advised, and will prevent many possible mistakes
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
# Enable autoformat
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
};
}