mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
nixosConfigurations abstraction
This commit is contained in:
parent
4f9c434347
commit
a37cdcab5d
2 changed files with 31 additions and 42 deletions
69
flake.nix
69
flake.nix
|
|
@ -43,56 +43,42 @@
|
|||
self,
|
||||
unstable,
|
||||
flake-utils,
|
||||
nvim-flake,
|
||||
nixos-generators,
|
||||
...
|
||||
}:
|
||||
}: let
|
||||
lib = unstable.lib;
|
||||
mkSystems = system: names:
|
||||
lib.genAttrs names (
|
||||
name:
|
||||
lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
};
|
||||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./systems + name inputs)
|
||||
];
|
||||
}
|
||||
);
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
gerg-desktop = unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
};
|
||||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./systems/gerg-desktop inputs)
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
nvim-flake.overlays.default
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
game-laptop = unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
};
|
||||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./systems/game-laptop inputs)
|
||||
];
|
||||
};
|
||||
moms-laptop = unstable.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit self;
|
||||
};
|
||||
modules = [
|
||||
(import ./modules inputs)
|
||||
(import ./systems/moms-laptop inputs)
|
||||
];
|
||||
};
|
||||
};
|
||||
nixosConfigurations =
|
||||
mkSystems
|
||||
"x86_64-linux"
|
||||
[
|
||||
"gerg-desktop"
|
||||
"game-laptop"
|
||||
"moms-laptop"
|
||||
];
|
||||
}
|
||||
// flake-utils.lib.eachDefaultSystem (
|
||||
system: let
|
||||
pkgs = import unstable {inherit system;};
|
||||
in {
|
||||
formatter = pkgs.alejandra;
|
||||
devShells = rec {
|
||||
nix = pkgs.mkShell {
|
||||
devShells = {
|
||||
default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.sops
|
||||
pkgs.nil
|
||||
|
|
@ -101,7 +87,6 @@
|
|||
pkgs.statix
|
||||
];
|
||||
};
|
||||
default = nix;
|
||||
};
|
||||
packages =
|
||||
{
|
||||
|
|
|
|||
|
|
@ -45,6 +45,10 @@ inputs: {
|
|||
"steam-original"
|
||||
];
|
||||
|
||||
nixpkgs.overlays = [
|
||||
inputs.nvim-flake.overlays.default
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.bitwarden #store stuff
|
||||
pkgs.qbittorrent #steal stuff
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue