stuff
This commit is contained in:
parent
a026867c03
commit
d1d7dd9c01
22 changed files with 427 additions and 103 deletions
|
@ -13,6 +13,14 @@ in
|
|||
assertion = !config.profiles.server.enable;
|
||||
message = "The desktop profile is not compatible with the server profile.";
|
||||
}
|
||||
{
|
||||
assertion = config.profiles.headful.enable;
|
||||
message = "The desktop profile depends on the headful profile.";
|
||||
}
|
||||
{
|
||||
assertion = config.profiles.dynamic.enable;
|
||||
message = "The desktop profile depends on the dynamic profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
steam-hardware.enable = true;
|
||||
xone.enable = true;
|
||||
xpadneo.enable = true;
|
||||
opentabletdriver.enable = true;
|
||||
gcadapter.enable = true;
|
||||
graphics.enable = true;
|
||||
enableAllFirmware = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
services.resolved.enable = true;
|
||||
|
||||
networking.networkmanager = {
|
||||
enable = true;
|
||||
dns = "systemd-resolved";
|
||||
};
|
||||
|
||||
users.groups.networkmanager.members = config.users.normalUsers;
|
||||
};
|
||||
}
|
|
@ -4,10 +4,10 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
cfg = config.profiles.dynamic;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
hardware.bluetooth.enable = true;
|
||||
};
|
||||
}
|
18
profiles/dynamic/default.nix
Normal file
18
profiles/dynamic/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.dynamic;
|
||||
in
|
||||
{
|
||||
options.profiles.dynamic = {
|
||||
enable = lib.mkEnableOption "dynamic";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.profiles.server.enable;
|
||||
message = "The dynamic profile is not compatible with the server profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
cfg = config.profiles.dynamic;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
15
profiles/dynamic/networking.nix
Normal file
15
profiles/dynamic/networking.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.dynamic;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
users.groups.networkmanager.members = config.users.normalUsers;
|
||||
};
|
||||
}
|
18
profiles/headful/default.nix
Normal file
18
profiles/headful/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ config, lib, ... }:
|
||||
let
|
||||
cfg = config.profiles.headful;
|
||||
in
|
||||
{
|
||||
options.profiles.headful = {
|
||||
enable = lib.mkEnableOption "headful";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !config.profiles.server.enable;
|
||||
message = "The headful profile is not compatible with the server profile.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
cfg = config.profiles.headful;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
cfg = config.profiles.headful;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
|
@ -4,13 +4,13 @@
|
|||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.desktop;
|
||||
cfg = config.profiles.headful;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
SDL_VIDEODRIVER = "wayland";
|
||||
SDL_VIDEODRIVER = "wayland,x11";
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue