Basic configuration for new servers and start modularizing config
This commit is contained in:
parent
82bb5b401c
commit
ca93d09059
38 changed files with 622 additions and 316 deletions
70
modules/default.nix
Normal file
70
modules/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
./default/secret.nix
|
||||
./docker.nix
|
||||
./git.nix
|
||||
./nginx.nix
|
||||
./ovh.nix
|
||||
./ssh.nix
|
||||
./sshd.nix
|
||||
./syncthing-server.nix
|
||||
./zfs.nix
|
||||
./zsh.nix
|
||||
];
|
||||
|
||||
options.chvp = {
|
||||
stateVersion = lib.mkOption {
|
||||
example = "20.09";
|
||||
};
|
||||
|
||||
dataPrefix = lib.mkOption {
|
||||
default = "";
|
||||
example = "/data";
|
||||
};
|
||||
|
||||
cachePrefix = lib.mkOption {
|
||||
default = "";
|
||||
example = "/cache";
|
||||
};
|
||||
|
||||
graphical = lib.mkOption {
|
||||
default = false;
|
||||
example = true;
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
||||
system.stateVersion = config.chvp.stateVersion;
|
||||
home-manager.users = {
|
||||
charlotte = { ... }: {
|
||||
home.stateVersion = config.chvp.stateVersion;
|
||||
};
|
||||
root = { ... }: {
|
||||
home.stateVersion = config.chvp.stateVersion;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
htop
|
||||
ncdu
|
||||
ripgrep
|
||||
];
|
||||
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
defaultUserShell = pkgs.zsh;
|
||||
users = {
|
||||
charlotte = {
|
||||
isNormalUser = true;
|
||||
home = "/home/charlotte";
|
||||
description = "Charlotte Van Petegem";
|
||||
extraGroups = [ "wheel" "systemd-journal" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue