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
55
flake.nix
55
flake.nix
|
|
@ -43,56 +43,42 @@
|
||||||
self,
|
self,
|
||||||
unstable,
|
unstable,
|
||||||
flake-utils,
|
flake-utils,
|
||||||
nvim-flake,
|
|
||||||
nixos-generators,
|
nixos-generators,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
{
|
lib = unstable.lib;
|
||||||
nixosConfigurations = {
|
mkSystems = system: names:
|
||||||
gerg-desktop = unstable.lib.nixosSystem {
|
lib.genAttrs names (
|
||||||
system = "x86_64-linux";
|
name:
|
||||||
|
lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit self;
|
inherit self;
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
(import ./modules inputs)
|
(import ./modules inputs)
|
||||||
(import ./systems/gerg-desktop inputs)
|
(import ./systems + name inputs)
|
||||||
{
|
|
||||||
nixpkgs.overlays = [
|
|
||||||
nvim-flake.overlays.default
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
);
|
||||||
|
in
|
||||||
|
{
|
||||||
|
nixosConfigurations =
|
||||||
|
mkSystems
|
||||||
|
"x86_64-linux"
|
||||||
|
[
|
||||||
|
"gerg-desktop"
|
||||||
|
"game-laptop"
|
||||||
|
"moms-laptop"
|
||||||
];
|
];
|
||||||
};
|
|
||||||
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)
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
// flake-utils.lib.eachDefaultSystem (
|
// flake-utils.lib.eachDefaultSystem (
|
||||||
system: let
|
system: let
|
||||||
pkgs = import unstable {inherit system;};
|
pkgs = import unstable {inherit system;};
|
||||||
in {
|
in {
|
||||||
formatter = pkgs.alejandra;
|
formatter = pkgs.alejandra;
|
||||||
devShells = rec {
|
devShells = {
|
||||||
nix = pkgs.mkShell {
|
default = pkgs.mkShell {
|
||||||
packages = [
|
packages = [
|
||||||
pkgs.sops
|
pkgs.sops
|
||||||
pkgs.nil
|
pkgs.nil
|
||||||
|
|
@ -101,7 +87,6 @@
|
||||||
pkgs.statix
|
pkgs.statix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
default = nix;
|
|
||||||
};
|
};
|
||||||
packages =
|
packages =
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,10 @@ inputs: {
|
||||||
"steam-original"
|
"steam-original"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
inputs.nvim-flake.overlays.default
|
||||||
|
];
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
pkgs.bitwarden #store stuff
|
pkgs.bitwarden #store stuff
|
||||||
pkgs.qbittorrent #steal stuff
|
pkgs.qbittorrent #steal stuff
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue