some splitting of files
This commit is contained in:
parent
893d652eb4
commit
7edd2c9679
3 changed files with 59 additions and 57 deletions
|
|
@ -10,18 +10,18 @@
|
|||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFyGaBZIZYjiBhOFD2drvG316B9NUVSbMpTIhOCQur8P arch"
|
||||
];
|
||||
mc1 = "192.168.0.167";
|
||||
common_mc1_route = {
|
||||
common_mc1_route = {
|
||||
via = mc1;
|
||||
prefixLength = 24;
|
||||
};
|
||||
in
|
||||
{
|
||||
in
|
||||
{
|
||||
users.users = {
|
||||
root.openssh.authorizedKeys.keys = sshPubkeys;
|
||||
mc-fucker = {
|
||||
isNormalUser = true;
|
||||
openssh.authorizedKeys.keys = sshPubkeys;
|
||||
hashedPassword = "$6$VlNqS5D2uxmzs$AXEEg63iQ5bMQDtU9.Cy4cd/UfQCHk9QNo2RuQmucNz6Y4Z2l0qM5lvr6KFcEdJi6vO7mYd761LrVrQ8J7nPw1";
|
||||
hashedPassword = "$6$VlNqS5D2uxmzs$AXEEg63iQ5bMQDtU9.Cy4cd/UfQCHk9QNo2RuQmucNz6Y4Z2l0qM5lvr6KFcEdJi6vO7mYd761LrVrQ8J7nPw1";
|
||||
extraGroups = [ "wheel" ];
|
||||
};
|
||||
};
|
||||
|
|
@ -50,7 +50,6 @@
|
|||
i18n.defaultLocale = "en_GB.UTF-8";
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
#vim
|
||||
wget
|
||||
htop
|
||||
git
|
||||
|
|
@ -84,7 +83,7 @@
|
|||
address = "192.168.0.165";
|
||||
prefixLength = 24;
|
||||
} ];
|
||||
routes = [
|
||||
routes = [
|
||||
(common_mc1_route // { address = "192.168.1.0"; })
|
||||
(common_mc1_route // { address = "192.168.2.0"; })
|
||||
(common_mc1_route // { address = "192.168.3.0"; })
|
||||
|
|
@ -94,37 +93,14 @@
|
|||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
#memoryMax = 8000000000;
|
||||
memoryPercent = 250;
|
||||
algorithm = "lzo-rle";
|
||||
};
|
||||
|
||||
programs = {
|
||||
zsh = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
||||
# Make user colour green in prompt instead of default blue
|
||||
#zstyle ':prompt:grml:left:items:user' pre '%F{green}%B'
|
||||
export QUOTING_STYLE=literal
|
||||
'';
|
||||
promptInit = ""; # otherwise it'll override the grml prompt
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
highlightStyle = "fg=cyan";
|
||||
};
|
||||
shellAliases = {
|
||||
"ip" = "ip -c";
|
||||
"nt" = "nixos-rebuild test";
|
||||
"ns" = "nixos-rebuild switch";
|
||||
"nsu" = "nixos-rebuild switch --upgrade";
|
||||
};
|
||||
};
|
||||
|
||||
zsh = import ./zsh.nix;
|
||||
atop = {
|
||||
enable = true;
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -136,40 +112,19 @@
|
|||
enable = true;
|
||||
allowReboot = true;
|
||||
};
|
||||
|
||||
|
||||
services = {
|
||||
openssh.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
passwordAuthentication = false;
|
||||
};
|
||||
|
||||
zabbixAgent = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
server = mc1;
|
||||
};
|
||||
|
||||
gitea = {
|
||||
enable = true;
|
||||
domain = "dev.mc-fucker.cool";
|
||||
rootUrl = "https://dev.mc-fucker.cool";
|
||||
log.level = "Warn";
|
||||
database = {
|
||||
createDatabase = false;
|
||||
host = "192.168.2.5";
|
||||
type = "postgres";
|
||||
port = 5432;
|
||||
name = "giteadb";
|
||||
passwordFile = /run/keys/gitea-dbpassword;
|
||||
};
|
||||
settings = {
|
||||
service = {
|
||||
REGISTER_MANUAL_CONFIRM = true;
|
||||
};
|
||||
server = {
|
||||
START_SSH_SERVER = true;
|
||||
SSH_SERVER_HOST_KEYS = "ssh/gitea.ed25519";
|
||||
};
|
||||
};
|
||||
ssh.clonePort = 2222;
|
||||
};
|
||||
gitea = import ./gitea.nix;
|
||||
};
|
||||
|
||||
virtualisation = {
|
||||
|
|
|
|||
24
gitea.nix
Normal file
24
gitea.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
enable = true;
|
||||
domain = "dev.mc-fucker.cool";
|
||||
rootUrl = "https://dev.mc-fucker.cool";
|
||||
log.level = "Warn";
|
||||
database = {
|
||||
createDatabase = false;
|
||||
host = "192.168.2.5";
|
||||
type = "postgres";
|
||||
port = 5432;
|
||||
name = "giteadb";
|
||||
passwordFile = /run/keys/gitea-dbpassword;
|
||||
};
|
||||
settings = {
|
||||
service = {
|
||||
REGISTER_MANUAL_CONFIRM = true;
|
||||
};
|
||||
server = {
|
||||
START_SSH_SERVER = true;
|
||||
SSH_SERVER_HOST_KEYS = "ssh/gitea.ed25519";
|
||||
};
|
||||
};
|
||||
ssh.clonePort = 2222;
|
||||
}
|
||||
23
zsh.nix
Normal file
23
zsh.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
with import <nixpkgs> {};
|
||||
|
||||
{
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
source ${pkgs.grml-zsh-config}/etc/zsh/zshrc
|
||||
# Make user colour green in prompt instead of default blue
|
||||
#zstyle ':prompt:grml:left:items:user' pre '%F{green}%B'
|
||||
export QUOTING_STYLE=literal
|
||||
'';
|
||||
promptInit = ""; # otherwise it'll override the grml prompt
|
||||
syntaxHighlighting.enable = true;
|
||||
autosuggestions = {
|
||||
enable = true;
|
||||
highlightStyle = "fg=cyan";
|
||||
};
|
||||
shellAliases = {
|
||||
"ip" = "ip -c";
|
||||
"nt" = "nixos-rebuild test";
|
||||
"ns" = "nixos-rebuild switch";
|
||||
"nsu" = "nixos-rebuild switch --upgrade";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue