start making modules as actual modules, wip no battery left

This commit is contained in:
2025-02-09 04:57:29 +01:00
parent a2037ffb56
commit 5363e26357
6 changed files with 59 additions and 22 deletions

View File

@ -1,16 +1,16 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# configuration.nix :+: :+: :+: #
# global.nix :+: :+: :+: #
# +:+ +:+ +:+ #
# By: tomoron <tomoron@student.42angouleme.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2025/02/09 01:43:46 by tomoron #+# #+# #
# Updated: 2025/02/09 01:50:15 by tomoron ### ########.fr #
# Updated: 2025/02/09 03:04:10 by tomoron ### ########.fr #
# #
# **************************************************************************** #
{ config, lib, inputs, pkgs, flakeName, ... }:
{ lib, pkgs, flakeName, ... }:
{
imports = [

View File

@ -6,6 +6,7 @@
../modules/nvidia.nix
../modules/vboxHost.nix
];
boot.kernelParams = [ "kvm.enable_virt_at_load=0" ];
# systemd.tmpfiles.rules = [
# "f /dev/shm/looking-glass 0660 tom libvirtd -"

View File

@ -1,10 +1,14 @@
{ config, lib, inputs, pkgs, ... }:
{config, lib, ... }:
{
options.mods.gayming.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable games on the host";
};
config = lib.mkIf config.mods.gayming.enable {
programs.steam.enable = true;
programs.steam.protontricks.enable = true;
# environment.systemPackages = with pkgs; [ qemu quickemu];
# programs.virt-manager.enable = true;
# virtualisation.libvirtd.enable = true;
};
}

View File

@ -2,10 +2,19 @@
{ config, lib, inputs, pkgs, ... }:
{
options.mods.nvidia-graphics.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable my nvidia graphics settings";
};
config = lib.mkIf config.mods.nvidia-graphics.enable {
hardware.graphics = {
enable = true;
enable32Bit = true;
};
services.xserver.videoDrivers = ["nvidia"];
};
}

View File

@ -1,6 +1,14 @@
{ config, lib, inputs, pkgs, ... }:
{
options.mods.virtualbox.enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable virtualbox as host";
};
config = lib.mkIf config.mods.virtualbox.enable {
virtualisation.virtualbox.host.enable = true;
users.users.tom.extraGroups = [ "vboxusers" ];
};
}

View File

@ -1,6 +1,20 @@
{ config, lib, inputs, pkgs, ... }:
{
options.mods.yubikey = {
enable = lib.mkOption {
type = lib.types.bool;
default = true;
description = "enable yubikey";
};
id = lib.mkOption {
type = lib.str;
description = "yubikey id";
};
};
config = lib.mkIf config.mods.yubikey.enable {
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
@ -8,7 +22,8 @@
security.pam.yubico = {
enable = true;
id = "30536547";
id = config.mods.yubikey.id;
mode = "challenge-response";
};
};
}