Refactor: Rename system.server -> system.services
All checks were successful
check / check (push) Successful in 34s
All checks were successful
check / check (push) Successful in 34s
Fix #6
This commit is contained in:
parent
453f364d4f
commit
c8d1f9f65a
8 changed files with 12 additions and 12 deletions
10
modules/system/services/default.nix
Normal file
10
modules/system/services/default.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./distrobox
|
||||
./docker
|
||||
./ollama
|
||||
./openssh
|
||||
];
|
||||
}
|
17
modules/system/services/distrobox/default.nix
Normal file
17
modules/system/services/distrobox/default.nix
Normal file
|
@ -0,0 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.services.distrobox;
|
||||
in
|
||||
{
|
||||
options.modules.system.services.distrobox = {
|
||||
enable = mkEnableOption ''
|
||||
Enable distrobox with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
modules.system.services.docker.enable = true;
|
||||
environment.systemPackages = with pkgs; [ distrobox ];
|
||||
};
|
||||
}
|
21
modules/system/services/docker/default.nix
Normal file
21
modules/system/services/docker/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.services.docker;
|
||||
in
|
||||
{
|
||||
options.modules.system.services.docker = {
|
||||
enable = mkEnableOption ''
|
||||
Enable docker with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
};
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
|
||||
users.users.florian.extraGroups = [ "docker" ];
|
||||
};
|
||||
}
|
21
modules/system/services/ollama/default.nix
Normal file
21
modules/system/services/ollama/default.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.services.ollama;
|
||||
nvidiaEnabled = config.modules.system.hardware.nvidia.enable;
|
||||
in
|
||||
{
|
||||
options.modules.system.services.ollama = {
|
||||
enable = mkEnableOption ''
|
||||
Enable ollama with my custom configurations
|
||||
'';
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
|
||||
acceleration = if nvidiaEnabled then "cuda" else null;
|
||||
};
|
||||
};
|
||||
}
|
22
modules/system/services/openssh/default.nix
Normal file
22
modules/system/services/openssh/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ config, lib, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.system.services.openssh;
|
||||
in
|
||||
{
|
||||
options.modules.system.services.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