mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
chore: code cleanup
This commit is contained in:
parent
bb59145f85
commit
3eecea6503
42 changed files with 4232 additions and 4479 deletions
|
|
@ -1,7 +1,7 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
|
|
|||
|
|
@ -1,101 +1,70 @@
|
|||
{ config, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
gnupg
|
||||
ssh-to-age
|
||||
calibre
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
gnupg
|
||||
ssh-to-age
|
||||
calibre
|
||||
];
|
||||
|
||||
users.groups.lxc_shares = {
|
||||
gid = 10000;
|
||||
members = [
|
||||
"kavita"
|
||||
"calibre-web"
|
||||
"root"
|
||||
];
|
||||
};
|
||||
users.groups.lxc_shares = {
|
||||
gid = 10000;
|
||||
members = [
|
||||
"kavita"
|
||||
"calibre-web"
|
||||
"root"
|
||||
];
|
||||
};
|
||||
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
services.xserver = {
|
||||
layout = "us";
|
||||
xkbVariant = "altgr-intl";
|
||||
};
|
||||
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
nix.settings.experimental-features = ["nix-command" "flakes"];
|
||||
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
sops.defaultSopsFile = "/.dotfiles/secrets/calibre/secrets.yaml";
|
||||
sops.validateSopsFiles = false;
|
||||
sops.secrets.kavita = { owner = "kavita";};
|
||||
# sops.secrets.smbuser = { };
|
||||
# sops.secrets.smbpassword = { };
|
||||
# sops.secrets.smbdomain = { };
|
||||
# sops.templates."smb.cred".content = ''
|
||||
# user=${config.sops.placeholder.smbuser}
|
||||
# password=${config.sops.placeholder.smbpassword}
|
||||
# domain=${config.sops.placeholder.smbdomain}
|
||||
# '';
|
||||
proxmoxLXC.manageNetwork = true; # manage network myself
|
||||
proxmoxLXC.manageHostName = false; # manage hostname myself
|
||||
networking.hostName = "calibre"; # Define your hostname.
|
||||
networking.useDHCP = true;
|
||||
networking.enableIPv6 = false;
|
||||
networking.firewall.enable = false;
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../../secrets/keys/authorized_keys
|
||||
];
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/sops" ];
|
||||
defaultSopsFile = "/.dotfiles/secrets/calibre/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets.kavita = { owner = "kavita";};
|
||||
};
|
||||
proxmoxLXC = {
|
||||
manageNetwork = true; # manage network myself
|
||||
manageHostName = false; # manage hostname myself
|
||||
};
|
||||
networking = {
|
||||
hostName = "calibre"; # Define your hostname.
|
||||
useDHCP = true;
|
||||
enableIPv6 = false;
|
||||
firewall.enable = false;
|
||||
};
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings.PermitRootLogin = "yes";
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keyFiles = [
|
||||
../../../secrets/keys/authorized_keys
|
||||
];
|
||||
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
system.stateVersion = "23.05"; # TEMPLATE - but probably no need to change
|
||||
|
||||
environment.shellAliases = {
|
||||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
environment.shellAliases = {
|
||||
nswitch = "cd /.dotfiles; git pull; nixos-rebuild --flake .#$(hostname) switch; cd -;";
|
||||
};
|
||||
|
||||
services.kavita = {
|
||||
enable = true;
|
||||
user = "kavita";
|
||||
port = 8080;
|
||||
tokenKeyFile = config.sops.secrets.kavita.path;
|
||||
};
|
||||
|
||||
|
||||
# services.calibre-server = {
|
||||
# enable = true;
|
||||
# user = "calibre-server";
|
||||
# auth.enable = true;
|
||||
# auth.userDb = "/srv/calibre/users.sqlite";
|
||||
# libraries = [
|
||||
# /media/Books/main
|
||||
# /media/Books/diverse
|
||||
# /media/Books/language
|
||||
# /media/Books/science
|
||||
# /media/Books/sport
|
||||
# /media/Books/novels
|
||||
# ];
|
||||
# };
|
||||
|
||||
# services.calibre-web = {
|
||||
# enable = true;
|
||||
# user = "calibre-web";
|
||||
# group = "calibre-web";
|
||||
# listen.port = 8083;
|
||||
# listen.ip = "0.0.0.0";
|
||||
# options = {
|
||||
# enableBookUploading = true;
|
||||
# enableKepubify = true;
|
||||
# enableBookConversion = true;
|
||||
# };
|
||||
# };
|
||||
|
||||
services.kavita = {
|
||||
enable = true;
|
||||
user = "kavita";
|
||||
port = 8080;
|
||||
tokenKeyFile = config.sops.secrets.kavita.path;
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue