NixOS-Config/nixos/queen/configuration.nix

155 lines
4.1 KiB
Nix
Raw Normal View History

{
inputs,
outputs,
lib,
config,
pkgs,
...
}: {
2023-11-20 11:51:01 +01:00
imports = [
# If you want to use modules your own flake exports (from modules/home-manager):
# outputs.homeManagerModules.example
2023-11-20 11:53:42 +01:00
inputs.home-manager.nixosModules.home-manager
2023-11-20 11:51:01 +01:00
# Or modules exported from other flakes (such as nix-colors):
# inputs.nix-colors.homeManagerModules.default
# You can also split up your configuration and import pieces of it here:
# ./nvim.nix
2023-11-20 11:52:32 +01:00
./hardware-configuration.nix
2023-11-20 11:51:01 +01:00
./nextcloud.nix
];
2023-11-20 12:01:14 +01:00
nixpkgs = {
# You can add overlays here
overlays = [
# Add overlays your own flake exports (from overlays and pkgs dir):
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};
2023-11-20 16:44:23 +01:00
#Set up sops config, and configure where the keyfile is, then set the mode for the unencrypted keys
2023-11-20 16:21:36 +01:00
sops.defaultSopsFile = ../../secrets/queen-Lillian.yaml;
2023-11-20 16:30:40 +01:00
sops.age.keyFile = /home/lillian/.config/sops/age/keys.txt;
2023-11-20 16:19:15 +01:00
sops.secrets."nextcloudadmin".mode = "0400";
sops.secrets."nextclouddb".mode = "0400";
2023-11-20 16:17:34 +01:00
nix = {
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
# This will add each flake input as a registry
# To make nix3 commands consistent with your flake
registry = lib.mapAttrs (_: value: {flake = value;}) inputs;
# This will additionally add your inputs to the system's legacy channels
# Making legacy nix commands consistent as well, awesome!
nixPath = lib.mapAttrsToList (key: value: "${key}=${value.to.path}") config.nix.registry;
settings = {
# Enable flakes and new 'nix' command
experimental-features = "nix-command flakes";
# Deduplicate and optimize nix store
auto-optimise-store = true;
};
};
environment.systemPackages = with pkgs; [
age
alejandra
git-filter-repo
home-manager
2023-11-20 12:02:38 +01:00
nextcloud27
2023-11-20 11:51:01 +01:00
nginx
noto-fonts
noto-fonts-emoji-blob-bin
noto-fonts-emoji
oh-my-zsh
2023-11-20 20:26:17 +01:00
mariadb_110
rsync
wget
zsh
];
# Enable networking
networking.networkmanager.enable = true;
2023-11-19 23:20:16 +01:00
networking.firewall.allowedTCPPorts = [80 443];
# Set your time zone.
time.timeZone = "Europe/Amsterdam";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "nl_NL.UTF-8";
LC_IDENTIFICATION = "nl_NL.UTF-8";
LC_MEASUREMENT = "nl_NL.UTF-8";
LC_MONETARY = "nl_NL.UTF-8";
LC_NAME = "nl_NL.UTF-8";
LC_NUMERIC = "nl_NL.UTF-8";
LC_PAPER = "nl_NL.UTF-8";
LC_TELEPHONE = "nl_NL.UTF-8";
LC_TIME = "nl_NL.UTF-8";
};
programs.zsh = {
enable = true;
};
2023-11-19 23:20:16 +01:00
security.acme = {
acceptTerms = true;
# Replace the email here!
email = "letsencrypt@gladtherescake.eu";
};
users.users = {
lillian = {
isNormalUser = true;
extraGroups = ["sudo" "networkmanager" "wheel" "vboxsf"];
shell = pkgs.zsh;
};
2023-11-20 16:30:00 +01:00
nextcloud.extraGroups = [config.users.groups.keys.name];
};
# Enable completion of system packages by zsh
environment.pathsToLink = ["/share/zsh"];
home-manager = {
extraSpecialArgs = {inherit inputs outputs;};
users = {
# Import your home-manager configuration
lillian = import ../../home-manager/queen-Lillian.nix;
};
};
networking.hostName = "queen";
2023-11-20 12:01:14 +01:00
#TODO: see if this bootloader works on the vps and if not replace it!
boot.loader.systemd-boot.enable = true;
boot.loader.systemd-boot.configurationLimit = 3;
boot.loader.efi.canTouchEfiVariables = true;
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
2023-11-20 11:55:27 +01:00
system.stateVersion = "23.05";
}