Services, refactor, clean up, service to automatic
Move service to automatic since it has a separate purpose. Refactor the default.nix code to include service.nix files so it is easier to extend code.
This commit is contained in:
parent
dfb064e92b
commit
525f68172b
14 changed files with 29 additions and 52 deletions
|
|
@ -3,6 +3,7 @@
|
|||
{
|
||||
imports = [
|
||||
./apps
|
||||
./automatic
|
||||
./services
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
bluetooth.enable = lib.mkEnableOption "Enables Bluetooth with blueman";
|
||||
options.bluetooth = {
|
||||
enable = lib.mkEnableOption "Enables Bluetooth with blueman";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.bluetooth.enable {
|
||||
|
|
@ -1,12 +1,6 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./graphics
|
||||
./networking
|
||||
./pipewire
|
||||
./polkit
|
||||
./sops-nix
|
||||
./system
|
||||
];
|
||||
{ lib, ... }: let
|
||||
fs = lib.fileset;
|
||||
appFilter = {name, ...}: name == "service.nix";
|
||||
in {
|
||||
imports = fs.toList (fs.fileFilter appFilter ./.);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
tuigreet.enable = lib.mkEnableOption "enables tuigreet with greetd";
|
||||
options.tuigreet = {
|
||||
enable = lib.mkEnableOption "enables tuigreet with greetd";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.tuigreet.enable {
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./display_manager
|
||||
./nvidia
|
||||
./wayland_compositors
|
||||
./tabletdrivers
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./bluetooth
|
||||
./wireless
|
||||
];
|
||||
}
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
nvidia.enable = lib.mkEnableOption
|
||||
options.nvidia = {
|
||||
enable = lib.mkEnableOption
|
||||
"Enables nvidia with proprietary drivers";
|
||||
};
|
||||
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
pipewire.enable = lib.mkEnableOption "Enables pipewire and pulsemixer";
|
||||
options.pipewire = {
|
||||
enable = lib.mkEnableOption "Enables pipewire and pulsemixer";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.pipewire.enable {
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
polkit.enable = lib.mkEnableOption "Enables polkit with kde handler";
|
||||
options.polkit = {
|
||||
enable = lib.mkEnableOption "Enables polkit with kde handler";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.polkit.enable {
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
tablet.enable = lib.mkEnableOption
|
||||
options.tablet = {
|
||||
enable = lib.mkEnableOption
|
||||
"Enables tablet support";
|
||||
};
|
||||
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
{ inputs, config, pkgs, lib, ... }:
|
||||
{ inputs, config, lib, ... }:
|
||||
|
||||
{
|
||||
|
||||
options = {
|
||||
hyprland.enable = lib.mkEnableOption "Enables hyprland";
|
||||
options.hyprland = {
|
||||
enable = lib.mkEnableOption "Enables hyprland";
|
||||
};
|
||||
|
||||
imports = [
|
||||
|
|
@ -13,7 +13,9 @@
|
|||
config = {
|
||||
nix.settings = {
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
trusted-public-keys = [ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
programs.hyprland.enable = lib.mkIf config.hyprland.enable true;
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{ config, lib, ... }:
|
||||
|
||||
{
|
||||
options = {
|
||||
wireless = {
|
||||
enable = lib.mkEnableOption "Enables wireless";
|
||||
networks = lib.mkOption { default = {}; };
|
||||
secretsFile = lib.mkOption {};
|
||||
};
|
||||
options.wireless = {
|
||||
enable = lib.mkEnableOption "Enables wireless";
|
||||
networks = lib.mkOption { default = {}; };
|
||||
secretsFile = lib.mkOption {};
|
||||
};
|
||||
|
||||
config = lib.mkIf config.wireless.enable {
|
||||
Loading…
Add table
Add a link
Reference in a new issue