Conditional on options as a mechanism for ensuring compatibility across NixOS versions?
This commit is contained in:
parent
dbabc70e2f
commit
594078f84f
27
flake.nix
27
flake.nix
|
@ -233,32 +233,7 @@
|
|||
flakeInputs = self.inputs;
|
||||
};
|
||||
|
||||
nixosConfigurations = let
|
||||
system = {
|
||||
nixpkgsInput,
|
||||
modules ? [],
|
||||
system ? "x86_64-linux",
|
||||
}:
|
||||
nixpkgsInput.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = modules ++ [nixosModules.common];
|
||||
};
|
||||
stableSystem = {
|
||||
modules,
|
||||
system ? "x86_64-linux",
|
||||
}:
|
||||
system {
|
||||
nixpkgsInput = nixpkgs;
|
||||
modules = modules ++ [nixosModules.stableCommon];
|
||||
};
|
||||
unstableSystem = {
|
||||
modules,
|
||||
system ? "x86_64-linux",
|
||||
}:
|
||||
nixpkgs-unstable.lib.nixosSystem {
|
||||
nixosModules.stableCommon
|
||||
};
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
beefcake = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = with nixosModules; [
|
||||
|
|
|
@ -419,7 +419,13 @@
|
|||
};
|
||||
};
|
||||
|
||||
graphical-workstation = {pkgs, ...}: {
|
||||
graphical-workstation = {
|
||||
pkgs,
|
||||
lib,
|
||||
options,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = with nixosModules; [
|
||||
plasma6
|
||||
enable-flatpaks-and-appimages
|
||||
|
@ -431,12 +437,21 @@
|
|||
|
||||
xdg.portal.enable = true;
|
||||
|
||||
hardware = {
|
||||
hardware =
|
||||
if builtins.hasAttr "enable" options.hardware.graphics
|
||||
then {
|
||||
graphics = {
|
||||
enable = true;
|
||||
# driSupport32Bit = true;
|
||||
# driSupport = true;
|
||||
};
|
||||
}
|
||||
else {
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
||||
driSupport = true;
|
||||
};
|
||||
};
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
|
|
Loading…
Reference in a new issue