Files
nixos/configs/common.nix

318 lines
6.0 KiB
Nix

{
config,
lib,
pkgs,
inputs,
...
}:
{
imports = [
/etc/nixos/hardware-configuration.nix
];
# Allow Nix command and flakes (ofc)
nix.settings = {
cores = 6;
experimental-features = [
"nix-command"
"flakes"
];
};
# Allow unfree packages
nixpkgs = {
config = {
allowUnfree = true;
packageOverrides = pkgs: {
unstable = import (fetchTarball "https://github.com/NixOS/nixpkgs/archive/nixos-unstable.tar.gz") {
config = {
allowUnfree = true;
};
};
};
};
};
# Nix store shit
nix.optimise.automatic = true;
nix.gc = {
automatic = true;
dates = "daily";
options = "--delete-older-than 5d";
};
# Boot
boot = {
loader = {
timeout = 2;
efi = {
canTouchEfiVariables = true;
};
grub = {
efiSupport = true;
device = "nodev";
theme = pkgs.catppuccin-grub;
};
};
plymouth = {
enable = true;
theme = "catppuccin-mocha";
themePackages = with pkgs; [
# By default we would install all themes
(catppuccin-plymouth.override {
variant = "mocha";
})
];
};
};
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
networking.networkmanager.enable = true;
networking.networkmanager.dns = "none";
networking.nameservers = [
"1.1.1.1"
"8.8.8.8"
];
# Enable bluetooth
hardware.bluetooth.enable = true;
hardware.xpadneo.enable = true;
# Set your time zone.
time.timeZone = "Europe/London";
# Locale
i18n.defaultLocale = "en_GB.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_GB.UTF-8";
LC_IDENTIFICATION = "en_GB.UTF-8";
LC_MEASUREMENT = "en_GB.UTF-8";
LC_MONETARY = "en_GB.UTF-8";
LC_NAME = "en_GB.UTF-8";
LC_NUMERIC = "en_GB.UTF-8";
LC_PAPER = "en_GB.UTF-8";
LC_TELEPHONE = "en_GB.UTF-8";
LC_TIME = "en_GB.UTF-8";
};
# Windowing Systems
services.xserver.enable = true;
programs.hyprland = {
enable = true;
package = pkgs.unstable.hyprland;
};
security.polkit.enable = true;
# Keymap
services.xserver.xkb = {
layout = "gb";
variant = "";
};
console.keyMap = "uk";
# Pipewire
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
# Local User
users.users.user01 = {
isNormalUser = true;
shell = pkgs.zsh;
description = "user01";
extraGroups = [
"input"
"root"
"plugdev"
"bluetooth"
"networkmanager"
"docker"
"wheel"
];
packages =
with pkgs;
let
input =
{
package,
output ? "default",
}:
inputs.${package}.packages.${pkgs.stdenv.hostPlatform.system}.${output};
wrap =
{
name,
pkg,
modules,
}:
pkgs.symlinkJoin {
inherit name;
paths = [ pkg ];
nativeBuildInputs = [ pkgs.makeWrapper ];
postBuild = ''
wrapProgram $out/bin/${name} \
--prefix PATH : ${pkgs.lib.makeBinPath modules}
'';
};
in
[
# Ricing
bibata-cursors
catppuccin-gtk
waybar
hyprlock
cava
cmatrix
swaynotificationcenter
(input {
package = "chataigne";
})
wlogout
wpaperd
kando
oh-my-posh
grimblast
(wrap {
name = "otter-launcher";
pkg = (
input {
package = "otter-launcher";
}
);
modules = [
chafa
jq
];
})
(input {
package = "fsel";
})
# Terminal
carapace
bat
kitty
wl-clipboard
p7zip-rar
wget
playerctl
git
fastfetch
zellij
lsd
(input {
package = "doot";
})
fzf
ripgrep
zsh-autocomplete
nodejs
lazygit
tailscale
# Thunar stuff
xfce.thunar
xfce.thunar-volman
xfce.thunar-vcs-plugin
xfce.thunar-archive-plugin
# Apps
pavucontrol
firefox
htop
input-remapper
tor-browser
gotify-desktop
techmino
mpv
prismlauncher
delfin
onlyoffice-desktopeditors
syncthing
blueman
jellyfin-tui
];
};
# Zsh
programs.zsh = {
enable = true;
enableCompletion = true;
enableBashCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
histSize = 10000;
ohMyZsh = {
enable = true;
plugins = [
"git"
"dirhistory"
"history"
];
};
};
# User programs
programs.dconf.enable = true;
programs.xfconf.enable = true;
# User Services
services.gvfs.enable = true;
services.input-remapper.enable = true;
services.tailscale.enable = true;
services.printing.enable = true;
services.upower.enable = true;
services.openssh.enable = true;
services.avahi.enable = true;
# Fonts
fonts.packages = with pkgs; [
nerd-fonts.fira-mono
];
fonts.fontconfig.defaultFonts.serif = [ "Fira Mono Nerd Font" ];
environment.systemPackages = with pkgs; [
inputs.nvim-wrapped.packages.${stdenv.hostPlatform.system}.default
vim
unzip
python310 # Its python like come on
usbutils
curlWithGnuTls
# Graphics Drivers
mesa
vulkan-tools
# FileSystem Dependancies
gvfs
# C copmpiler
clang
# XDG Desktop Portal Etc
xdg-desktop-portal
xdg-desktop-portal-hyprland
# Other things (from gnome)
glib
gnutls
liblzf
appimage-run
libnotify
gsettings-desktop-schemas
];
# The comment
system.stateVersion = "25.05"; # Did you read the comment?
}