stuff
This commit is contained in:
parent
a026867c03
commit
d1d7dd9c01
22 changed files with 427 additions and 103 deletions
13
profiles/dynamic/bluetooth.nix
Normal file
13
profiles/dynamic/bluetooth.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.dynamic;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
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.";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
13
profiles/dynamic/location.nix
Normal file
13
profiles/dynamic/location.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.profiles.dynamic;
|
||||
in
|
||||
{
|
||||
config = lib.mkIf cfg.enable {
|
||||
location.provider = "geoclue2";
|
||||
};
|
||||
}
|
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;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue