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 = [
|
imports = [
|
||||||
./apps
|
./apps
|
||||||
|
./automatic
|
||||||
./services
|
./services
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.bluetooth = {
|
||||||
bluetooth.enable = lib.mkEnableOption "Enables Bluetooth with blueman";
|
enable = lib.mkEnableOption "Enables Bluetooth with blueman";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.bluetooth.enable {
|
config = lib.mkIf config.bluetooth.enable {
|
||||||
|
|
@ -1,12 +1,6 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ lib, ... }: let
|
||||||
|
fs = lib.fileset;
|
||||||
{
|
appFilter = {name, ...}: name == "service.nix";
|
||||||
imports = [
|
in {
|
||||||
./graphics
|
imports = fs.toList (fs.fileFilter appFilter ./.);
|
||||||
./networking
|
|
||||||
./pipewire
|
|
||||||
./polkit
|
|
||||||
./sops-nix
|
|
||||||
./system
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.tuigreet = {
|
||||||
tuigreet.enable = lib.mkEnableOption "enables tuigreet with greetd";
|
enable = lib.mkEnableOption "enables tuigreet with greetd";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.tuigreet.enable {
|
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, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.nvidia = {
|
||||||
nvidia.enable = lib.mkEnableOption
|
enable = lib.mkEnableOption
|
||||||
"Enables nvidia with proprietary drivers";
|
"Enables nvidia with proprietary drivers";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.pipewire = {
|
||||||
pipewire.enable = lib.mkEnableOption "Enables pipewire and pulsemixer";
|
enable = lib.mkEnableOption "Enables pipewire and pulsemixer";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.pipewire.enable {
|
config = lib.mkIf config.pipewire.enable {
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.polkit = {
|
||||||
polkit.enable = lib.mkEnableOption "Enables polkit with kde handler";
|
enable = lib.mkEnableOption "Enables polkit with kde handler";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.polkit.enable {
|
config = lib.mkIf config.polkit.enable {
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.tablet = {
|
||||||
tablet.enable = lib.mkEnableOption
|
enable = lib.mkEnableOption
|
||||||
"Enables tablet support";
|
"Enables tablet support";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
{ inputs, config, pkgs, lib, ... }:
|
{ inputs, config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
options = {
|
options.hyprland = {
|
||||||
hyprland.enable = lib.mkEnableOption "Enables hyprland";
|
enable = lib.mkEnableOption "Enables hyprland";
|
||||||
};
|
};
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
|
|
@ -13,7 +13,9 @@
|
||||||
config = {
|
config = {
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
substituters = [ "https://hyprland.cachix.org" ];
|
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" ];
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
};
|
};
|
||||||
programs.hyprland.enable = lib.mkIf config.hyprland.enable true;
|
programs.hyprland.enable = lib.mkIf config.hyprland.enable true;
|
||||||
|
|
@ -1,13 +1,11 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
options = {
|
options.wireless = {
|
||||||
wireless = {
|
|
||||||
enable = lib.mkEnableOption "Enables wireless";
|
enable = lib.mkEnableOption "Enables wireless";
|
||||||
networks = lib.mkOption { default = {}; };
|
networks = lib.mkOption { default = {}; };
|
||||||
secretsFile = lib.mkOption {};
|
secretsFile = lib.mkOption {};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf config.wireless.enable {
|
config = lib.mkIf config.wireless.enable {
|
||||||
networking.wireless = {
|
networking.wireless = {
|
||||||
Loading…
Add table
Add a link
Reference in a new issue