entirely vibed refactor
This commit is contained in:
parent
cea12431ff
commit
c343c52ab7
78 changed files with 884 additions and 1099 deletions
199
flake.nix
199
flake.nix
|
|
@ -23,128 +23,133 @@
|
|||
nix-minecraft.url = "github:Infinidoge/nix-minecraft";
|
||||
};
|
||||
|
||||
outputs = inputs @ { self, nixpkgs, nixpkgs-unstable, nur, nur-unstable, home-manager, stylix, nix-minecraft, ... }:
|
||||
outputs = inputs @ {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
nur,
|
||||
nur-unstable,
|
||||
home-manager,
|
||||
stylix,
|
||||
nix-minecraft,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
repoLocalPath = "/home/alisceon/.nixos_config";
|
||||
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
flake.setFlakeRegistry = true;
|
||||
overlays = [ nur.overlays.default ];
|
||||
};
|
||||
|
||||
pkgs-unstable = import nixpkgs-unstable {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
flake.setFlakeRegistry = true;
|
||||
overlays = [ nur-unstable.overlays.default ];
|
||||
};
|
||||
|
||||
sharedSpecialArgs = {
|
||||
inherit pkgs-unstable;
|
||||
inherit inputs;
|
||||
inherit inputs pkgs-unstable repoLocalPath;
|
||||
repoRoot = self;
|
||||
};
|
||||
|
||||
sharedModules = [
|
||||
./hosts/base.nix
|
||||
./nixos/modules/base.nix
|
||||
stylix.nixosModules.stylix
|
||||
home-manager.nixosModules.home-manager
|
||||
({ config, ...}: {
|
||||
({ ... }: {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit (config.networking) hostName;
|
||||
inherit pkgs pkgs-unstable;
|
||||
}; # end extraSpecialArgs
|
||||
inherit pkgs pkgs-unstable repoLocalPath;
|
||||
repoRoot = self;
|
||||
};
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}) # end home manager
|
||||
]; # end sharedModules
|
||||
})
|
||||
];
|
||||
|
||||
mkHost = {
|
||||
hostName,
|
||||
nixosModules ? [ ],
|
||||
hmModules ? [ ],
|
||||
extraModules ? [ ],
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system pkgs;
|
||||
specialArgs = sharedSpecialArgs;
|
||||
modules =
|
||||
sharedModules
|
||||
++ [ (./nixos/hosts + "/${hostName}/configuration.nix") ]
|
||||
++ nixosModules
|
||||
++ extraModules
|
||||
++ [
|
||||
{
|
||||
home-manager.users.alisceon.imports =
|
||||
[ ./home/profiles/base.nix ]
|
||||
++ hmModules;
|
||||
home-manager.users.root.imports = [
|
||||
./home/users/root/default.nix
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
workstationModules = [
|
||||
./nixos/modules/profiles/workstation.nix
|
||||
./nixos/modules/wm/sway.nix
|
||||
./nixos/modules/theme/stylix.nix
|
||||
];
|
||||
|
||||
workstationHomeModules = [
|
||||
./home/profiles/workstation.nix
|
||||
./home/modules/wm/sway/default.nix
|
||||
];
|
||||
|
||||
serverModules = [
|
||||
./nixos/modules/profiles/server.nix
|
||||
];
|
||||
|
||||
serverHomeModules = [
|
||||
./home/profiles/server.nix
|
||||
];
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
electra = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
specialArgs = sharedSpecialArgs // {};
|
||||
modules = sharedModules ++ [
|
||||
./hosts/hosts/electra.nix
|
||||
./hosts/workstation.nix
|
||||
./hosts/modules/wm/sway/default.nix
|
||||
./hosts/modules/stylix.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
({ config, ...}: {
|
||||
home-manager.users.alisceon.imports = [
|
||||
./home/alisceon/base.nix
|
||||
./home/alisceon/workstation.nix
|
||||
./home/wm/sway.nix
|
||||
./home/alisceon/hosts/electra.nix
|
||||
];
|
||||
home-manager.users.root.imports = [
|
||||
./home/root/base.nix
|
||||
];
|
||||
}) # end home-manager
|
||||
]; # end modules
|
||||
}; # end electra
|
||||
tower = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
specialArgs = sharedSpecialArgs // {};
|
||||
modules = sharedModules ++ [
|
||||
./hosts/hosts/tower.nix
|
||||
./hosts/workstation.nix
|
||||
./hosts/modules/wm/sway/default.nix
|
||||
./hosts/modules/stylix.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
({ config, ...}: {
|
||||
home-manager.users.alisceon.imports = [
|
||||
./home/alisceon/base.nix
|
||||
./home/alisceon/workstation.nix
|
||||
./home/wm/sway.nix
|
||||
./home/alisceon/hosts/tower.nix
|
||||
];
|
||||
home-manager.users.root.imports = [
|
||||
./home/root/base.nix
|
||||
];
|
||||
}) # end home-manager
|
||||
]; # end modules
|
||||
}; # end tower
|
||||
tesla-nixos = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
specialArgs = sharedSpecialArgs // {};
|
||||
modules = sharedModules ++ [
|
||||
./hosts/server.nix
|
||||
./hosts/hosts/tesla-nixos.nix
|
||||
electra = mkHost {
|
||||
hostName = "electra";
|
||||
nixosModules = workstationModules;
|
||||
hmModules = workstationHomeModules ++ [
|
||||
./home/hosts/alisceon/electra.nix
|
||||
];
|
||||
};
|
||||
|
||||
tower = mkHost {
|
||||
hostName = "tower";
|
||||
nixosModules = workstationModules;
|
||||
hmModules = workstationHomeModules ++ [
|
||||
./home/hosts/alisceon/tower.nix
|
||||
];
|
||||
};
|
||||
|
||||
tesla-nixos = mkHost {
|
||||
hostName = "tesla-nixos";
|
||||
nixosModules = serverModules;
|
||||
hmModules = serverHomeModules;
|
||||
extraModules = [
|
||||
nix-minecraft.nixosModules.minecraft-servers
|
||||
{ nixpkgs.overlays = [ inputs.nix-minecraft.overlay ]; }
|
||||
home-manager.nixosModules.home-manager
|
||||
({ config, ...}: {
|
||||
home-manager.users.alisceon.imports = [
|
||||
./home/alisceon/base.nix
|
||||
./home/alisceon/server.nix
|
||||
];
|
||||
home-manager.users.root.imports = [
|
||||
./home/root/base.nix
|
||||
];
|
||||
}) # end home-manager
|
||||
]; # end modules
|
||||
}; # end tesla-nixos
|
||||
nuc = nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
inherit pkgs;
|
||||
specialArgs = sharedSpecialArgs // {};
|
||||
modules = sharedModules ++ [
|
||||
./hosts/server.nix
|
||||
./hosts/hosts/nuc.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
({ config, ...}: {
|
||||
home-manager.users.alisceon.imports = [
|
||||
./home/alisceon/base.nix
|
||||
./home/alisceon/server.nix
|
||||
];
|
||||
home-manager.users.root.imports = [
|
||||
./home/root/base.nix
|
||||
];
|
||||
}) # end home-manager
|
||||
]; # end modules
|
||||
}; # end tesla-nixos
|
||||
}; # end nixos conf
|
||||
}; # end "in"
|
||||
} # end file
|
||||
];
|
||||
};
|
||||
|
||||
nuc = mkHost {
|
||||
hostName = "nuc";
|
||||
nixosModules = serverModules;
|
||||
hmModules = serverHomeModules;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue