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

184
flake.nix
View file

@ -51,149 +51,97 @@
disko, disko,
jovian, jovian,
... ...
}: { }: let
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra; system = "x86_64-linux";
homeConfigurations = { nixosModules = [
aly = home-manager.lib.homeManagerConfiguration rec { disko.nixosModules.disko
pkgs = import nixpkgs {system = "x86_64-linux";}; home-manager.nixosModules.home-manager
modules = [./aly.nix]; {
extraSpecialArgs = { home-manager.useGlobalPkgs = true;
inherit inputs; home-manager.useUserPackages = true;
unstable = import nixpkgs-unstable { home-manager.extraSpecialArgs = {inherit inputs unstable;};
system = "x86_64-linux"; home-manager.sharedModules = [{imports = [./homeManagerModules];}];
config.allowUnfree = true; home-manager.backupFileExtension = "backup";
}; }
}; ./nixosModules
}; ];
dustin = home-manager.lib.homeManagerConfiguration rec { unstable = import nixpkgs-unstable {
pkgs = import nixpkgs {system = "x86_64-linux";}; inherit system;
modules = [./dustin.nix]; config.allowUnfree = true;
extraSpecialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
};
}; };
specialArgs = {inherit inputs unstable;};
in {
formatter.${system} = nixpkgs.legacyPackages.${system}.alejandra;
nixosConfigurations = { nixosConfigurations = {
# Steam Deck OLED # Steam Deck OLED
mossdeep = nixpkgs.lib.nixosSystem rec { mossdeep = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux"; inherit system specialArgs;
specialArgs = { modules =
inherit inputs; nixosModules
unstable = import nixpkgs-unstable { ++ [
inherit system; ./hosts/mossdeep
config.allowUnfree = true; jovian.nixosModules.default
}; nixos-hardware.nixosModules.common-pc-laptop-ssd
}; ];
modules = [
disko.nixosModules.disko
jovian.nixosModules.default
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; ./hosts/lavaridge
config.allowUnfree = true; nixos-hardware.nixosModules.framework-13-7040-amd
}; ];
};
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.framework-13-7040-amd
home-manager.nixosModules.home-manager
./hosts/lavaridge
./nixosModules
];
}; };
# 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; ./hosts/fallarbor
config.allowUnfree = true; nixos-hardware.nixosModules.framework-11th-gen-intel
}; ];
};
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.framework-11th-gen-intel
home-manager.nixosModules.home-manager
./hosts/fallarbor
./nixosModules
];
}; };
# 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; ./hosts/mauville
config.allowUnfree = true; nixos-hardware.nixosModules.common-cpu-amd
}; nixos-hardware.nixosModules.common-pc-ssd
}; ];
modules = [
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-cpu-amd
home-manager.nixosModules.home-manager
./hosts/mauville
./nixosModules
];
}; };
# 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; ./hosts/petalburg
config.allowUnfree = true; nixos-hardware.nixosModules.common-cpu-intel
}; nixos-hardware.nixosModules.common-pc-laptop-ssd
}; ];
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.common-pc-laptop-ssd
nixos-hardware.nixosModules.common-cpu-intel
home-manager.nixosModules.home-manager
./hosts/petalburg
./nixosModules
];
}; };
# 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; nixos-hardware.nixosModules.common-pc-laptop-ssd
}; nixos-hardware.nixosModules.lenovo-thinkpad-t440p
}; ];
modules = [
disko.nixosModules.disko
nixos-hardware.nixosModules.common-pc-laptop-ssd
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"