created home manager nixos adapter modules
This commit is contained in:
parent
a755b9ff48
commit
90f0c114b3
|
@ -3,9 +3,6 @@
|
||||||
../common
|
../common
|
||||||
];
|
];
|
||||||
|
|
||||||
# # Enable sound with pipewire.
|
|
||||||
# hardware.flipperzero.enable = true;
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
cachefilesd
|
cachefilesd
|
||||||
];
|
];
|
||||||
|
|
5
home-modules/default.nix
Normal file
5
home-modules/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./flipperzero.nix
|
||||||
|
];
|
||||||
|
}
|
3
home-modules/flipperzero.nix
Normal file
3
home-modules/flipperzero.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{lib, ...}: {
|
||||||
|
options.hardware.flipperzero.enable = lib.mkEnableOption "enable flipperzero hardware";
|
||||||
|
}
|
|
@ -6,6 +6,10 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = osConfig.host.users.ester;
|
cfg = osConfig.host.users.ester;
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
../../home-modules
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home = {
|
home = {
|
||||||
username = "ester";
|
username = "ester";
|
||||||
|
|
|
@ -6,6 +6,10 @@
|
||||||
}: let
|
}: let
|
||||||
cfg = osConfig.host.users.eve;
|
cfg = osConfig.host.users.eve;
|
||||||
in {
|
in {
|
||||||
|
imports = [
|
||||||
|
../../home-modules
|
||||||
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
home = {
|
home = {
|
||||||
username = "eve";
|
username = "eve";
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
{
|
{pkgs, ...}: {
|
||||||
pkgs,
|
|
||||||
osConfig,
|
|
||||||
...
|
|
||||||
}: {
|
|
||||||
imports = [
|
imports = [
|
||||||
./packages.nix
|
./packages.nix
|
||||||
|
../../home-modules
|
||||||
];
|
];
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
|
|
@ -5,5 +5,6 @@
|
||||||
./users.nix
|
./users.nix
|
||||||
./desktop.nix
|
./desktop.nix
|
||||||
./nix-development.nix
|
./nix-development.nix
|
||||||
|
./home-manager
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
6
host-modules/home-manager/default.nix
Normal file
6
host-modules/home-manager/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# modules in this folder are to adapt home manager modules defined in `home-modules` to any nix module configs that they need to set
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./flipperzero.nix
|
||||||
|
];
|
||||||
|
}
|
9
host-modules/home-manager/flipperzero.nix
Normal file
9
host-modules/home-manager/flipperzero.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
home-users = lib.attrsets.mapAttrsToList (_: user: user) config.home-manager.users;
|
||||||
|
in {
|
||||||
|
hardware.flipperzero.enable = lib.lists.any (home-user: home-user.hardware.flipperzero.enable) home-users;
|
||||||
|
}
|
Loading…
Reference in a new issue