Want to contribute? Fork me on Codeberg.org!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

148 lines
3.5 KiB

{ lib, inputs, nixpkgs, home-manager, user, configDir, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
};
lib = nixpkgs.lib;
configImports = [
inputs.apis.nixosModules.default
./configuration.nix
];
hmImports = [
(import ./home.nix)
inputs.nixvim.homeManagerModules.nixvim
];
desktopHmImports = hmImports ++ [
(import ./home-desktop.nix)
];
hmArgs = { inherit user configDir; };
in
{
desktop = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = configImports ++ [
./desktop
./desktop.nix
{
boot.loader.grub.gfxmodeEfi = "1920x1080";
networking.hostName = "${user}";
}
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
extraSpecialArgs = hmArgs;
users.${user} = {
imports = desktopHmImports ++ [
(import ./desktop/home.nix)
];
};
};
}
];
};
x220 = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = configImports ++ [
./thinkpads
./desktop.nix
{
# 1024x768 is the closest supported resolution to X220's native 1366x768
# To see a list of supported GRUB resolutions, enter GRUB,
# press e, F2 to enter command mode, and then type videoinfo to see list
boot.loader.grub.gfxmodeEfi = "1024x768";
networking.hostName = "x220";
}
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
extraSpecialArgs = hmArgs;
users.${user} = {
imports = desktopHmImports ++ [
(import ./thinkpads/home.nix)
];
};
};
}
];
};
t430 = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = configImports ++ [
./thinkpads
./desktop.nix
{
boot.loader.grub.gfxmodeEfi = "1600x900";
networking.hostName = "t430";
}
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
extraSpecialArgs = hmArgs;
users.${user} = {
imports = desktopHmImports ++ [
(import ./thinkpads/home.nix)
];
};
};
}
];
};
virtualbox = lib.nixosSystem {
inherit system;
specialArgs = { inherit user; };
modules = configImports ++ [
./virtualbox
./desktop.nix
{
networking.hostName = "virtualbox";
}
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
extraSpecialArgs = { inherit user; };
users.${user} = {
imports = desktopHmImports ++ [
(import ./virtualbox/home.nix)
];
};
};
}
];
};
elnudrop = lib.nixosSystem {
inherit system;
specialArgs = {
inherit user;
enableSSL = true;
};
modules = configImports ++ [
./elnudrop
{
networking.hostName = "elnudrop";
}
home-manager.nixosModules.home-manager {
home-manager = {
useUserPackages = true;
extraSpecialArgs = { inherit user; };
users.${user} = {
imports = hmImports ++ [
(import ./elnudrop/home.nix)
];
};
};
}
];
};
}