Moved modules into appropriate folders
This commit is contained in:
parent
48dcf38304
commit
3760c929fe
9 changed files with 18 additions and 8 deletions
29
modules/desktop/audio.nix
Normal file
29
modules/desktop/audio.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.audio;
|
||||
in
|
||||
{
|
||||
options.audio = {
|
||||
enable = lib.mkEnableOption "Enable sound module";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Enable sound with pipewire.
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
|
@ -1,5 +1,8 @@
|
|||
{
|
||||
imports = [
|
||||
./audio.nix
|
||||
./desktop-user.nix
|
||||
./esphome.nix
|
||||
./gnome.nix
|
||||
./plymouth.nix
|
||||
./steam.nix
|
||||
|
|
|
|||
68
modules/desktop/desktop-user.nix
Normal file
68
modules/desktop/desktop-user.nix
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.desktopUser;
|
||||
in
|
||||
{
|
||||
options.desktopUser = {
|
||||
enable = lib.mkEnableOption "Enable desktop user module";
|
||||
|
||||
userName = lib.mkOption {
|
||||
default = "pazpi";
|
||||
type = lib.types.str;
|
||||
description = config.users.users."<name>".userName.description;
|
||||
};
|
||||
|
||||
description = lib.mkOption {
|
||||
default = "Davide Pasetto";
|
||||
type = lib.types.str;
|
||||
description = config.users.users."<name>".description;
|
||||
};
|
||||
|
||||
hashedPassword = lib.mkOption {
|
||||
default = "";
|
||||
type = lib.types.str;
|
||||
description = config.users.users."<name>".initialHashedPassword.description;
|
||||
};
|
||||
|
||||
flatpak = lib.mkOption {
|
||||
default = false;
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Enable the flatpak engine for the user
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
users.users.${cfg.userName} = {
|
||||
description = cfg.description;
|
||||
extraGroups = [
|
||||
"users"
|
||||
"wheel"
|
||||
];
|
||||
initialHashedPassword = cfg.hashedPassword;
|
||||
isNormalUser = true;
|
||||
isSystemUser = false;
|
||||
shell = pkgs.zsh;
|
||||
uid = 1000;
|
||||
|
||||
packages =
|
||||
with pkgs;
|
||||
lib.mkIf cfg.flatpak [
|
||||
flatpak
|
||||
];
|
||||
};
|
||||
|
||||
console.keyMap = "it";
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
2
modules/desktop/esphome.nix
Normal file
2
modules/desktop/esphome.nix
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# Aggiungere l'user al gruppo "dialout"
|
||||
{ }
|
||||
Loading…
Add table
Add a link
Reference in a new issue