Restructure home and system modules
This commit is contained in:
parent
b86a8b50c7
commit
a03355b3a1
35 changed files with 82 additions and 82 deletions
|
@ -1,17 +1,9 @@
|
|||
{ ... }:
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./gamingKernel
|
||||
./keymaps
|
||||
./nvidia
|
||||
./pipewire
|
||||
./plymouth
|
||||
./printing
|
||||
./waydroid
|
||||
|
||||
# Common configuration
|
||||
./system.nix
|
||||
./desktop
|
||||
./hardware
|
||||
./server
|
||||
];
|
||||
}
|
9
modules/system/desktop/default.nix
Normal file
9
modules/system/desktop/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./gnome
|
||||
# ./hyprland
|
||||
./plasma
|
||||
];
|
||||
}
|
23
modules/system/desktop/gnome/default.nix
Normal file
23
modules/system/desktop/gnome/default.nix
Normal file
|
@ -0,0 +1,23 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.desktop.gnome;
|
||||
in
|
||||
{
|
||||
options.modules.system.desktop.gnome = {
|
||||
enable = mkEnableOption ''
|
||||
Enable gnome with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the Gnome Desktop Environment.
|
||||
services.xserver.displayManager.gdm.enable = true;
|
||||
|
||||
# Enable the GNOME shell.
|
||||
services.xserver.desktopManager.gnome.enable = true;
|
||||
};
|
||||
}
|
42
modules/system/desktop/plasma/default.nix
Normal file
42
modules/system/desktop/plasma/default.nix
Normal file
|
@ -0,0 +1,42 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.desktop.plasma;
|
||||
in
|
||||
{
|
||||
options.modules.system.desktop.plasma = {
|
||||
enable = mkEnableOption ''
|
||||
Enable plasma with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager = {
|
||||
sddm.enable = true;
|
||||
defaultSession = "plasma";
|
||||
};
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
programs.kdeconnect.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; with kdePackages; [
|
||||
krfb # Use by kdeconnect for virtualmonitorplugin "krfb-virtualmonitor"
|
||||
discover
|
||||
|
||||
# Usefull for automatic informations collect software like KDE
|
||||
vulkan-tools # For vulkaninfo command
|
||||
wayland-utils # For wayland-info command
|
||||
glxinfo
|
||||
clinfo
|
||||
];
|
||||
|
||||
# Uncomment when kwin is available in nixpkgs and NVIDIA 555
|
||||
nixpkgs.overlays = [
|
||||
(import ../../../../overlays/kwin)
|
||||
];
|
||||
};
|
||||
}
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.bluetooth;
|
||||
cfg = config.modules.system.hardware.bluetooth;
|
||||
in
|
||||
{
|
||||
options.modules.system.bluetooth = {
|
||||
options.modules.system.hardware.bluetooth = {
|
||||
enable = mkEnableOption ''
|
||||
Enable pipewire with my custom configurations
|
||||
'';
|
17
modules/system/hardware/default.nix
Normal file
17
modules/system/hardware/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./gamingKernel
|
||||
./keymaps
|
||||
./nvidia
|
||||
./pipewire
|
||||
./plymouth
|
||||
./printing
|
||||
./waydroid
|
||||
|
||||
# Common configuration
|
||||
./common.nix
|
||||
];
|
||||
}
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.gamingKernel;
|
||||
cfg = config.modules.system.hardware.gamingKernel;
|
||||
in
|
||||
{
|
||||
options.modules.system.gamingKernel = {
|
||||
options.modules.system.hardware.gamingKernel = {
|
||||
enable = mkEnableOption ''
|
||||
Enable gaming kernel with my custom configurations
|
||||
'';
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.keymaps;
|
||||
cfg = config.modules.system.hardware.keymaps;
|
||||
in
|
||||
{
|
||||
options.modules.system.keymaps = {
|
||||
options.modules.system.hardware.keymaps = {
|
||||
layout = mkOption {
|
||||
default = "fr";
|
||||
example = "fr";
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.nvidia;
|
||||
cfg = config.modules.system.hardware.nvidia;
|
||||
in
|
||||
{
|
||||
options.modules.system.nvidia = {
|
||||
options.modules.system.hardware.nvidia = {
|
||||
enable = mkEnableOption ''
|
||||
Enable nvidia with my custom configurations
|
||||
'';
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.pipewire;
|
||||
cfg = config.modules.system.hardware.pipewire;
|
||||
in
|
||||
{
|
||||
options.modules.system.pipewire = {
|
||||
options.modules.system.hardware.pipewire = {
|
||||
enable = mkEnableOption ''
|
||||
Enable pipewire with my custom configurations
|
||||
'';
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.plymouth;
|
||||
cfg = config.modules.system.hardware.plymouth;
|
||||
in
|
||||
{
|
||||
options.modules.system.plymouth = {
|
||||
options.modules.system.hardware.plymouth = {
|
||||
enable = mkEnableOption ''
|
||||
Enable plymouth with my custom configurations
|
||||
'';
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.printing;
|
||||
cfg = config.modules.system.hardware.printing;
|
||||
in
|
||||
{
|
||||
options.modules.system.printing = {
|
||||
options.modules.system.hardware.printing = {
|
||||
enable = mkEnableOption ''
|
||||
Enable printing with my custom configurations
|
||||
'';
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.waydroid;
|
||||
cfg = config.modules.system.hardware.waydroid;
|
||||
in
|
||||
{
|
||||
options.modules.system.waydroid = {
|
||||
options.modules.system.hardware.waydroid = {
|
||||
enable = mkEnableOption ''
|
||||
Enable waydroid with my custom configurations
|
||||
'';
|
8
modules/system/server/default.nix
Normal file
8
modules/system/server/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./docker
|
||||
./openssh
|
||||
];
|
||||
}
|
19
modules/system/server/docker/default.nix
Normal file
19
modules/system/server/docker/default.nix
Normal file
|
@ -0,0 +1,19 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.server.docker;
|
||||
in
|
||||
{
|
||||
options.modules.system.server.docker = {
|
||||
enable = mkEnableOption ''
|
||||
Enable docker with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
enableNvidia = config.modules.system.hardware.nvidia.enable;
|
||||
};
|
||||
};
|
||||
}
|
22
modules/system/server/openssh/default.nix
Normal file
22
modules/system/server/openssh/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.server.openssh;
|
||||
in
|
||||
{
|
||||
options.modules.system.server.openssh = {
|
||||
enable = mkEnableOption ''
|
||||
Enable openssh with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
|
||||
settings = {
|
||||
PasswordAuthentication = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue