2022-09-10 01:35:06 +00:00
|
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
|
|
|
2022-06-10 02:06:39 +00:00
|
|
|
|
|
|
|
|
|
{
|
|
|
|
|
imports =
|
|
|
|
|
[ # Include the results of the hardware scan.
|
2022-06-20 03:06:53 +00:00
|
|
|
|
./hardware-configuration.nix
|
|
|
|
|
./gaming-configuration.nix
|
|
|
|
|
./sway-configuration.nix
|
2022-06-10 02:06:39 +00:00
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# This value determines the NixOS release from which the default
|
|
|
|
|
# settings for stateful data, like file locations and database versions
|
|
|
|
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
|
|
|
|
# this value at the release version of the first install of this system.
|
|
|
|
|
# Before changing this value read the documentation for this option
|
|
|
|
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
|
|
|
|
system.stateVersion = "22.05"; # Did you read the comment?
|
|
|
|
|
|
|
|
|
|
# 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;
|
|
|
|
|
|
2022-09-10 01:35:06 +00:00
|
|
|
|
system.autoUpgrade.enable = true;
|
|
|
|
|
system.autoUpgrade.allowReboot = true;
|
|
|
|
|
|
2022-06-12 01:24:12 +00:00
|
|
|
|
|
2022-06-10 02:06:39 +00:00
|
|
|
|
# Use the systemd-boot EFI boot loader.
|
|
|
|
|
boot.loader.systemd-boot.enable = true;
|
|
|
|
|
boot.loader.efi.canTouchEfiVariables = true;
|
|
|
|
|
|
2022-09-10 01:35:06 +00:00
|
|
|
|
networking.hostName = "nixos"; # Define your hostname.
|
2022-06-10 02:06:39 +00:00
|
|
|
|
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
2022-06-20 03:06:53 +00:00
|
|
|
|
#networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
|
|
|
|
|
|
|
|
|
|
services.connman.enable = true;
|
|
|
|
|
networking.wireless.iwd.enable = true;
|
|
|
|
|
services.connman.wifi.backend = "iwd";
|
|
|
|
|
|
|
|
|
|
# Open ports in the firewall.
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 67 68 53 ];
|
|
|
|
|
networking.firewall.allowedTCPPortRanges = [
|
|
|
|
|
{ from = 56881; to = 56889; }
|
|
|
|
|
{ from = 27036; to = 27037; }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# networking.firewall.allowedUDPPorts = [ ... ];
|
|
|
|
|
networking.firewall.allowedUDPPortRanges = [
|
|
|
|
|
{ from = 27000; to = 27036; }
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
# Or disable the firewall altogether.
|
|
|
|
|
# networking.firewall.enable = false;
|
|
|
|
|
|
|
|
|
|
|
2022-06-10 02:06:39 +00:00
|
|
|
|
|
|
|
|
|
# Set your time zone.
|
|
|
|
|
time.timeZone = "America/Chicago";
|
|
|
|
|
|
|
|
|
|
# Configure network proxy if necessary
|
|
|
|
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
|
|
|
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
|
|
|
|
|
|
|
|
|
# Select internationalisation properties.
|
|
|
|
|
i18n.defaultLocale = "en_US.UTF-8";
|
|
|
|
|
console = {
|
|
|
|
|
font = "Lat2-Terminus16";
|
|
|
|
|
#keyMap = "us";
|
|
|
|
|
useXkbConfig = true; # use xkbOptions in tty.
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#Define a user account. Don't forget to set a password with ‘passwd’.
|
|
|
|
|
users.users.alex = {
|
|
|
|
|
isNormalUser = true;
|
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
|
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
|
|
|
|
packages = with pkgs; [
|
|
|
|
|
librewolf
|
|
|
|
|
yt-dlp
|
|
|
|
|
zathura
|
|
|
|
|
sfeed
|
2022-09-10 01:35:06 +00:00
|
|
|
|
ungoogled-chromium
|
|
|
|
|
firefox
|
2022-06-10 02:06:39 +00:00
|
|
|
|
];
|
|
|
|
|
};
|
|
|
|
|
|
2022-07-01 16:08:49 +00:00
|
|
|
|
security.sudo.extraRules = [{
|
|
|
|
|
runAs = "root";
|
|
|
|
|
groups = [ "wheel" ];
|
|
|
|
|
commands = [{
|
|
|
|
|
command = "/run/current-system/sw/bin/poweroff";
|
|
|
|
|
options = [ "NOPASSWD" ];
|
|
|
|
|
} {
|
|
|
|
|
command = "/run/current-system/sw/bin/reboot";
|
|
|
|
|
options = [ "NOPASSWD" ];
|
|
|
|
|
}];
|
|
|
|
|
}];
|
|
|
|
|
|
2022-06-10 02:06:39 +00:00
|
|
|
|
# Some programs need SUID wrappers, can be configured further or are
|
|
|
|
|
# started in user sessions.
|
|
|
|
|
programs.mtr.enable = true;
|
|
|
|
|
|
|
|
|
|
services.pcscd.enable = true;
|
|
|
|
|
programs.gnupg.agent = {
|
|
|
|
|
enable = true;
|
|
|
|
|
pinentryFlavor = "curses";
|
|
|
|
|
enableSSHSupport = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
|
glib # gsettings
|
|
|
|
|
dracula-theme # gtk theme
|
2022-09-10 01:35:06 +00:00
|
|
|
|
flat-remix-gtk
|
2022-06-10 02:06:39 +00:00
|
|
|
|
gnome3.adwaita-icon-theme # default gnome cursors
|
2022-09-10 01:35:06 +00:00
|
|
|
|
papirus-icon-theme
|
2022-06-10 02:06:39 +00:00
|
|
|
|
noto-fonts
|
|
|
|
|
noto-fonts-extra
|
|
|
|
|
noto-fonts-emoji
|
|
|
|
|
noto-fonts-cjk-sans
|
2022-09-10 01:35:06 +00:00
|
|
|
|
nerdfonts
|
|
|
|
|
zsh
|
2022-06-10 02:06:39 +00:00
|
|
|
|
zip
|
|
|
|
|
unzip
|
|
|
|
|
p7zip
|
|
|
|
|
pavucontrol
|
|
|
|
|
pamixer
|
|
|
|
|
pulsemixer
|
|
|
|
|
imagemagick
|
|
|
|
|
ffmpegthumbnailer
|
|
|
|
|
file
|
|
|
|
|
viu
|
|
|
|
|
bat
|
|
|
|
|
pavucontrol
|
|
|
|
|
neovim
|
|
|
|
|
pfetch
|
|
|
|
|
htop-vim
|
|
|
|
|
lf
|
|
|
|
|
mpv
|
|
|
|
|
mpd
|
|
|
|
|
ncmpcpp
|
|
|
|
|
libnotify
|
|
|
|
|
lynx
|
|
|
|
|
mutt-wizard
|
|
|
|
|
pass
|
|
|
|
|
neomutt
|
|
|
|
|
notmuch
|
|
|
|
|
isync
|
|
|
|
|
pinentry-curses
|
2022-06-20 03:06:53 +00:00
|
|
|
|
connman-gtk
|
|
|
|
|
openssl
|
|
|
|
|
git
|
|
|
|
|
shellcheck
|
|
|
|
|
jq
|
2022-07-01 16:08:49 +00:00
|
|
|
|
monero-cli
|
2022-09-10 01:35:06 +00:00
|
|
|
|
monero-gui
|
2022-07-01 16:08:49 +00:00
|
|
|
|
bc
|
|
|
|
|
gnome.zenity
|
|
|
|
|
cura
|
|
|
|
|
udisks2
|
|
|
|
|
udiskie
|
|
|
|
|
python3
|
|
|
|
|
python3.pkgs.pip
|
2022-09-10 01:35:06 +00:00
|
|
|
|
wget
|
|
|
|
|
ani-cli
|
|
|
|
|
keepassxc
|
|
|
|
|
appimage-run
|
|
|
|
|
fuse
|
|
|
|
|
lxappearance
|
|
|
|
|
gtk-engine-murrine
|
|
|
|
|
gtk_engines
|
|
|
|
|
img2pdf #dep of manga-cli
|
|
|
|
|
pcmanfm
|
|
|
|
|
steam-run
|
2022-06-10 02:06:39 +00:00
|
|
|
|
];
|
|
|
|
|
|
2022-09-10 01:35:06 +00:00
|
|
|
|
|
|
|
|
|
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
|
|
|
|
|
"steam-original"
|
|
|
|
|
"steam-run"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fonts = {
|
|
|
|
|
|
|
|
|
|
fonts = with pkgs; [
|
|
|
|
|
noto-fonts
|
|
|
|
|
noto-fonts-extra
|
|
|
|
|
noto-fonts-emoji
|
|
|
|
|
noto-fonts-cjk-sans
|
|
|
|
|
nerdfonts
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
fontconfig = {
|
|
|
|
|
defaultFonts = {
|
|
|
|
|
serif = [ "Noto Serif" ];
|
|
|
|
|
sansSerif = [ "Noto Sans" ];
|
|
|
|
|
monospace = [ "Mononoki Nerd Font" ];
|
|
|
|
|
};
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2022-06-20 03:06:53 +00:00
|
|
|
|
#enable flatpak
|
|
|
|
|
services.flatpak.enable = true;
|
2022-06-10 02:06:39 +00:00
|
|
|
|
|
2022-09-10 01:35:06 +00:00
|
|
|
|
services.udisks2.enable = true;
|
|
|
|
|
|
2022-06-10 02:06:39 +00:00
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
|
services.pipewire = {
|
|
|
|
|
enable = true;
|
|
|
|
|
alsa.enable = true;
|
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
|
pulse.enable = true;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
services.pipewire.wireplumber.enable = true;
|
|
|
|
|
|
|
|
|
|
# xdg-desktop-portal works by exposing a series of D-Bus interfaces
|
|
|
|
|
# known as portals under a well-known name
|
|
|
|
|
# (org.freedesktop.portal.Desktop) and object path
|
|
|
|
|
# (/org/freedesktop/portal/desktop).
|
|
|
|
|
# The portal interfaces include APIs for file access, opening URIs,
|
|
|
|
|
# printing and others.
|
|
|
|
|
services.dbus.enable = true;
|
|
|
|
|
xdg.portal = {
|
|
|
|
|
enable = true;
|
|
|
|
|
wlr.enable = true;
|
|
|
|
|
# gtk portal needed to make gtk apps happy
|
|
|
|
|
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
|
2022-09-10 01:35:06 +00:00
|
|
|
|
#gtkUsePortal = true;
|
2022-06-10 02:06:39 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|