100 lines
2.4 KiB
Nix
100 lines
2.4 KiB
Nix
{ config, pkgs, lib, stateVersion, hostname, username, hostConfig, ... }:
|
|
{
|
|
imports =
|
|
[ # Include the results of the hardware scan.
|
|
../hosts/${hostname}/hardware-configuration.nix
|
|
./includes/hardware/bootloader.nix
|
|
./includes/system/locales.nix
|
|
./includes/system/flakes.nix
|
|
./includes/system/user.nix
|
|
./includes/system/udisks2.nix
|
|
./includes/system/lvm.nix
|
|
./includes/system/doas.nix
|
|
./includes/system/neovim.nix
|
|
./includes/system/overlay.nix
|
|
] ++ (
|
|
if hostConfig.desktop then
|
|
[
|
|
./includes/desktop/swaylock.nix
|
|
./includes/desktop/pipewire.nix
|
|
./includes/desktop/xdg-portal.nix
|
|
]
|
|
else []
|
|
) ++ (
|
|
if hostConfig.gaming then
|
|
[
|
|
./includes/gaming/steam.nix
|
|
]
|
|
else []
|
|
) ++ (
|
|
if hostConfig.laptop then
|
|
[
|
|
./includes/hardware/iwd.nix
|
|
./includes/hardware/cpufreq.nix
|
|
]
|
|
else []
|
|
);
|
|
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
|
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
networking.hostName = hostname;
|
|
|
|
console = {
|
|
earlySetup = true;
|
|
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz";
|
|
packages = with pkgs; [terminus_font];
|
|
# keyMap = "us";
|
|
useXkbConfig = true; # use xkbOptions in tty.
|
|
};
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
git
|
|
zsh
|
|
];
|
|
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
extraSpecialArgs = {
|
|
inherit hostConfig;
|
|
inherit hostname;
|
|
};
|
|
users.${username} = {
|
|
home.stateVersion = stateVersion;
|
|
programs.home-manager.enable = true;
|
|
|
|
home.sessionPath = [
|
|
"$HOME/.local/bin"
|
|
];
|
|
|
|
imports = [
|
|
../hosts/${hostname}/home.nix
|
|
../home-manager/cli
|
|
../home-manager/kdenlive/default.nix
|
|
] ++ (if hostConfig.desktop then
|
|
[
|
|
../home-manager/desktop
|
|
../home-manager/webcord.nix
|
|
../home-manager/firefox
|
|
../home-manager/foot.nix
|
|
../home-manager/zathura.nix
|
|
../home-manager/imv.nix
|
|
../home-manager/mpv
|
|
]
|
|
else []
|
|
) ++ (
|
|
if hostConfig.gaming then
|
|
[ ../home-manager/lutris.nix ]
|
|
else []
|
|
) ++ lib.optional (
|
|
builtins.pathExists ../home-manager/hosts/${hostname}.nix
|
|
) ../home-manager/hosts/${hostname}.nix;
|
|
};
|
|
};
|
|
|
|
system.stateVersion = stateVersion;
|
|
}
|