2024-06-24 16:24:21 +00:00
|
|
|
# Modules common to all systems
|
2024-08-23 18:15:54 +00:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
inputs,
|
2024-09-09 03:47:53 +00:00
|
|
|
lib,
|
|
|
|
pkgs,
|
2024-08-23 18:15:54 +00:00
|
|
|
...
|
|
|
|
}:
|
2024-06-24 16:24:21 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
config = {
|
2024-09-08 15:58:56 +00:00
|
|
|
# Install base packages
|
|
|
|
aux.system.packages = with pkgs; [
|
|
|
|
fastfetch # Show a neat system statistics screen when opening a terminal
|
|
|
|
htop # System monitor
|
2024-10-10 16:16:37 +00:00
|
|
|
lm_sensors # System temperature monitoring
|
2024-09-08 15:58:56 +00:00
|
|
|
zellij # Terminal multiplexer
|
|
|
|
];
|
2024-06-24 16:24:21 +00:00
|
|
|
|
2024-09-28 17:18:26 +00:00
|
|
|
# Install the nos helper script
|
2024-10-06 16:13:36 +00:00
|
|
|
aux.system.nixos-operations-script.enable = true;
|
2024-09-28 17:18:26 +00:00
|
|
|
|
2024-08-23 18:15:54 +00:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
(final: _prev: {
|
2024-09-09 03:47:53 +00:00
|
|
|
# Allow packages from the unstable repo by using 'pkgs.unstable'
|
2024-08-23 18:15:54 +00:00
|
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
|
|
system = final.system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
2024-09-09 03:47:53 +00:00
|
|
|
|
|
|
|
# Define custom functions using 'pkgs.util'
|
|
|
|
util = {
|
|
|
|
# Parses the domain from a URL
|
|
|
|
getDomainFromURL =
|
|
|
|
url:
|
|
|
|
let
|
|
|
|
parsedURL = (lib.strings.splitString "." url);
|
|
|
|
in
|
|
|
|
builtins.concatStringsSep "." [
|
|
|
|
(builtins.elemAt parsedURL 1)
|
|
|
|
(builtins.elemAt parsedURL 2)
|
|
|
|
];
|
|
|
|
};
|
2024-08-23 18:15:54 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2024-06-24 16:24:21 +00:00
|
|
|
programs = {
|
2024-09-08 15:58:56 +00:00
|
|
|
# Install ZSH for all users
|
|
|
|
zsh.enable = true;
|
|
|
|
|
2024-06-24 16:24:21 +00:00
|
|
|
# Enable NH, an alternative nixos-rebuild frontend.
|
2024-09-08 15:58:56 +00:00
|
|
|
# https://github.com/viperML/nh
|
2024-06-24 16:24:21 +00:00
|
|
|
nh = {
|
|
|
|
enable = true;
|
|
|
|
flake = "${config.secrets.nixConfigFolder}";
|
|
|
|
};
|
2024-09-08 15:58:56 +00:00
|
|
|
# Configure nano
|
2024-06-24 16:24:21 +00:00
|
|
|
nano.nanorc = ''
|
|
|
|
set tabsize 4
|
|
|
|
set softwrap
|
|
|
|
set autoindent
|
|
|
|
set indicator
|
|
|
|
'';
|
|
|
|
};
|
2024-07-16 17:33:58 +00:00
|
|
|
|
2024-09-08 15:58:56 +00:00
|
|
|
# Set ZSH as the default shell
|
|
|
|
users.defaultUserShell = pkgs.zsh;
|
2024-06-24 16:24:21 +00:00
|
|
|
};
|
|
|
|
}
|