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,
jovian,
...
}: {
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 {
}: let
system = "x86_64-linux";
config.allowUnfree = true;
};
};
};
dustin = home-manager.lib.homeManagerConfiguration rec {
pkgs = import nixpkgs {system = "x86_64-linux";};
modules = [./dustin.nix];
extraSpecialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable {
system = "x86_64-linux";
config.allowUnfree = true;
};
};
};
};
nixosConfigurations = {
# Steam Deck OLED
mossdeep = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
nixosModules = [
disko.nixosModules.disko
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = {inherit inputs unstable;};
home-manager.sharedModules = [{imports = [./homeManagerModules];}];
home-manager.backupFileExtension = "backup";
}
./nixosModules
];
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
modules = [
disko.nixosModules.disko
specialArgs = {inherit inputs unstable;};
in {
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
nixos-hardware.nixosModules.common-pc-laptop-ssd
home-manager.nixosModules.home-manager
./hosts/mossdeep
./nixosModules
];
};
# Framework 13 with AMD Ryzen 7640U and 32GB RAM.
lavaridge = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
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
inherit system specialArgs;
modules =
nixosModules
++ [
./hosts/lavaridge
./nixosModules
nixos-hardware.nixosModules.framework-13-7040-amd
];
};
# Framework 13 with 11th Gen Intel Core i5 and 16GB RAM.
fallarbor = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
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
inherit system specialArgs;
modules =
nixosModules
++ [
./hosts/fallarbor
./nixosModules
nixos-hardware.nixosModules.framework-11th-gen-intel
];
};
# Home Lab. Ryzen 5 2600 with 16GB RAM, RX 6700.
mauville = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
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
inherit system specialArgs;
modules =
nixosModules
++ [
./hosts/mauville
./nixosModules
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-pc-ssd
];
};
# Lenovo Yoga 9i with i7-1360P and 16GB RAM.
petalburg = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
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
inherit system specialArgs;
modules =
nixosModules
++ [
./hosts/petalburg
./nixosModules
nixos-hardware.nixosModules.common-cpu-intel
nixos-hardware.nixosModules.common-pc-laptop-ssd
];
};
# T440p with i5-4210M and 16GB RAM.
rustboro = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = {
inherit inputs;
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
modules = [
disko.nixosModules.disko
inherit system specialArgs;
modules =
nixosModules
++ [
./hosts/rustboro
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 = {
sharedModules = [
{
imports = [../../homeManagerModules];
alyraffauf.services.easyeffects = {
enable = true;
preset = "framework13";

View file

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

View file

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

View file

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