nix/system/configuration.nix
2023-04-12 13:30:06 +01:00

162 lines
3.9 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
nix.settings.trusted-users = [ "root" "tristan" ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
# boot.loader.grub.enable = true;
# boot.loader.grub.version = 2;
# boot.loader.grub.devices = ["nodev"];
# boot.loader.grub.useOSProber = true;
# boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "zenix";
networking.networkmanager.enable = true;
time.timeZone = "Europe/London";
i18n.defaultLocale = "en_GB.UTF-8";
console = {
font = "Lat2-Terminus16";
};
# use pipewire
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
security.pam.services.swaylock = {};
security.doas.enable = true;
# Configure graphical stuff
services.xserver = {
enable = false;
layout = "gb";
libinput.enable = true;
};
qt5.enable = true;
qt5.platformTheme = "gtk2";
qt5.style = "gtk2";
services.printing.enable = true;
# services.flatpak.enable = true;
xdg.portal.enable = true;
users.users.tristan = {
isNormalUser = true;
extraGroups = [ "wheel" "video" ];
initialPassword = "pass";
shell = pkgs.fish;
};
environment.variables = {
EDITOR = "nvim";
VISUAL = "nvim";
TERMINAL = "foot";
};
environment.systemPackages = with pkgs; [
foot
brave
tealdeer
alsa-utils
wofi
waybar
swaylock-effects
swayidle
bitwarden-cli
bitwarden
pcmanfm
pavucontrol
exa
(neovim.override {
vimAlias = true;
configure = {
packages.myPlugins = with pkgs.vimPlugins; {
start = [ vim-surround vim-commentary vim-nix ];
opt = [];
};
customRC = ''
vnoremap * y/\V<C-R>=escape(@",'/\')<CR><CR>
vnoremap <C-R> "ry:%s/<C-R>=escape(@r,'/\')<CR>
vnoremap A :norm A
set number
set rnu
set ignorecase
set smartcase
set mouse=a
set path=.,**
let g:netrw_banner=0
let g:netrw_liststyle=3
set undofile
set undodir=~/.local/share/nvim/undo
'';
};
})
];
services.dbus.enable = true;
programs.light.enable = true;
programs.dconf.enable = true;
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh.enable = true;
services.tailscale.enable = true;
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [ ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
networking.firewall.checkReversePath = "loose";
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
system.stateVersion = "22.11"; # Did you read the comment?
}