nixos/flake.nix

109 lines
2.8 KiB
Nix
Raw Normal View History

2021-12-11 14:21:48 +01:00
{
2021-12-11 14:44:46 +01:00
description = "Andreas Zweili's Nixos configuration";
inputs = {
2022-05-31 09:11:44 +02:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
2021-12-11 14:44:46 +01:00
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
2021-12-16 20:19:21 +01:00
# look here for the hardware options https://github.com/NixOS/nixos-hardware/blob/master/flake.nix#L5
2021-12-11 15:42:32 +01:00
nixos-hardware.url = "github:nixos/nixos-hardware";
2021-12-16 20:19:21 +01:00
2022-06-27 18:53:24 +02:00
nix-alien = {
url = "github:thiagokokada/nix-alien";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-03-16 14:30:12 +01:00
agenix = {
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
2021-12-11 14:44:46 +01:00
home-manager = {
2022-05-31 09:11:44 +02:00
url = "github:nix-community/home-manager/release-22.05";
2021-12-11 14:44:46 +01:00
inputs.nixpkgs.follows = "nixpkgs";
};
};
2021-12-11 15:42:32 +01:00
outputs =
2022-01-03 20:29:08 +01:00
inputs@{ self
2022-03-16 14:46:33 +01:00
, agenix
2022-06-27 18:53:24 +02:00
, nix-alien
2021-12-11 15:42:32 +01:00
, nixpkgs
, nixpkgs-unstable
, nixos-hardware
, home-manager
}:
let
2022-02-21 11:36:12 +01:00
custom = import ./custom;
2022-06-29 21:43:18 +02:00
mkComputer = import "${inputs.self}/lib/mk_computer.nix";
mkRaspi = import "${inputs.self}/lib/mk_raspi.nix";
in
{
nixosConfigurations = {
2022-03-16 15:53:39 +01:00
gwyn = mkComputer {
hostname = "gwyn";
home-module = "desktop";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
2022-09-08 14:45:27 +02:00
desktop-vm = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "desktop-vm";
home-module = "desktop";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
staubfinger = mkComputer {
hostname = "staubfinger";
home-module = "desktop";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
2022-02-28 22:19:52 +01:00
# Servers
git = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "git";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
mail = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "mail";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
nextcloud = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "nextcloud";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
pihole = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "pihole";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
plex = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "plex";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
2022-09-03 10:02:24 +02:00
proxy = mkRaspi {
2022-03-16 15:53:39 +01:00
hostname = "proxy";
2022-09-07 11:50:25 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
raspi-test = mkRaspi {
hostname = "raspi-test";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
restic-server = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "restic-server";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
ttrss = mkComputer {
2022-03-16 15:53:39 +01:00
hostname = "ttrss";
2022-09-07 17:36:29 +02:00
inherit custom inputs;
2022-03-16 15:53:39 +01:00
};
2022-01-01 15:26:53 +01:00
};
homeConfigurations = {
2022-02-16 22:19:13 +01:00
"${custom.username}@co-ws-con4" = home-manager.lib.homeManagerConfiguration {
2022-06-29 21:43:18 +02:00
configuration = import "${inputs.self}/home-manager/work-wsl.nix";
2022-09-07 17:36:29 +02:00
system = "x86_64";
username = custom.username;
2022-02-16 22:19:13 +01:00
homeDirectory = "/home/${custom.username}";
extraSpecialArgs = {
2022-02-21 11:43:33 +01:00
inherit custom inputs;
2022-01-24 11:33:17 +01:00
};
};
};
2022-01-24 11:33:17 +01:00
};
}