Compare commits

...

2 commits

Author SHA1 Message Date
Victor Mignot 32b7a34b6f
Restrict Lix to x86 machines 2024-08-03 22:36:48 +02:00
Victor Mignot 75f0cb6112
Fix bug for non-home-manager machine 2024-08-03 22:32:36 +02:00
2 changed files with 18 additions and 13 deletions

View file

@ -65,7 +65,9 @@
{ ... }:
{
imports = [
lixModules.${config.nixpkgs}.nixosModules.default
(
if (config.system == "x86_64-linux") then lixModules.${config.nixpkgs}.nixosModules.default else { }
)
./configurations/${name}
(if config.enableHomeManager then home-manager.nixosModules.home-manager else { })
(if (config.system == "x86_64-linux") then lanzaboote.nixosModules.lanzaboote else { })

View file

@ -1,9 +1,4 @@
{
config,
lib,
machineProps,
...
}:
{ config, machineProps, ... }:
let
anyWiresharkUser =
if machineProps.enableHomeManager then
@ -15,11 +10,19 @@ let
userUseWireshark = value: value.my.development.tools.networking.enable;
in
{
config = {
programs.wireshark.enable = anyWiresharkUser;
config =
{
programs.wireshark.enable = anyWiresharkUser;
users.users = builtins.mapAttrs (name: value: {
extraGroups = if (userUseWireshark value) then [ "wireshark" ] else [ ];
}) config.home-manager.users;
};
}
// (
if machineProps.enableHomeManager then
{
users.users = builtins.mapAttrs (name: value: {
extraGroups = if (userUseWireshark value) then [ "wireshark" ] else [ ];
}) config.home-manager.users;
}
else
{ }
);
}