2023-09-28 14:08:07 +02:00
|
|
|
{
|
|
|
|
description = "NixOS System Config";
|
2023-12-15 13:45:45 +01:00
|
|
|
inputs = {
|
2024-01-31 03:36:27 +01:00
|
|
|
# Stable Packages
|
2024-01-30 12:46:32 +01:00
|
|
|
nixpkgs.url = "nixpkgs/nixos-23.11";
|
2024-01-31 03:36:27 +01:00
|
|
|
# Unstable Packages
|
|
|
|
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
2023-12-15 13:45:45 +01:00
|
|
|
# home-manager - Dotfile mnagement - add /master at the end to pull from master
|
2024-01-30 12:46:32 +01:00
|
|
|
home-manager.url = "github:nix-community/home-manager/release-23.11";
|
2023-12-15 13:45:45 +01:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-30 12:46:32 +01:00
|
|
|
# Nix colorizer / themer
|
2024-02-18 12:59:57 +01:00
|
|
|
stylix.url = "github:danth/stylix/release-23.11";
|
2023-12-15 13:45:45 +01:00
|
|
|
# lanzaboote - Secureboot Configuration
|
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote";
|
|
|
|
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-31 03:36:27 +01:00
|
|
|
# nixpkgs-wayland - Wayland-specific packages not in nixpkgs
|
|
|
|
nixpkgs-wayland.url = "github:nix-community/nixpkgs-wayland";
|
2023-12-15 13:45:45 +01:00
|
|
|
# nur - Nix User Repository - user-submitted / maintained packages
|
|
|
|
nur.url = "github:nix-community/NUR";
|
|
|
|
# sops-nix - Secret Management with SOPS using GPG Keys
|
|
|
|
sops-nix.url = "github:Mic92/sops-nix";
|
|
|
|
# doom-emacs - The Doom Emacs distribution`
|
|
|
|
doom-emacs.url = "github:nix-community/nix-doom-emacs";
|
|
|
|
# nixos-hardware - Hardware Configurations
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
|
|
|
# nixos-generators - Automated Image / ISO Creation
|
|
|
|
nixos-generators.url = "github:nix-community/nixos-generators";
|
|
|
|
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# disko - Declarative Disk Partitioning
|
|
|
|
disko.url = "github:nix-community/disko";
|
|
|
|
disko.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
# Firefox theme, for "Gradience" GTK Theming
|
|
|
|
firefox-gnome-theme.url = "github:rafaelmardojai/firefox-gnome-theme";
|
|
|
|
firefox-gnome-theme.flake = false;
|
|
|
|
# deploy-rs, declarative NixOS deployments
|
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
|
|
|
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
|
2023-12-31 16:25:53 +01:00
|
|
|
# KDE Plasma 6 experimental flake
|
|
|
|
kde2nix.url = "github:nix-community/kde2nix";
|
2024-01-01 06:05:29 +01:00
|
|
|
# Manage Plasma desktop with Nix
|
|
|
|
plasma-manager.url = "github:pjones/plasma-manager";
|
|
|
|
plasma-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-31 05:22:28 +01:00
|
|
|
# compose2nix - Convert docker-compose.yml files to nix syntax
|
|
|
|
compose2nix.url = "github:aksiksi/compose2nix";
|
|
|
|
compose2nix.inputs.nixpkgs.follows = "nixpkgs";
|
2024-02-07 12:35:31 +01:00
|
|
|
# Hyprland Flake
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
2024-02-08 03:17:11 +01:00
|
|
|
# nixvim - neovim configuration management in nix
|
2024-02-08 06:24:22 +01:00
|
|
|
nixvim.url = "github:nix-community/nixvim/nixos-23.11";
|
|
|
|
nixvim.inputs.nixpkgs.follows = "nixpkgs";
|
2024-01-07 04:03:33 +01:00
|
|
|
};
|
2024-02-09 14:46:41 +01:00
|
|
|
outputs = { self, nixpkgs, nixpkgs-wayland, home-manager, lanzaboote, nur, sops-nix, doom-emacs, nixos-generators, deploy-rs, ... } @inputs:
|
2023-09-28 14:08:07 +02:00
|
|
|
let
|
|
|
|
inherit (self) outputs;
|
2024-01-30 12:46:32 +01:00
|
|
|
stateVersion = "23.11";
|
|
|
|
hmStateVersion = "23.11";
|
2024-02-09 14:46:41 +01:00
|
|
|
libx = import ./lib { inherit self inputs outputs stateVersion hmStateVersion; };
|
2023-09-28 14:08:07 +02:00
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
2024-03-03 18:24:30 +01:00
|
|
|
osaka-linode-01 = libx.mkHost { hostname = "osaka-linode-01"; type = "small";};
|
2023-12-06 03:56:24 +01:00
|
|
|
framework-server = libx.mkHost { hostname = "framework-server"; };
|
2023-12-19 03:17:00 +01:00
|
|
|
nuc-server = libx.mkHost { hostname = "nuc-server"; };
|
2024-02-18 13:41:10 +01:00
|
|
|
nixos-desktop = libx.mkHost { hostname = "nixos-desktop"; unfree = true; desktop = "hyprland"; theme = "tokyo-night"; };
|
2024-03-09 16:24:37 +01:00
|
|
|
nixos-framework = libx.mkHost { hostname = "nixos-framework"; unfree = true; desktop = "hyprland"; theme = "tokyo-night"; };
|
2024-01-31 04:31:01 +01:00
|
|
|
backups-rpi4 = libx.mkHost { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; };
|
|
|
|
piaware-rpi4 = libx.mkHost { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
|
|
|
|
quitman-rpi4 = libx.mkHost { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
|
2023-09-28 14:08:07 +02:00
|
|
|
};
|
|
|
|
homeConfigurations = {
|
2023-12-11 11:52:52 +01:00
|
|
|
"albert@osaka-linode-01" = libx.mkHome { hostname = "osaka-linode-01"; };
|
2023-11-25 07:17:29 +01:00
|
|
|
"albert@framework-server" = libx.mkHome { hostname = "framework-server"; };
|
2023-12-19 03:17:00 +01:00
|
|
|
"albert@nuc-server" = libx.mkHome { hostname = "nuc-server"; };
|
2024-02-18 13:41:10 +01:00
|
|
|
"albert@nixos-desktop" = libx.mkHome { hostname = "nixos-desktop"; desktop = "hyprland"; theme = "tokyo-night"; };
|
2024-03-09 16:24:37 +01:00
|
|
|
"albert@nixos-framework" = libx.mkHome { hostname = "nixos-framework"; desktop = "hyprland"; theme = "tokyo-night"; };
|
2024-01-31 04:31:01 +01:00
|
|
|
"albert@backups-rpi4" = libx.mkHome { hostname = "backups-rpi4"; system = "aarch64-linux"; type = "small"; };
|
|
|
|
"albert@piaware-rpi4" = libx.mkHome { hostname = "piaware-rpi4"; system = "aarch64-linux"; type = "small"; };
|
|
|
|
"albert@quitman-rpi4" = libx.mkHome { hostname = "quitman-rpi4"; system = "aarch64-linux"; type = "small"; };
|
2023-09-28 14:08:07 +02:00
|
|
|
};
|
2023-12-09 14:10:15 +01:00
|
|
|
deploy.nodes = {
|
|
|
|
osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; };
|
|
|
|
framework-server = libx.deploy { hostname = "framework-server"; };
|
2023-12-19 03:17:00 +01:00
|
|
|
# nuc-server = libx.deploy { hostname = "nuc-server"; };
|
2024-01-31 04:31:01 +01:00
|
|
|
backups-rpi4 = libx.deploy { hostname = "backups-rpi4"; system = "aarch64-linux"; };
|
|
|
|
piaware-rpi4 = libx.deploy { hostname = "piaware-rpi4"; system = "aarch64-linux"; };
|
|
|
|
# quitman-rpi4 = libx.deploy { hostname = "quitman-rpi4"; system = "aarch64-linux"; };
|
2023-12-09 14:10:15 +01:00
|
|
|
};
|
2023-12-12 05:27:40 +01:00
|
|
|
imageConfigurations = {
|
2024-01-06 13:47:19 +01:00
|
|
|
nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; };
|
2024-01-31 04:31:01 +01:00
|
|
|
nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; system = "aarch64-linux"; };
|
2023-12-12 05:27:40 +01:00
|
|
|
nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; };
|
|
|
|
nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; };
|
|
|
|
};
|
2023-12-12 05:29:35 +01:00
|
|
|
|
|
|
|
# Checks for deploy-rs - Makes deploy-rs fail when system evaluations fail
|
2023-12-13 04:23:41 +01:00
|
|
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
2023-12-12 05:29:35 +01:00
|
|
|
|
|
|
|
# Devshell for bootstrapping; acessible via 'nix develop'
|
|
|
|
devShells = libx.forAllSystems (system:
|
|
|
|
let pkgs = nixpkgs.legacyPackages.${system};
|
|
|
|
in import ./shell.nix { inherit pkgs sops-nix deploy-rs system; }
|
|
|
|
);
|
2023-09-28 14:08:07 +02:00
|
|
|
};
|
2024-01-30 12:46:32 +01:00
|
|
|
}
|