updated options structure
This commit is contained in:
parent
d2aa848f1f
commit
8e3d589698
6 changed files with 110 additions and 102 deletions
|
@ -1,6 +1,7 @@
|
||||||
{ config, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-config.nix
|
./hardware-config.nix
|
||||||
|
./nvidia.nix
|
||||||
./options.nix
|
./options.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -28,18 +29,6 @@
|
||||||
driSupport32Bit = true;
|
driSupport32Bit = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Load nvidia driver
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
|
||||||
|
|
||||||
hardware.nvidia = {
|
|
||||||
modesetting.enable = true;
|
|
||||||
powerManagement.enable = false;
|
|
||||||
powerManagement.finegrained = false;
|
|
||||||
open = false;
|
|
||||||
nvidiaSettings = false;
|
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.bluetooth = {
|
hardware.bluetooth = {
|
||||||
enable = true;
|
enable = true;
|
||||||
powerOnBoot = true;
|
powerOnBoot = true;
|
||||||
|
|
14
devices/desktop/nvidia.nix
Normal file
14
devices/desktop/nvidia.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{ config, ... }: {
|
||||||
|
# Load nvidia driver
|
||||||
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
|
|
||||||
|
hardware.nvidia = {
|
||||||
|
modesetting.enable = true;
|
||||||
|
powerManagement.enable = false;
|
||||||
|
powerManagement.finegrained = false;
|
||||||
|
open = false;
|
||||||
|
nvidiaSettings = false;
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
|
@ -1,7 +1,8 @@
|
||||||
{ ... }: {
|
{ ... }: {
|
||||||
withNiri = false;
|
withNiri = false;
|
||||||
withGnome = true;
|
withGnome = true;
|
||||||
|
withNvidia = true;
|
||||||
withVM = false;
|
withVM = false;
|
||||||
withDistrobox = false;
|
withDistrobox = true;
|
||||||
withGames = false;
|
withGames = false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,15 +2,7 @@
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
# your system. Help is available in the configuration.nix(5) man page
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ pkgs, lib, ... }: {
|
{ pkgs, ... }: {
|
||||||
options = {
|
|
||||||
withNiri = with lib; mkEnableOption "Enable Niri";
|
|
||||||
withGnome = with lib; mkEnableOption "Enable Gnome";
|
|
||||||
withVM = with lib; mkEnableOption "Enable VM related configuration";
|
|
||||||
withDistrobox = with lib; mkEnableOption "Enable Distrobox";
|
|
||||||
withGames = with lib; mkEnableOption "Enable games";
|
|
||||||
};
|
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
./audio.nix
|
./audio.nix
|
||||||
./containers.nix
|
./containers.nix
|
||||||
|
@ -22,8 +14,6 @@
|
||||||
./virt.nix
|
./virt.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
|
||||||
|
|
||||||
networking.extraHosts =
|
networking.extraHosts =
|
||||||
''
|
''
|
||||||
10.10.11.245 surveillance.htb
|
10.10.11.245 surveillance.htb
|
||||||
|
@ -100,5 +90,4 @@
|
||||||
# Use zsh
|
# Use zsh
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
users.defaultUserShell = pkgs.zsh;
|
users.defaultUserShell = pkgs.zsh;
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
10
options.nix
Normal file
10
options.nix
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
{ lib, ... }: {
|
||||||
|
options = {
|
||||||
|
withNiri = with lib; mkEnableOption "Enable niri compositor";
|
||||||
|
withGnome = with lib; mkEnableOption "Enable gnome DE";
|
||||||
|
withNvidia = with lib; mkEnableOption "Enable proprietary nvidia drivers";
|
||||||
|
withVM = with lib; mkEnableOption "Enable VM related configuration";
|
||||||
|
withDistrobox = with lib; mkEnableOption "Enable Distrobox";
|
||||||
|
withGames = with lib; mkEnableOption "Enable games";
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,7 +1,9 @@
|
||||||
{ nixpkgs, home-manager, nixos-hardware, nur, niri, ... }@inputs: {
|
{ nixpkgs, home-manager, nixos-hardware, nur, niri, ... }: {
|
||||||
nixosConfigurations = let
|
nixosConfigurations = let
|
||||||
|
|
||||||
clientModules = [
|
clientModules = [
|
||||||
./modules/system
|
./modules/system
|
||||||
|
./options.nix
|
||||||
niri.nixosModules.niri
|
niri.nixosModules.niri
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
nixpkgs.overlays = [
|
nixpkgs.overlays = [
|
||||||
|
@ -14,8 +16,10 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
serverModules = [
|
serverModules = [
|
||||||
./modules/server
|
./modules/server
|
||||||
|
./options.nix
|
||||||
home-manager.nixosModules.home-manager {
|
home-manager.nixosModules.home-manager {
|
||||||
home-manager = {
|
home-manager = {
|
||||||
useGlobalPkgs = true;
|
useGlobalPkgs = true;
|
||||||
|
@ -24,6 +28,7 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
in {
|
in {
|
||||||
desktop = nixpkgs.lib.nixosSystem {
|
desktop = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue