2024-05-03 17:32:27 -04:00
|
|
|
# Based on the Auxolotl template: https://github.com/auxolotl/templates
|
2024-02-29 09:53:34 -05:00
|
|
|
# For info on Flakes, see: https://nixos-and-flakes.thiscute.world/nixos-with-flakes/nixos-with-flakes-enabled
|
|
|
|
{
|
2024-05-07 18:02:59 -04:00
|
|
|
description = "Aires' system Flake";
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
inputs = {
|
2024-06-24 11:38:28 -04:00
|
|
|
# Import the desired Nix channel. Defaults to unstable, which uses a fully tested rolling release model.
|
|
|
|
# You can find a list of channels at https://nixos.wiki/wiki/Nix_channels
|
|
|
|
# To follow a different channel, replace `nixos-unstable` with the channel name, e.g. `nixos-24.05`.
|
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-05-06 08:38:54 -04:00
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
# Use Lix in place of Nix.
|
|
|
|
# If you'd rather use regular Nix, remove `lix-module.nixosModules.default` from the `modules` section below.
|
|
|
|
# To learn more about Lix, see https://lix.systems/
|
2024-05-07 18:02:59 -04:00
|
|
|
lix-module = {
|
2024-06-24 11:38:28 -04:00
|
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.90";
|
2024-05-07 18:02:59 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Flatpak support
|
|
|
|
nix-flatpak.url = "github:gmodena/nix-flatpak/v0.4.1";
|
2024-05-03 22:36:50 -04:00
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
# SecureBoot support
|
2024-06-27 10:10:44 -04:00
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
|
2024-06-24 11:38:28 -04:00
|
|
|
|
|
|
|
# NixOS hardware quirks
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-06-24 11:38:28 -04:00
|
|
|
# Home-manager support
|
2024-05-07 18:02:59 -04:00
|
|
|
home-manager = {
|
2024-06-03 13:06:34 -04:00
|
|
|
url = "github:nix-community/home-manager";
|
2024-06-24 11:38:28 -04:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
2024-05-03 17:32:27 -04:00
|
|
|
|
2024-05-16 20:08:57 -04:00
|
|
|
# "Secrets management"
|
|
|
|
nix-secrets = {
|
2024-05-30 14:08:19 -04:00
|
|
|
url = "git+file:./nix-secrets";
|
2024-05-16 20:08:57 -04:00
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
2024-06-28 16:06:23 -04:00
|
|
|
# Disko support https://github.com/nix-community/disko
|
|
|
|
disko = {
|
|
|
|
url = "github:nix-community/disko";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2024-05-07 18:02:59 -04:00
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
outputs =
|
|
|
|
inputs@{
|
|
|
|
self,
|
2024-06-28 16:06:23 -04:00
|
|
|
disko,
|
2024-06-24 11:38:28 -04:00
|
|
|
home-manager,
|
2024-05-07 18:02:59 -04:00
|
|
|
lanzaboote,
|
2024-06-24 11:38:28 -04:00
|
|
|
lix-module,
|
2024-05-07 18:02:59 -04:00
|
|
|
nix-flatpak,
|
|
|
|
nixos-hardware,
|
2024-06-24 11:38:28 -04:00
|
|
|
nixpkgs,
|
2024-05-16 20:08:57 -04:00
|
|
|
nix-secrets,
|
2024-05-07 18:02:59 -04:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
forAllSystems =
|
|
|
|
function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
# Define shared modules and imports
|
2024-05-16 20:08:57 -04:00
|
|
|
defaultModules = [
|
|
|
|
./modules/autoimport.nix
|
|
|
|
(import nix-secrets)
|
2024-06-28 16:06:23 -04:00
|
|
|
disko.nixosModules.disko
|
2024-05-16 20:08:57 -04:00
|
|
|
lix-module.nixosModules.default
|
|
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
2024-06-24 11:38:28 -04:00
|
|
|
_module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
2024-05-16 20:08:57 -04:00
|
|
|
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 18:02:59 -04:00
|
|
|
in
|
|
|
|
{
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
|
|
|
nixosConfigurations = {
|
2024-04-23 14:46:17 -04:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
Dimaga = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-16 20:08:57 -04:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 18:02:59 -04:00
|
|
|
nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
./hosts/Dimaga
|
|
|
|
];
|
|
|
|
};
|
2024-02-29 09:53:34 -05:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
Haven = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-16 20:08:57 -04:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 18:02:59 -04:00
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
2024-05-28 11:34:36 -04:00
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
2024-05-07 18:02:59 -04:00
|
|
|
./hosts/Haven
|
|
|
|
];
|
|
|
|
};
|
2024-04-10 15:25:22 -04:00
|
|
|
|
2024-05-07 18:02:59 -04:00
|
|
|
Khanda = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-16 20:08:57 -04:00
|
|
|
modules = defaultModules ++ [
|
2024-05-12 12:06:08 -04:00
|
|
|
nixos-hardware.nixosModules.microsoft-surface-pro-9
|
2024-05-07 18:02:59 -04:00
|
|
|
./hosts/Khanda
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Pihole = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
2024-05-16 20:08:57 -04:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 18:02:59 -04:00
|
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
|
|
|
./hosts/Pihole
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
Shura = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
2024-05-16 20:08:57 -04:00
|
|
|
modules = defaultModules ++ [
|
2024-05-07 18:02:59 -04:00
|
|
|
nixos-hardware.nixosModules.lenovo-legion-16arha7
|
|
|
|
./hosts/Shura
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|