Add hostConfig variable to store host information
This commit is contained in:
parent
9bc37a8d8c
commit
ba4ffd6bf1
5 changed files with 63 additions and 27 deletions
|
@ -18,6 +18,11 @@ in rec {
|
||||||
inherit stateVersion;
|
inherit stateVersion;
|
||||||
hostname = "mrmeeseeks";
|
hostname = "mrmeeseeks";
|
||||||
username = "ephase";
|
username = "ephase";
|
||||||
|
hostConfig = {
|
||||||
|
gaming = true;
|
||||||
|
desktop = true;
|
||||||
|
laptop = false;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/default.nix
|
./nixos/default.nix
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, hostConfig, ... }:
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
emojione
|
emojione
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{ ... }:
|
{ hostConfig, ... }:
|
||||||
{
|
let
|
||||||
|
cfg = hostConfig;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./sway.nix
|
./sway.nix
|
||||||
./mako.nix
|
./mako.nix
|
||||||
|
@ -7,5 +9,9 @@
|
||||||
./swaylock.nix
|
./swaylock.nix
|
||||||
./swayidle.nix
|
./swayidle.nix
|
||||||
./fuzzel.nix
|
./fuzzel.nix
|
||||||
];
|
] ++ (
|
||||||
|
if hostConfig.laptop then
|
||||||
|
[ ./kanshi.nix ]
|
||||||
|
else []
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{ config, pkgs, lib, stateVersion, hostname, username, ... }:
|
{ config, pkgs, lib, stateVersion, hostname, username, hostConfig, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[ # Include the results of the hardware scan.
|
||||||
|
@ -12,11 +11,28 @@
|
||||||
./includes/system/lvm.nix
|
./includes/system/lvm.nix
|
||||||
./includes/system/doas.nix
|
./includes/system/doas.nix
|
||||||
./includes/system/neovim.nix
|
./includes/system/neovim.nix
|
||||||
|
] ++ (
|
||||||
|
if hostConfig.desktop then
|
||||||
|
[
|
||||||
./includes/desktop/swaylock.nix
|
./includes/desktop/swaylock.nix
|
||||||
./includes/desktop/pipewire.nix
|
./includes/desktop/pipewire.nix
|
||||||
./includes/desktop/xdg-portal.nix
|
./includes/desktop/xdg-portal.nix
|
||||||
|
]
|
||||||
|
else []
|
||||||
|
) ++ (
|
||||||
|
if hostConfig.gaming then
|
||||||
|
[
|
||||||
./includes/gaming/steam.nix
|
./includes/gaming/steam.nix
|
||||||
];
|
]
|
||||||
|
else []
|
||||||
|
) ++ (
|
||||||
|
if hostConfig.laptop then
|
||||||
|
[
|
||||||
|
./includes/hardware/iwd.nix
|
||||||
|
]
|
||||||
|
else []
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
@ -41,6 +57,9 @@
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
useUserPackages = true;
|
useUserPackages = true;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit hostConfig;
|
||||||
|
};
|
||||||
users.${username} = {
|
users.${username} = {
|
||||||
home.stateVersion = stateVersion;
|
home.stateVersion = stateVersion;
|
||||||
programs.home-manager.enable = true;
|
programs.home-manager.enable = true;
|
||||||
|
@ -50,9 +69,12 @@
|
||||||
../modules/home/cli
|
../modules/home/cli
|
||||||
../modules/home/firefox
|
../modules/home/firefox
|
||||||
../modules/home/foot.nix
|
../modules/home/foot.nix
|
||||||
../modules/home/lutris.nix
|
|
||||||
../modules/home/zathura.nix
|
../modules/home/zathura.nix
|
||||||
];
|
] ++ (
|
||||||
|
if hostConfig.gaming then
|
||||||
|
[ ../modules/home/lutris.nix ]
|
||||||
|
else []
|
||||||
|
);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
3
nixos/includes/hardware/iwd.nix
Normal file
3
nixos/includes/hardware/iwd.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
networking.wireless.iwd.enable = true;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue