nixos/machines/configurations.nix

81 lines
2 KiB
Nix
Raw Normal View History

2022-06-27 22:43:23 +02:00
{ self, ... }:
let
2024-07-28 21:08:02 +02:00
inherit (self.inputs)
2022-06-27 22:43:23 +02:00
nixpkgs
nixpkgs-unstable
sops-nix
nixos-hardware
passworts
2023-09-02 17:42:43 +02:00
disko
2022-06-27 22:43:23 +02:00
;
nixosSystem = nixpkgs.lib.makeOverridable nixpkgs.lib.nixosSystem;
2023-11-07 22:00:00 +01:00
overlay-unstable = final: _prev: {
unstable = import nixpkgs-unstable {
inherit (final) system;
config.allowUnfree = true;
};
};
2022-06-27 22:43:23 +02:00
2022-12-05 20:32:39 +01:00
customModules = import ./core/default.nix;
baseModules = [
# make flake inputs accessible in NixOS
{
_module.args.self = self;
2022-06-27 22:43:23 +02:00
_module.args.inputs = self.inputs;
}
{
imports = [
2024-07-28 21:08:02 +02:00
(
{ pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
overlay-unstable
(import ../overlays)
(import ../pkgs)
];
nix.nixPath = [ "nixpkgs=${pkgs.path}" ];
documentation.info.enable = false;
}
)
2023-09-02 17:42:43 +02:00
disko.nixosModules.disko
passworts.nixosModules.passworts
2023-09-02 17:42:43 +02:00
sops-nix.nixosModules.sops
];
}
../modules
2023-01-22 17:18:37 +01:00
../profiles
];
defaultModules = baseModules ++ customModules;
in
{
2022-06-27 22:43:23 +02:00
flake.nixosConfigurations = {
# use your hardware- model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix
thinkman = nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
nixos-hardware.nixosModules.lenovo-thinkpad-t14
./thinkman/configuration.nix
];
};
2025-05-04 20:20:28 +02:00
workman = nixosSystem {
system = "x86_64-linux";
modules = defaultModules ++ [
nixos-hardware.nixosModules.framework-amd-ai-300-series
./workman/configuration.nix
];
};
2022-06-27 22:43:23 +02:00
newton = nixosSystem {
system = "x86_64-linux";
2024-07-28 21:08:02 +02:00
modules = defaultModules ++ [ ./newton/configuration.nix ];
2022-06-27 22:43:23 +02:00
};
serverle = nixosSystem {
system = "aarch64-linux";
modules = defaultModules ++ [
nixos-hardware.nixosModules.raspberry-pi-4
./serverle/configuration.nix
];
};
2022-06-09 23:20:17 +02:00
};
}