2024-05-03 21:32:27 +00:00
|
|
|
# Based on the Auxolotl template: https://github.com/auxolotl/templates
|
2024-02-29 14:53:34 +00:00
|
|
|
# For info on Flakes, see: https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled
|
|
|
|
{
|
2024-05-07 22:02:59 +00:00
|
|
|
description = "Aires' system Flake";
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
inputs = {
|
2024-05-25 15:07:10 +00:00
|
|
|
# Track base packagese
|
2024-06-03 17:06:34 +00:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2024-05-06 12:38:54 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Replace Nix with Lix: https://lix.systems/
|
|
|
|
lix = {
|
|
|
|
url = "git+https://git@git.lix.systems/lix-project/lix?ref=refs/tags/2.90-beta.1";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
lix-module = {
|
2024-05-16 16:43:58 +00:00
|
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module";
|
2024-05-07 22:02:59 +00:00
|
|
|
inputs.lix.follows = "lix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# SecureBoot support
|
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.3.0";
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Flatpak support
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.4.1";
|
2024-05-04 02:36:50 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Hardware configurations
|
2024-05-29 23:50:11 +00:00
|
|
|
nixos-hardware.url = "git+https://code.8bitbuddhism.com/aires/nixos-hardware?ref=master";
|
|
|
|
#nixos-hardware.url = "git+https://github.com/NixOS/nixos-hardware?ref=master";
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Home-manager
|
|
|
|
home-manager = {
|
2024-06-03 17:06:34 +00:00
|
|
|
url = "github:nix-community/home-manager";
|
2024-05-07 22:02:59 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs"; # Use system packages list where available
|
|
|
|
};
|
2024-05-03 21:32:27 +00:00
|
|
|
|
2024-05-17 00:08:57 +00:00
|
|
|
# "Secrets management"
|
|
|
|
nix-secrets = {
|
2024-05-30 18:08:19 +00:00
|
|
|
url = "git+file:./nix-secrets";
|
2024-05-17 00:08:57 +00:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# TODO: Add Disko - https://github.com/nix-community/disko
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
outputs =
|
|
|
|
inputs@{
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
lanzaboote,
|
|
|
|
nix-flatpak,
|
|
|
|
home-manager,
|
|
|
|
nixos-hardware,
|
|
|
|
lix-module,
|
2024-05-17 00:08:57 +00:00
|
|
|
nix-secrets,
|
2024-05-07 22:02:59 +00:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
forAllSystems =
|
|
|
|
function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
|
|
|
config.allowUnfree = true;
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
# Define shared modules and imports
|
2024-05-17 00:08:57 +00:00
|
|
|
defaultModules = [
|
|
|
|
{
|
|
|
|
_module.args = {
|
2024-05-25 15:07:10 +00:00
|
|
|
inherit inputs self;
|
2024-05-17 00:08:57 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
./modules/autoimport.nix
|
|
|
|
(import nix-secrets)
|
|
|
|
lix-module.nixosModules.default
|
|
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
/*
|
|
|
|
When running, Home Manager will use the global package cache.
|
|
|
|
It will also back up any files that it would otherwise overwrite.
|
|
|
|
The originals will have the extension shown below.
|
|
|
|
*/
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
backupFileExtension = "home-manager-backup";
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
2024-05-07 22:02:59 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
|
|
|
nixosConfigurations = {
|
2024-04-23 18:46:17 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
Dimaga = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-17 00:08:57 +00:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 22:02:59 +00:00
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
./hosts/Dimaga
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
Haven = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-17 00:08:57 +00:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 22:02:59 +00:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
2024-05-28 15:34:36 +00:00
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
2024-05-07 22:02:59 +00:00
|
|
|
./hosts/Haven
|
|
|
|
];
|
|
|
|
};
|
2024-04-10 19:25:22 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
Khanda = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-17 00:08:57 +00:00
|
|
|
modules = defaultModules ++ [
|
2024-05-12 16:06:08 +00:00
|
|
|
nixos-hardware.nixosModules.microsoft-surface-pro-9
|
2024-05-07 22:02:59 +00:00
|
|
|
./hosts/Khanda
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Pihole = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
2024-05-17 00:08:57 +00:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 22:02:59 +00:00
|
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
|
|
|
./hosts/Pihole
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Shura = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-17 00:08:57 +00:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 22:02:59 +00:00
|
|
|
nixos-hardware.nixosModules.lenovo-legion-16arha7
|
|
|
|
./hosts/Shura
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|