dotfiles/flake.nix

116 lines
2.6 KiB
Nix
Raw Normal View History

2021-05-30 20:41:33 +01:00
{
description = "NixOS configuration with flakes";
2021-08-08 11:13:52 +01:00
outputs = { self, flake-utils, home-manager, nixpkgs-nixos-unstable, nixpkgs-stable, nixos-hardware, nur, agenix, neuron } @ inputs:
2021-05-31 09:15:44 +01:00
let
mkServer = pkgs: system: hostname:
pkgs.lib.nixosSystem {
system = system;
modules = [
(./. + "/nixos/boxes/${hostname}")
agenix.nixosModules.age
];
specialArgs = { inherit inputs; };
};
mkWorkstation = pkgs: system: hostname:
pkgs.lib.nixosSystem {
system = system;
modules = [
(./. + "/nixos/boxes/${hostname}")
(import ./nixos/email-accounts.nix)
2021-05-31 09:15:44 +01:00
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
2021-09-22 13:41:05 +01:00
home-manager.users.cyryl = {
imports = [ ./nixos/home-manager ];
_module.args.inputs = inputs;
};
}
2021-05-31 09:15:44 +01:00
];
specialArgs = { inherit inputs; };
};
in
2021-05-31 09:15:44 +01:00
{
nixosConfigurations = {
2021-06-26 19:12:31 +01:00
bootstrap = nixpkgs-stable.lib.nixosSystem {
system = "x86_64-linux";
modules = [
(./. + "/nixos/boxes/bootstrap")
];
specialArgs = { inherit inputs; };
};
foureighty = mkWorkstation nixpkgs-stable "x86_64-linux" "foureighty";
skinnyv = mkWorkstation nixpkgs-stable "x86_64-linux" "skinnyv";
2021-09-11 20:32:23 +01:00
thinky = mkWorkstation nixpkgs-stable "x86_64-linux" "thinky";
2021-10-01 10:06:37 +01:00
bolty = mkServer nixpkgs-nixos-unstable "x86_64-linux" "bolty";
vultr1 = mkServer nixpkgs-stable "x86_64-linux" "vultr1";
2021-05-31 09:15:44 +01:00
};
};
2021-05-30 20:41:33 +01:00
inputs = {
2021-06-01 14:30:39 +01:00
nixpkgs-nixos-unstable = {
2021-05-30 20:41:33 +01:00
type = "github";
2021-05-30 23:13:31 +01:00
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable";
2021-05-30 20:41:33 +01:00
};
2021-05-31 09:15:44 +01:00
nixpkgs-stable = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
2021-06-01 14:30:39 +01:00
ref = "nixos-21.05";
2021-05-31 09:15:44 +01:00
};
2021-06-12 09:40:09 +01:00
nixos-hardware = {
type = "github";
owner = "NixOS";
2021-06-12 09:40:09 +01:00
repo = "nixos-hardware";
ref = "master";
2021-06-12 09:40:09 +01:00
};
2021-05-30 20:41:33 +01:00
home-manager = {
type = "github";
owner = "nix-community";
repo = "home-manager";
2021-06-01 14:30:39 +01:00
ref = "release-21.05";
2021-05-30 20:41:33 +01:00
inputs = {
2021-06-01 14:30:39 +01:00
nixpkgs.follows = "nixpkgs-stable";
2021-05-30 20:41:33 +01:00
};
};
2021-05-30 23:13:31 +01:00
flake-utils = {
2021-05-30 20:41:33 +01:00
type = "github";
2021-05-30 23:13:31 +01:00
owner = "numtide";
repo = "flake-utils";
ref = "master";
2021-05-30 20:41:33 +01:00
};
nur = {
type = "github";
owner = "nix-community";
repo = "NUR";
ref = "master";
};
2021-05-31 09:15:44 +01:00
agenix = {
type = "github";
owner = "ryantm";
repo = "agenix";
ref = "master";
2021-05-30 20:41:33 +01:00
};
2021-06-19 10:35:39 +01:00
neuron = {
type = "github";
owner = "srid";
repo = "neuron";
ref = "master";
};
2021-05-30 20:41:33 +01:00
};
2021-05-31 09:15:44 +01:00
2021-05-30 20:41:33 +01:00
}