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
|
2021-12-11 16:35:32 +01:00
|
|
|
}:
|
|
|
|
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";
|
2022-06-27 19:13:10 +02:00
|
|
|
|
2022-02-16 22:27:50 +01:00
|
|
|
system = custom.system;
|
2022-02-23 10:34:14 +01:00
|
|
|
username = custom.username;
|
2022-06-27 19:13:10 +02:00
|
|
|
|
2021-12-11 17:20:54 +01:00
|
|
|
overlay-unstable = final: prev: {
|
|
|
|
unstable = import nixpkgs-unstable {
|
2022-02-16 22:19:13 +01:00
|
|
|
system = custom.system;
|
2021-12-11 17:20:54 +01:00
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
};
|
2022-02-15 20:54:21 +01:00
|
|
|
|
2021-12-11 16:35:32 +01:00
|
|
|
pkgs = import nixpkgs {
|
2022-02-16 22:27:50 +01:00
|
|
|
inherit system;
|
2021-12-11 16:35:32 +01:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
2021-12-11 17:20:54 +01:00
|
|
|
overlays = [
|
|
|
|
overlay-unstable
|
2022-06-27 18:53:24 +02:00
|
|
|
inputs.nix-alien.overlay
|
2021-12-11 17:20:54 +01:00
|
|
|
];
|
2021-12-11 16:35:32 +01:00
|
|
|
};
|
2022-01-03 19:30:38 +01:00
|
|
|
in
|
|
|
|
{
|
|
|
|
nixosConfigurations = {
|
2022-03-16 15:53:39 +01:00
|
|
|
gwyn = mkComputer {
|
|
|
|
hostname = "gwyn";
|
2022-04-16 16:08:05 +02:00
|
|
|
home-module = "desktop";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
|
|
|
nixos-vm = mkComputer {
|
|
|
|
hostname = "desktop-vm";
|
2022-04-16 16:08:05 +02:00
|
|
|
home-module = "desktop";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
|
|
|
staubfinger = mkComputer {
|
|
|
|
hostname = "staubfinger";
|
2022-04-16 16:08:05 +02:00
|
|
|
home-module = "desktop";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-02-28 22:19:52 +01:00
|
|
|
# Servers
|
2022-04-16 16:08:05 +02:00
|
|
|
git = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "git";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-04-16 16:08:05 +02:00
|
|
|
mail = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "mail";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-04-16 16:08:05 +02:00
|
|
|
nextcloud = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "nextcloud";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-04-16 16:08:05 +02:00
|
|
|
pihole = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "pihole";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-04-16 16:08:05 +02:00
|
|
|
plex = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "plex";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs 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-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
|
|
|
raspi-test = mkRaspi {
|
|
|
|
hostname = "raspi-test";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-04-16 16:08:05 +02:00
|
|
|
restic-server = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "restic-server";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-05-04 23:11:05 +02:00
|
|
|
test-server = mkComputer {
|
|
|
|
hostname = "test-server";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-05-04 23:11:05 +02:00
|
|
|
};
|
2022-04-16 16:08:05 +02:00
|
|
|
ttrss = mkComputer {
|
2022-03-16 15:53:39 +01:00
|
|
|
hostname = "ttrss";
|
2022-06-29 21:43:18 +02:00
|
|
|
inherit custom pkgs inputs;
|
2022-03-16 15:53:39 +01:00
|
|
|
};
|
2022-01-01 15:26:53 +01:00
|
|
|
};
|
2022-01-24 11:27:31 +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-02-23 10:34:14 +01:00
|
|
|
inherit system username;
|
2022-02-16 22:19:13 +01:00
|
|
|
homeDirectory = "/home/${custom.username}";
|
2022-01-24 11:27:31 +01:00
|
|
|
extraSpecialArgs = {
|
2022-02-21 11:43:33 +01:00
|
|
|
inherit custom inputs;
|
2022-01-24 11:33:17 +01:00
|
|
|
};
|
2022-01-24 11:27:31 +01:00
|
|
|
};
|
|
|
|
};
|
2022-01-24 11:33:17 +01:00
|
|
|
};
|
|
|
|
}
|