mirror of
https://github.com/starr-dusT/dotfiles.git
synced 2025-02-19 19:27:31 -08:00
remove system folder and relocate modules
This commit is contained in:
parent
663b5cad56
commit
6fa1f92b1b
@ -42,10 +42,7 @@
|
|||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
samba-client.enable = true;
|
samba-client.enable = true;
|
||||||
};
|
|
||||||
system = {
|
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
terminal.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
};
|
};
|
||||||
programs = {
|
programs = {
|
||||||
beancount.enable = true;
|
beancount.enable = true;
|
||||||
|
borg.enable = true;
|
||||||
chezmoi.apply = true;
|
chezmoi.apply = true;
|
||||||
kitty.enable = true;
|
kitty.enable = true;
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
@ -63,11 +64,7 @@
|
|||||||
};
|
};
|
||||||
services = {
|
services = {
|
||||||
samba-client.enable = true;
|
samba-client.enable = true;
|
||||||
};
|
|
||||||
system = {
|
|
||||||
backup.enable = true;
|
|
||||||
ssh.enable = true;
|
ssh.enable = true;
|
||||||
terminal.enable = true;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,10 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [ ./desktop ./devel ./gaming ./programs ./system ./services ];
|
imports = [
|
||||||
|
./desktop
|
||||||
|
./devel
|
||||||
|
./gaming
|
||||||
|
./programs
|
||||||
|
./services
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,15 @@
|
|||||||
{ config, lib, pkgs, user, ... }:
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.system.terminal;
|
let cfg = config.modules.programs.base.terminal;
|
||||||
in {
|
in {
|
||||||
options.modules.system.terminal.enable = lib.mkEnableOption "terminal";
|
options.modules.programs.base.terminal = with lib; {
|
||||||
config = lib.mkIf cfg.enable {
|
enable = lib.mkOption {
|
||||||
|
type = with types; bool;
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
killall # Command-line utility to terminate processes by name.
|
killall # Command-line utility to terminate processes by name.
|
||||||
pciutils # Utilities for inspecting and manipulating devices connected to the PCI bus.
|
pciutils # Utilities for inspecting and manipulating devices connected to the PCI bus.
|
@ -1,10 +1,9 @@
|
|||||||
{ config, pkgs, user, lib, ... }:
|
{ config, pkgs, user, lib, ... }:
|
||||||
|
|
||||||
let cfg = config.modules.system.backup;
|
let cfg = config.modules.programs.borg;
|
||||||
in {
|
in {
|
||||||
options.modules.system.backup.enable = lib.mkEnableOption "backup";
|
options.modules.programs.borg.enable = lib.mkEnableOption "borg";
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.borgmatic.enable = true;
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
borgbackup # Deduplicating backup program
|
borgbackup # Deduplicating backup program
|
||||||
tree
|
tree
|
||||||
@ -22,5 +21,6 @@ in {
|
|||||||
rm /tmp/docker_images
|
rm /tmp/docker_images
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
services.borgmatic.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -1,7 +1,9 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
|
./base/terminal.nix
|
||||||
./beancount.nix
|
./beancount.nix
|
||||||
|
./borg.nix
|
||||||
./chrome
|
./chrome
|
||||||
./firefox
|
./firefox
|
||||||
./git.nix
|
./git.nix
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./samba-client.nix
|
./samba-client.nix
|
||||||
|
./ssh.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
15
provision/modules/services/ssh.nix
Normal file
15
provision/modules/services/ssh.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, user, ... }:
|
||||||
|
|
||||||
|
let cfg = config.modules.services.ssh;
|
||||||
|
in {
|
||||||
|
options.modules.services.ssh.enable = lib.mkEnableOption "ssh";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.openssh.enable = true;
|
||||||
|
services.pcscd.enable = true;
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +0,0 @@
|
|||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [ ./backup.nix ./ssh.nix ./terminal.nix ];
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
{ config, lib, pkgs, user, ... }:
|
|
||||||
|
|
||||||
let cfg = config.modules.system.ssh;
|
|
||||||
in {
|
|
||||||
options.modules.system.ssh.enable = lib.mkEnableOption "ssh";
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
services.openssh.enable = true;
|
|
||||||
services.pcscd.enable = true;
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
pinentryPackage = pkgs.pinentry-curses;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user