mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
nix: isolate vanadium configuration to a file
This commit is contained in:
parent
f837645c37
commit
038c6c0829
3 changed files with 145 additions and 106 deletions
|
|
@ -13,64 +13,8 @@ in {
|
|||
nixosConfigurations = {
|
||||
vanadium = inputs.nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {hostname = "vanadium";};
|
||||
modules = let
|
||||
hostname = "vanadium";
|
||||
system = "x86_64-linux";
|
||||
in [
|
||||
{nixpkgs.hostPlatform = system;}
|
||||
nixpkgsConfig
|
||||
|
||||
# nixos modules
|
||||
self.nixosModules.commonModules
|
||||
self.nixosModules.${"named-" + hostname}
|
||||
or (abort ''
|
||||
Expects a named NixOS module corresponding to the NixOS Configuration.
|
||||
What you are doing doesn't make sense.
|
||||
'')
|
||||
|
||||
# disko
|
||||
inputs.disko.nixosModules.default
|
||||
self.diskoConfigurations.${hostname} or {}
|
||||
|
||||
# user configuration
|
||||
self.nixosModules.leana
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
({
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs.hostname = hostname;
|
||||
sharedModules = [{home.stateVersion = lib.mkDefault config.system.stateVersion;}];
|
||||
users.leana.imports = [
|
||||
self.homeModules.commonModules
|
||||
self.homeModules.${"named-" + hostname}
|
||||
or (
|
||||
builtins.trace "No named home-manager configuration supplied for named system config `${hostname}', defaulting to common modules."
|
||||
{}
|
||||
)
|
||||
];
|
||||
};
|
||||
})
|
||||
|
||||
###
|
||||
### The used to be per-host part
|
||||
###
|
||||
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
|
||||
|
||||
self.nixosModules.layouts
|
||||
self.nixosModules.zram
|
||||
{
|
||||
home-manager.users.leana.imports = [
|
||||
self.homeModules.preset-fancy
|
||||
self.homeModules.preset-nix
|
||||
|
||||
self.homeModules.neovim-moreLangServers
|
||||
];
|
||||
}
|
||||
modules = [
|
||||
(import ../nixosModules/named/vanadium inputs)
|
||||
];
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue