refactor: centralize host and user metadata
This commit is contained in:
@@ -5,59 +5,42 @@
|
||||
}:
|
||||
let
|
||||
nixosModules = config.flake.modules.nixos;
|
||||
homeModules = config.flake.modules.homeManager;
|
||||
metaLib = config.meta.lib;
|
||||
in
|
||||
{
|
||||
flake.modules.nixos.zenith =
|
||||
{ ... }:
|
||||
{
|
||||
_module.args.hostType = "laptop";
|
||||
flake.modules.nixos.zenith = metaLib.mkHost {
|
||||
name = "zenith";
|
||||
kind = "workstation";
|
||||
traits = [ "portable" ];
|
||||
|
||||
imports = [
|
||||
nixosModules.desktopBase
|
||||
nixosModules.kiri
|
||||
nixosModules.ergon
|
||||
./_hardware.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7-amdgpu
|
||||
];
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
|
||||
networking.hostName = "zenith";
|
||||
|
||||
home-manager.users.kiri.imports = with homeModules; [
|
||||
nix
|
||||
bitwarden
|
||||
email
|
||||
pim
|
||||
mpv
|
||||
niri
|
||||
clipboard
|
||||
localApps
|
||||
qbittorrentClient
|
||||
vicinae
|
||||
xdg
|
||||
theme
|
||||
noctalia
|
||||
];
|
||||
|
||||
home-manager.users.kiri.programs.niri.settings.outputs = {
|
||||
"California Institute of Technology 0x1410 Unknown" = {
|
||||
"focus-at-startup" = true;
|
||||
position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
};
|
||||
scale = 1.5;
|
||||
mode = {
|
||||
width = 3072;
|
||||
height = 1920;
|
||||
refresh = 120.002;
|
||||
};
|
||||
displays = {
|
||||
"California Institute of Technology 0x1410 Unknown" = {
|
||||
primary = true;
|
||||
x = 0;
|
||||
y = 0;
|
||||
scale = 1.5;
|
||||
mode = {
|
||||
width = 3072;
|
||||
height = 1920;
|
||||
refresh = 120.002;
|
||||
};
|
||||
};
|
||||
|
||||
hardware.enableRedistributableFirmware = true;
|
||||
services.fwupd.enable = true;
|
||||
};
|
||||
|
||||
users = {
|
||||
inherit (metaLib.users)
|
||||
ergon
|
||||
kiri
|
||||
;
|
||||
};
|
||||
|
||||
imports = [
|
||||
nixosModules."workstation-base"
|
||||
nixosModules."portable-host"
|
||||
nixosModules."user-kiri"
|
||||
nixosModules."user-ergon"
|
||||
./_hardware.nix
|
||||
inputs.nixos-hardware.nixosModules.lenovo-yoga-7-14ARH7-amdgpu
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user