rebuilt flake.nix for better codereuse and defaults

This commit is contained in:
Aly Raffauf 2024-05-23 22:21:53 -04:00
parent 9f2358d529
commit fcc8f9980e
5 changed files with 66 additions and 128 deletions

156
flake.nix
View file

@ -51,148 +51,96 @@
disko, disko,
jovian, jovian,
... ...
}: { }: let
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
homeConfigurations = {
aly = home-manager.lib.homeManagerConfiguration rec {
pkgs = import nixpkgs {system = "x86_64-linux";};
modules = [./aly.nix];
extraSpecialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable {
system = "x86_64-linux"; system = "x86_64-linux";
config.allowUnfree = true; nixosModules = [
}; disko.nixosModules.disko
}; home-manager.nixosModules.home-manager
}; {
dustin = home-manager.lib.homeManagerConfiguration rec { home-manager.useGlobalPkgs = true;
pkgs = import nixpkgs {system = "x86_64-linux";}; home-manager.useUserPackages = true;
modules = [./dustin.nix]; home-manager.extraSpecialArgs = {inherit inputs unstable;};
extraSpecialArgs = { home-manager.sharedModules = [{imports = [./homeManagerModules];}];
inherit inputs; home-manager.backupFileExtension = "backup";
unstable = import nixpkgs-unstable { }
system = "x86_64-linux"; ./nixosModules
config.allowUnfree = true; ];
};
};
};
};
nixosConfigurations = {
# Steam Deck OLED
mossdeep = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable { unstable = import nixpkgs-unstable {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = true;
}; };
}; specialArgs = {inherit inputs unstable;};
modules = [ in {
disko.nixosModules.disko formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
nixosConfigurations = {
# Steam Deck OLED
mossdeep = nixpkgs.lib.nixosSystem rec {
inherit system specialArgs;
modules =
nixosModules
++ [
./hosts/mossdeep
jovian.nixosModules.default jovian.nixosModules.default
nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.common-pc-laptop-ssd
home-manager.nixosModules.home-manager
./hosts/mossdeep
./nixosModules
]; ];
}; };
# Framework 13 with AMD Ryzen 7640U and 32GB RAM. # Framework 13 with AMD Ryzen 7640U and 32GB RAM.
lavaridge = nixpkgs.lib.nixosSystem rec { lavaridge = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system specialArgs;
specialArgs = { modules =
inherit inputs; nixosModules
unstable = import nixpkgs-unstable { ++ [
inherit system;
config.allowUnfree = true;
};
};
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.framework-13-7040-amd
home-manager.nixosModules.home-manager
./hosts/lavaridge ./hosts/lavaridge
./nixosModules nixos-hardware.nixosModules.framework-13-7040-amd
]; ];
}; };
# Framework 13 with 11th Gen Intel Core i5 and 16GB RAM. # Framework 13 with 11th Gen Intel Core i5 and 16GB RAM.
fallarbor = nixpkgs.lib.nixosSystem rec { fallarbor = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system specialArgs;
specialArgs = { modules =
inherit inputs; nixosModules
unstable = import nixpkgs-unstable { ++ [
inherit system;
config.allowUnfree = true;
};
};
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.framework-11th-gen-intel
home-manager.nixosModules.home-manager
./hosts/fallarbor ./hosts/fallarbor
./nixosModules nixos-hardware.nixosModules.framework-11th-gen-intel
]; ];
}; };
# Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700. # Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700.
mauville = nixpkgs.lib.nixosSystem rec { mauville = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system specialArgs;
specialArgs = { modules =
inherit inputs; nixosModules
unstable = import nixpkgs-unstable { ++ [
inherit system;
config.allowUnfree = true;
};
};
modules = [
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-cpu-amd
home-manager.nixosModules.home-manager
./hosts/mauville ./hosts/mauville
./nixosModules nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-pc-ssd
]; ];
}; };
# Lenovo Yoga 9i with i7-1360P and 16GB RAM. # Lenovo Yoga 9i with i7-1360P and 16GB RAM.
petalburg = nixpkgs.lib.nixosSystem rec { petalburg = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system specialArgs;
specialArgs = { modules =
inherit inputs; nixosModules
unstable = import nixpkgs-unstable { ++ [
inherit system;
config.allowUnfree = true;
};
};
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.common-cpu-intel
home-manager.nixosModules.home-manager
./hosts/petalburg ./hosts/petalburg
./nixosModules nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop-ssd
]; ];
}; };
# T440p with i5-4210M and 16GB RAM. # T440p with i5-4210M and 16GB RAM.
rustboro = nixpkgs.lib.nixosSystem rec { rustboro = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system specialArgs;
specialArgs = { modules =
inherit inputs; nixosModules
unstable = import nixpkgs-unstable { ++ [
inherit system; ./hosts/rustboro
config.allowUnfree = true;
};
};
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.common-pc-laptop-ssd nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.lenovo-thinkpad-t440p nixos-hardware.nixosModules.lenovo-thinkpad-t440p
home-manager.nixosModules.home-manager
./hosts/rustboro
./nixosModules
]; ];
}; };
}; };

View file

@ -8,7 +8,6 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
imports = [../../homeManagerModules];
alyraffauf.services.easyeffects = { alyraffauf.services.easyeffects = {
enable = true; enable = true;
preset = "framework13"; preset = "framework13";

View file

@ -8,7 +8,6 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
imports = [../../homeManagerModules];
xdg.userDirs.music = "/mnt/Media/Music"; xdg.userDirs.music = "/mnt/Media/Music";
alyraffauf.desktop.hyprland.autoSuspend = false; alyraffauf.desktop.hyprland.autoSuspend = false;
alyraffauf.desktop.sway.autoSuspend = false; alyraffauf.desktop.sway.autoSuspend = false;

View file

@ -8,7 +8,6 @@
home-manager = { home-manager = {
sharedModules = [ sharedModules = [
{ {
imports = [../../homeManagerModules];
alyraffauf.services.easyeffects = { alyraffauf.services.easyeffects = {
enable = true; enable = true;
preset = "LoudnessEqualizer"; preset = "LoudnessEqualizer";

View file

@ -8,13 +8,6 @@
}: { }: {
imports = [./aly ./dustin]; imports = [./aly ./dustin];
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = {inherit inputs; inherit unstable;};
backupFileExtension = "backup";
};
users.mutableUsers = false; users.mutableUsers = false;
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBK+QkM3C98BxnJtcEOuxjT7bbUG8gsUafrzW9uKuxz aly@petalburg" "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJBK+QkM3C98BxnJtcEOuxjT7bbUG8gsUafrzW9uKuxz aly@petalburg"