added stateVersion to settings + wine in dev module
This commit is contained in:
parent
052ae88a78
commit
665a1c0264
|
@ -1,26 +1,29 @@
|
|||
{ config, pkgs, lib, ... }: {
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
./nix-settings.nix
|
||||
./users
|
||||
./.luks-swap.nix
|
||||
./fonts.nix
|
||||
./extra
|
||||
./core
|
||||
./dev
|
||||
./games
|
||||
./hardware
|
||||
./system
|
||||
];
|
||||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
settings = import ./settings.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./hardware-configuration.nix # Include the results of the hardware scan.
|
||||
./nix-settings.nix # nix related config
|
||||
./users
|
||||
./.luks-swap.nix
|
||||
./fonts.nix # system wide font settings
|
||||
./extra # extra packages
|
||||
./core # core system components
|
||||
./dev # development stuff
|
||||
./games # games
|
||||
./hardware # hardware specific settings
|
||||
./system # system components such as kernel
|
||||
];
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "23.11"; # Did you read the comment?
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It's perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = settings.stateVersion; # Did you read the comment?
|
||||
|
||||
hardware.opengl.enable = true;
|
||||
|
||||
|
@ -52,9 +55,6 @@
|
|||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = (with pkgs; [
|
||||
|
@ -91,27 +91,8 @@
|
|||
|
||||
# SCSI driver
|
||||
sg3_utils
|
||||
|
||||
wineWowPackages.stable
|
||||
winetricks
|
||||
]);
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
# services.openssh.enable = true;
|
||||
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
environment.sessionVariables = rec {
|
||||
# rust
|
||||
CARGO_TERM_COLOR = "always";
|
||||
|
|
|
@ -10,5 +10,6 @@ in
|
|||
++ lib.optionals settings.dev.latex [ ./latex.nix ]
|
||||
++ lib.optionals settings.dev.dotnet [ ./dotnet.nix ]
|
||||
++ lib.optionals settings.dev.python3.enable [ ./python3.nix ]
|
||||
++ lib.optionals settings.virtualisation.waydroid [ ./waydroid.nix ];
|
||||
++ lib.optionals settings.virtualisation.waydroid [ ./waydroid.nix ]
|
||||
++ lib.optionals settings.virtualisation.wine.enable [ ./wine.nix ];
|
||||
}
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
settings = import ./../settings.nix;
|
||||
in
|
||||
{
|
||||
config = lib.mkMerge [
|
||||
# optionally enable native wine for wayland
|
||||
(lib.mkIf settings.virtualisation.wine.wayland {
|
||||
environment.systemPackages = (with pkgs; [
|
||||
# native wayland support (unstable)
|
||||
wineWowPackages.waylandFull
|
||||
]);
|
||||
})
|
||||
|
||||
# if wayland is off, use package for Xorg
|
||||
(lib.mkIf (!settings.virtualisation.wine.wayland) {
|
||||
environment.systemPackages = (with pkgs; [
|
||||
# support both 32- and 64-bit applications
|
||||
wineWowPackages.stagingFull
|
||||
]);
|
||||
})
|
||||
|
||||
# winetricks
|
||||
(lib.mkIf settings.virtualisation.wine.winetricks {
|
||||
environment.systemPackages = (with pkgs; [
|
||||
# winetricks (works for all versions of wine)
|
||||
winetricks
|
||||
]);
|
||||
})
|
||||
];
|
||||
}
|
10
settings.nix
10
settings.nix
|
@ -1,4 +1,7 @@
|
|||
with import <nixpkgs> {}; {
|
||||
with import <nixpkgs> {};
|
||||
{
|
||||
stateVersion = "23.11";
|
||||
|
||||
hardware = {
|
||||
# support for GPUs
|
||||
amdgpu = true;
|
||||
|
@ -42,6 +45,11 @@ with import <nixpkgs> {}; {
|
|||
virt-manager = true;
|
||||
};
|
||||
waydroid = false;
|
||||
wine = {
|
||||
enable = true;
|
||||
wayland = false;
|
||||
winetricks = true;
|
||||
};
|
||||
};
|
||||
dev = {
|
||||
platformio = true;
|
||||
|
|
Loading…
Reference in New Issue