Compare commits
No commits in common. "a5dee47f5b8e89256b40ea31d8a6658e99802355" and "b479eff04d5ae780b5bbb3e9ee15b6adb8ecacc7" have entirely different histories.
a5dee47f5b
...
b479eff04d
|
@ -90,8 +90,7 @@
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
my.development.tools.embedded.enable = true;
|
my.development.embedded-tools.enable = true;
|
||||||
my.development.tools.networking.enable = true;
|
|
||||||
my.games.wine.enable = true;
|
my.games.wine.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
12
flake.lock
12
flake.lock
|
@ -204,11 +204,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722630065,
|
"lastModified": 1722462338,
|
||||||
"narHash": "sha256-QfM/9BMRkCmgWzrPDK+KbgJOUlSJnfX4OvsUupEUZvA=",
|
"narHash": "sha256-ss0G8t8RJVDewA3MyqgAlV951cWRK6EtVhVKEZ7J5LU=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "afc892db74d65042031a093adb6010c4c3378422",
|
"rev": "6e090576c4824b16e8759ebca3958c5b09659ee8",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -346,11 +346,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-stable_2": {
|
"nixpkgs-stable_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722519197,
|
"lastModified": 1722372011,
|
||||||
"narHash": "sha256-VEdJmVU2eLFtLqCjTYJd1J7+Go8idAcZoT11IewFiRg=",
|
"narHash": "sha256-B2xRiC3NEJy/82ugtareBkRqEkPGpMyjaLxaR8LBxNs=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "05405724efa137a0b899cce5ab4dde463b4fd30b",
|
"rev": "cf05eeada35e122770c5c14add958790fcfcbef5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
{
|
{
|
||||||
|
lib,
|
||||||
config,
|
config,
|
||||||
pkgs,
|
pkgs,
|
||||||
machineProps,
|
machineProps,
|
||||||
|
@ -12,7 +13,6 @@
|
||||||
./sound.nix
|
./sound.nix
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
./bluetooth.nix
|
./bluetooth.nix
|
||||||
./wireshark.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
config =
|
config =
|
||||||
|
|
|
@ -6,10 +6,7 @@
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ ./embedded.nix ];
|
||||||
./embedded.nix
|
|
||||||
./networking.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.my.development.git.enable = mkOption {
|
options.my.development.git.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
|
|
|
@ -4,12 +4,9 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
toolsConfig = config.my.development.tools.embedded;
|
|
||||||
in
|
|
||||||
with lib;
|
with lib;
|
||||||
{
|
{
|
||||||
options.my.development.tools.embedded.enable = mkOption {
|
options.my.development.embedded-tools.enable = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
example = true;
|
example = true;
|
||||||
|
@ -18,7 +15,7 @@ with lib;
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
options.my.development.tools.embedded.packages = mkOption {
|
options.my.development.embedded-tools.packages = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = with pkgs; [
|
default = with pkgs; [
|
||||||
qemu
|
qemu
|
||||||
|
@ -26,5 +23,5 @@ with lib;
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
config.home.packages = mkIf toolsConfig.enable toolsConfig.packages;
|
config.home.packages = lib.mkIf config.my.development.embedded-tools.enable config.my.development.embedded-tools.packages;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,31 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
pkgs,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
toolsConfig = config.my.development.tools.networking;
|
|
||||||
in
|
|
||||||
with lib;
|
|
||||||
{
|
|
||||||
options.my.development.tools.networking = {
|
|
||||||
enable = mkOption {
|
|
||||||
type = types.bool;
|
|
||||||
default = false;
|
|
||||||
description = ''
|
|
||||||
Enable network analysis tools.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
packages = mkOption {
|
|
||||||
type = types.listOf types.package;
|
|
||||||
default = with pkgs; [ wireshark ];
|
|
||||||
description = ''
|
|
||||||
Network analysis tools to install.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config.home.packages = mkIf toolsConfig.enable toolsConfig.packages;
|
|
||||||
}
|
|
|
@ -1,25 +0,0 @@
|
||||||
{
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
machineProps,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
anyWiresharkUser =
|
|
||||||
if machineProps.enableHomeManager then
|
|
||||||
(builtins.any (user: user.my.development.tools.networking.enable) (
|
|
||||||
builtins.attrValues config.home-manager.users
|
|
||||||
))
|
|
||||||
else
|
|
||||||
false;
|
|
||||||
userUseWireshark = value: value.my.development.tools.networking.enable;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
config = {
|
|
||||||
programs.wireshark.enable = anyWiresharkUser;
|
|
||||||
|
|
||||||
users.users = builtins.mapAttrs (name: value: {
|
|
||||||
extraGroups = if (userUseWireshark value) then [ "wireshark" ] else [ ];
|
|
||||||
}) config.home-manager.users;
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
Reference in a new issue