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-06-24 15:38:28 +00:00
|
|
|
# Import the desired Nix channel. Defaults to unstable, which uses a fully tested rolling release model.
|
2024-11-15 21:16:22 +00:00
|
|
|
# You can find a list of channels at https://wiki.nixos.org/wiki/Channel_branches
|
2024-06-24 15:38:28 +00:00
|
|
|
# To follow a different channel, replace `nixos-unstable` with the channel name, e.g. `nixos-24.05`.
|
2024-07-26 13:52:37 +00:00
|
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
|
2024-08-05 13:49:07 +00:00
|
|
|
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
2024-05-06 12:38:54 +00:00
|
|
|
|
2024-09-28 15:55:36 +00:00
|
|
|
# Repository for Gnome triple buffering patch
|
|
|
|
# For details, see https://wiki.nixos.org/wiki/GNOME#Dynamic_triple_buffering
|
|
|
|
gnome-triplebuffering = {
|
|
|
|
url = "gitlab:vanvugt/mutter/triple-buffering-v4-46?host=gitlab.gnome.org";
|
|
|
|
flake = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
# Home-manager support
|
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager/release-24.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
# SecureBoot support
|
|
|
|
lanzaboote.url = "github:nix-community/lanzaboote/v0.4.1";
|
|
|
|
|
|
|
|
# Aux lib
|
|
|
|
lib.url = "https://git.auxolotl.org/auxolotl/labs/archive/main.tar.gz?dir=lib";
|
|
|
|
|
2024-06-24 15:38:28 +00: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 22:02:59 +00:00
|
|
|
lix-module = {
|
2024-08-19 19:24:43 +00:00
|
|
|
url = "git+https://git.lix.systems/lix-project/nixos-module?ref=release-2.91";
|
2024-05-07 22:02:59 +00:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
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-06-24 15:38:28 +00:00
|
|
|
# NixOS hardware quirks
|
2024-11-05 18:10:51 +00:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
2024-05-07 22:02:59 +00:00
|
|
|
};
|
2024-02-29 14:53:34 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
outputs =
|
|
|
|
inputs@{
|
2024-06-24 15:38:28 +00:00
|
|
|
home-manager,
|
2024-05-07 22:02:59 +00:00
|
|
|
lanzaboote,
|
2024-06-24 15:38:28 +00:00
|
|
|
lix-module,
|
2024-05-07 22:02:59 +00:00
|
|
|
nix-flatpak,
|
|
|
|
nixos-hardware,
|
2024-06-24 15:38:28 +00:00
|
|
|
nixpkgs,
|
2024-05-07 22:02:59 +00:00
|
|
|
...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
forAllSystems =
|
|
|
|
function:
|
|
|
|
nixpkgs.lib.genAttrs [
|
|
|
|
"x86_64-linux"
|
|
|
|
"aarch64-linux"
|
|
|
|
] (system: function nixpkgs.legacyPackages.${system});
|
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 = [
|
|
|
|
./modules/autoimport.nix
|
|
|
|
lix-module.nixosModules.default
|
|
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
nix-flatpak.nixosModules.nix-flatpak
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
2024-06-24 15:38:28 +00:00
|
|
|
_module.args = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
2024-05-17 00:08:57 +00: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 22:02:59 +00:00
|
|
|
in
|
|
|
|
{
|
|
|
|
formatter = forAllSystems (pkgs: pkgs.nixfmt-rfc-style);
|
2024-08-23 18:15:54 +00:00
|
|
|
|
2024-05-07 22:02:59 +00:00
|
|
|
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-09-04 14:39:03 +00:00
|
|
|
Hevana = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = defaultModules ++ [
|
|
|
|
nixos-hardware.nixosModules.common-cpu-amd-pstate
|
|
|
|
nixos-hardware.nixosModules.common-gpu-amd
|
|
|
|
./hosts/Hevana
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
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-08-21 21:05:55 +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
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|