657 lines
14 KiB
Nix
657 lines
14 KiB
Nix
{ config, pkgs, ... }:
|
||
|
||
{
|
||
imports =
|
||
[
|
||
./hardware-configuration.nix
|
||
];
|
||
|
||
nix = {
|
||
extraOptions = "experimental-features = nix-command flakes";
|
||
package = pkgs.nixVersions.unstable;
|
||
};
|
||
|
||
|
||
# Use the systemd-boot EFI boot loader.
|
||
boot = {
|
||
kernelPackages = pkgs.linuxPackages_zen;
|
||
kernelParams = [ "mem_sleep_default=deep" ];
|
||
initrd.kernelModules = [ "amdgpu" ];
|
||
loader = {
|
||
systemd-boot.enable = true;
|
||
efi.canTouchEfiVariables = true;
|
||
};
|
||
};
|
||
|
||
nixpkgs.config.allowUnfree = true;
|
||
|
||
networking.hostName = "kaladin"; # Define your hostname.
|
||
networking.networkmanager.enable = true;
|
||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||
|
||
# Set your time zone.
|
||
time.timeZone = "America/Chicago";
|
||
|
||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||
# replicates the default behaviour.
|
||
networking.useDHCP = false;
|
||
networking.interfaces.enp0s31f6.useDHCP = true;
|
||
networking.interfaces.wlp7s0.useDHCP = true;
|
||
|
||
virtualisation.podman.enable = true;
|
||
# virtualisation.docker.enable = true;
|
||
virtualisation.libvirtd = {
|
||
enable = true;
|
||
qemu = {
|
||
runAsRoot = false;
|
||
ovmf = {
|
||
enable = true;
|
||
packages = [
|
||
pkgs.OVMFFull.fd
|
||
pkgs.pkgsCross.aarch64-multiplatform.OVMF.fd
|
||
];
|
||
};
|
||
swtpm.enable = true;
|
||
};
|
||
};
|
||
|
||
# Select internationalisation properties.
|
||
i18n.defaultLocale = "en_US.UTF-8";
|
||
|
||
# Set default shell to be dash for speed
|
||
# environment.binsh = "${pkgs.dash}/bin/dash";
|
||
|
||
# NVIDIA
|
||
services.xserver.videoDrivers = [ "nvidia" ];
|
||
hardware = {
|
||
opengl = {
|
||
enable = true;
|
||
extraPackages = with pkgs; [
|
||
vaapiVdpau
|
||
libvdpau-va-gl
|
||
];
|
||
};
|
||
nvidia = {
|
||
package = config.boot.kernelPackages.nvidiaPackages.latest;
|
||
modesetting.enable = true;
|
||
powerManagement.enable = true;
|
||
};
|
||
};
|
||
|
||
services.xserver.screenSection = ''
|
||
Option "metamodes" "nvidia-auto-select +0+0 {ForceFullCompositionPipeline=On}"
|
||
Option "AllowIndirectGLXProtocol" "off"
|
||
Option "TripleBuffer" "on"
|
||
'';
|
||
|
||
# This adds hyprland cache to cachix
|
||
nix.settings = {
|
||
substituters = ["https://hyprland.cachix.org"];
|
||
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
|
||
};
|
||
|
||
boot.supportedFilesystems = [ "ntfs" ];
|
||
services.xserver = {
|
||
enable = true;
|
||
autorun = false;
|
||
windowManager.awesome = {
|
||
enable = true;
|
||
package = pkgs.awesome;
|
||
};
|
||
displayManager = {
|
||
startx.enable = true;
|
||
sddm = {
|
||
enable = false;
|
||
};
|
||
session = [
|
||
{
|
||
manage = "desktop";
|
||
name = "Hyprland";
|
||
start = ''
|
||
/home/chris/bin/hyprland &
|
||
waitPID=$!
|
||
'';
|
||
}
|
||
];
|
||
};
|
||
desktopManager.plasma5 = {
|
||
enable = true;
|
||
runUsingSystemd = true;
|
||
};
|
||
# desktopManager.gnome.enable = true;
|
||
};
|
||
|
||
services.greetd = {
|
||
enable = true;
|
||
settings = rec {
|
||
initial_session = {
|
||
command = "/home/chris/bin/hyprland";
|
||
user = "chris";
|
||
};
|
||
default_session = {
|
||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time -r --window-padding 2 --cmd /home/chris/bin/hyprland";
|
||
user = "greeter";
|
||
};
|
||
plasma_session = {
|
||
command = "dbus-run-session startplasma-wayland";
|
||
user = "chris";
|
||
};
|
||
hyprland_session = {
|
||
command = "/home/chris/bin/hyprland";
|
||
user = "chris";
|
||
};
|
||
};
|
||
};
|
||
|
||
environment.etc."greetd/environments".text = ''
|
||
/home/chris/bin/hyprland
|
||
fish
|
||
bash
|
||
dbus-run-session startplasma-wayland
|
||
'';
|
||
|
||
programs.hyprland = {
|
||
enable = true;
|
||
};
|
||
|
||
services.avahi = {
|
||
enable = true;
|
||
nssmdns = true;
|
||
};
|
||
|
||
# Configure keymap in X11
|
||
services.xserver.layout = "us";
|
||
# services.xserver.xkbOptions = "eurosign:e";
|
||
|
||
# Enable CUPS to print documents.
|
||
services.printing.enable = true;
|
||
services.printing.drivers = [ pkgs.gutenprint pkgs.gutenprintBin pkgs.hplipWithPlugin ];
|
||
|
||
# Enable sound.
|
||
security.rtkit.enable = true;
|
||
services.pipewire = {
|
||
enable = true;
|
||
alsa.enable = true;
|
||
alsa.support32Bit = true;
|
||
pulse.enable = true;
|
||
wireplumber.enable = true;
|
||
};
|
||
|
||
# Needed for some pipewire progs and other gtk apps
|
||
programs.dconf.enable = true;
|
||
|
||
# Turn on flatpak
|
||
services.flatpak.enable = true;
|
||
|
||
services.usbmuxd.enable = true;
|
||
services.fstrim.enable = true;
|
||
|
||
# Set default shell to be dash for speed
|
||
# Apparently this is bad because a lot of nix relies on bash
|
||
# environment.binsh = "${pkgs.dash}/bin/dash";
|
||
|
||
environment.homeBinInPath = true;
|
||
programs.fish.enable = true;
|
||
programs.zsh.enable = true;
|
||
|
||
environment.variables = {
|
||
EDITOR = "emacsclient -t -a";
|
||
VISUAL = "emacsclient -c -a";
|
||
# Fixing Qt apps in other environments
|
||
# Thought I needed this but apparently they are working fine without it.
|
||
# QT_XCB_GL_INTEGRATION = "xcb_egl";
|
||
# QT_QPA_PLATFORM_PLUGIN_PATH = "${pkgs.qt5.qtbase.bin}/lib/qt-${pkgs.qt5.qtbase.qtCompatVersion}/plugins/platforms";
|
||
WLR_NO_HARDWARE_CURSORS = "1";
|
||
};
|
||
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.chris = {
|
||
isNormalUser = true;
|
||
extraGroups = [ "wheel" "networkmanager" "input" "no-internet" ]; # Enable ‘sudo’ for the user.
|
||
};
|
||
|
||
programs.partition-manager.enable = true;
|
||
programs.kdeconnect.enable = true;
|
||
|
||
security.pam.services.kwallet = {
|
||
name = "kwallet";
|
||
enableKwallet = true;
|
||
};
|
||
security.pam.services.sddm.enableKwallet = true;
|
||
|
||
# virtualisation.waydroid.enable = true;
|
||
|
||
# services.ethminer = {
|
||
# enable = true;
|
||
# pool = "us-eth.2miners.com:2020";
|
||
# toolkit = "cuda";
|
||
# rig = "kaladin";
|
||
# wallet = "0xE43c525d05Ac52303cb43772Eb209824AE328CA3";
|
||
# registerMail = "ceth@cochrun.xyz";
|
||
# };
|
||
|
||
programs.steam = {
|
||
enable = true;
|
||
remotePlay.openFirewall = true;
|
||
dedicatedServer.openFirewall = true;
|
||
};
|
||
|
||
# List packages installed in system profile. To search, run:
|
||
# $ nix search wget
|
||
environment.systemPackages = with pkgs; [
|
||
vim
|
||
wget
|
||
killall
|
||
git
|
||
tmux
|
||
dutree
|
||
cachix
|
||
unzip
|
||
unrar
|
||
p7zip
|
||
zip
|
||
gzip
|
||
usbutils
|
||
binutils
|
||
podman-compose
|
||
exa
|
||
# img2pdf
|
||
yt-dlp
|
||
bat
|
||
rsync
|
||
jq
|
||
ripgrep
|
||
fd
|
||
socat
|
||
ffmpeg-full
|
||
imagemagick
|
||
libheif
|
||
trash-cli
|
||
htop
|
||
btop
|
||
bc
|
||
sysstat
|
||
procs
|
||
pandoc
|
||
samba
|
||
blesh
|
||
# OVMFFull
|
||
quickemu
|
||
discover
|
||
# kde-rounded-corners
|
||
lightly-qt
|
||
pinentry
|
||
pinentry-qt
|
||
hunspell
|
||
caffeine-ng
|
||
hunspellDicts.en_US
|
||
transmission
|
||
openssh
|
||
ark
|
||
ifuse
|
||
dash
|
||
brightnessctl
|
||
dunst
|
||
ttyper
|
||
kget
|
||
audacity
|
||
krename
|
||
kwallet-pam
|
||
plasma5Packages.kwallet
|
||
sierra-breeze-enhanced
|
||
libimobiledevice
|
||
bottles
|
||
# jitsi-meet-electron
|
||
imv
|
||
feh
|
||
tagutil
|
||
python310Packages.mutagen
|
||
python310Packages.audiotools
|
||
mpv
|
||
nerdfonts
|
||
# latte-dock
|
||
plasma-browser-integration
|
||
alacritty
|
||
libsForQt5.bismuth
|
||
libnotify
|
||
rofi-wayland
|
||
wofi
|
||
waybar
|
||
tridactyl-native
|
||
eww-wayland
|
||
wlrctl
|
||
hyprpaper
|
||
swaylock-fancy
|
||
aha
|
||
glxinfo
|
||
vulkan-tools
|
||
wayland-utils
|
||
nextcloud-client
|
||
# mkchromecast
|
||
plocate
|
||
# librepresenter.libre-presenter
|
||
papirus-icon-theme
|
||
phinger-cursors
|
||
plasma-hud
|
||
kde-cli-tools
|
||
gzip
|
||
qrencode
|
||
brave
|
||
scribus
|
||
darktable
|
||
qutebrowser
|
||
virt-manager
|
||
virt-viewer
|
||
# firefox
|
||
kate
|
||
kdialog
|
||
plasma5Packages.khotkeys
|
||
# openlp
|
||
inkscape
|
||
libreoffice-fresh
|
||
vlc
|
||
neochat
|
||
haskellPackages.greenclip
|
||
pulsemixer
|
||
any-nix-shell
|
||
wtype
|
||
xdotool
|
||
# ydotool
|
||
wmctrl
|
||
xcape
|
||
xclip
|
||
maim
|
||
unclutter-xfixes
|
||
bluez-tools
|
||
networkmanager_dmenu
|
||
plasma5Packages.qt5ct
|
||
lxappearance
|
||
spotdl
|
||
kdenlive
|
||
minetest
|
||
# natron
|
||
digikam
|
||
rubberband
|
||
texlive.combined.scheme-full
|
||
wlroots
|
||
picom-next
|
||
pamixer
|
||
playerctl
|
||
jellyfin-mpv-shim
|
||
pfetch
|
||
macchina
|
||
gimp
|
||
powertop
|
||
element-desktop-wayland
|
||
scrcpy
|
||
python
|
||
python3
|
||
airshipper
|
||
# hyprland
|
||
|
||
blender
|
||
neofetch
|
||
# ethminer
|
||
lutris
|
||
protonup
|
||
nvtop
|
||
# Dev tools
|
||
(import /home/chris/.dotfiles/ydotool { inherit lib stdenv util-linux cmake scdoc fetchFromGitHub; })
|
||
# android-tools
|
||
nix-index
|
||
# meson
|
||
# ninja
|
||
# gnumake
|
||
# gcc
|
||
# gdb
|
||
# clang
|
||
# clang-tools
|
||
# cmake
|
||
# qtcreator
|
||
# extra-cmake-modules
|
||
# pkg-config
|
||
# libsForQt5.wrapQtAppsHook
|
||
# python310Packages.pyqt5
|
||
# LIBRARIES FOR DEV
|
||
# qt5.qtbase
|
||
# qt5.qtquickcontrols2
|
||
# qt5.qtx11extras
|
||
# libsForQt5.appstream-qt
|
||
# libsForQt5.kdelibs4support
|
||
# libsForQt5.kirigami2
|
||
# libsForQt5.ki18n
|
||
# libsForQt5.kcoreaddons
|
||
# plasma5Packages.kirigami2
|
||
sqlite
|
||
fennel
|
||
# (libsForQt5.callPackage /home/chris/dev/LightlyShaders {})
|
||
# (libsForQt5.callPackage /home/chris/dev/church-presenter {})
|
||
];
|
||
|
||
# nixpkgs.overlays = [
|
||
|
||
# (import (builtins.fetchTarball {
|
||
# url = https://github.com/nix-community/emacs-overlay/archive/master.tar.gz;
|
||
# sha256 = "1v1n30a2ai5mnlkrkwv4mfczd3601sqxxlawadxariblfvg7qz4j";
|
||
# }))
|
||
|
||
# (self: super:
|
||
# {
|
||
# myAwesome = super.awesome.overrideAttrs (old: rec {
|
||
# pname = "myAwesome";
|
||
# version = "git-20220614-3a54221";
|
||
# src = super.fetchFromGitHub {
|
||
# owner = "awesomeWM";
|
||
# repo = "awesome";
|
||
# rev = "3a542219f3bf129546ae79eb20e384ea28fa9798";
|
||
# sha256 = "4z3w6iuv+Gw2xRvhv2AX4suO6dl82woJn0p1nkEx3uM=";
|
||
# };
|
||
# patches = [];
|
||
# });
|
||
# }
|
||
# )
|
||
#
|
||
# (self: super:
|
||
# {
|
||
# qt5ct = super.qt5ct.overrideAttrs (old: rec {
|
||
# patches = (old.patches or []) ++ [
|
||
# ../../qt5ct.patch
|
||
# ];
|
||
# });
|
||
# }
|
||
# )
|
||
# ];
|
||
|
||
services.emacs = {
|
||
enable = true;
|
||
package = with pkgs; ((emacsPackagesFor emacsPgtk).emacsWithPackages
|
||
(epkgs: with epkgs; [
|
||
vterm
|
||
magit
|
||
pdf-tools
|
||
consult-eglot
|
||
org
|
||
org-roam
|
||
command-log-mode
|
||
all-the-icons
|
||
doom-modeline
|
||
doom-themes
|
||
rainbow-delimiters
|
||
smartparens
|
||
aggressive-indent
|
||
adaptive-wrap
|
||
which-key
|
||
exec-path-from-shell
|
||
no-littering
|
||
tree-sitter
|
||
tree-sitter-langs
|
||
rustic
|
||
evil
|
||
evil-collection
|
||
general
|
||
evil-escape
|
||
evil-surround
|
||
evil-org
|
||
org-super-agenda
|
||
websocket
|
||
org-roam-ui
|
||
org-present
|
||
org-modern
|
||
org-re-reveal
|
||
org-re-reveal-ref
|
||
org-re-reveal-citeproc
|
||
ox-reveal
|
||
oer-reveal
|
||
ox-spectacle
|
||
unicode-fonts
|
||
emojify
|
||
undo-tree
|
||
visual-fill-column
|
||
toc-org
|
||
pulsar
|
||
vertico
|
||
consult
|
||
marginalia
|
||
all-the-icons-completion
|
||
embark
|
||
embark-consult
|
||
corfu
|
||
orderless
|
||
cape
|
||
devdocs
|
||
yasnippet
|
||
tempel
|
||
projectile
|
||
simple-httpd
|
||
avy
|
||
evil-avy
|
||
ace-link
|
||
ace-window
|
||
helpful
|
||
format-all
|
||
web-mode
|
||
lua-mode
|
||
nix-mode
|
||
cmake-mode
|
||
fennel-mode
|
||
yaml-mode
|
||
docker
|
||
docker-tramp
|
||
fish-mode
|
||
markdown-mode
|
||
qml-mode
|
||
csv-mode
|
||
restclient
|
||
ob-restclient
|
||
dart-mode
|
||
flutter
|
||
hover
|
||
direnv
|
||
all-the-icons-dired
|
||
dired-single
|
||
dired-rainbow
|
||
diredfl
|
||
dired-rsync
|
||
fd-dired
|
||
ledger-mode
|
||
org-msg
|
||
calfw
|
||
calfw-org
|
||
calfw-ical
|
||
org-caldav
|
||
org-wild-notifier
|
||
magit
|
||
sly
|
||
nov
|
||
elfeed
|
||
elfeed-org
|
||
bongo
|
||
emms
|
||
transmission
|
||
hass
|
||
pass
|
||
password-store
|
||
password-store-otp
|
||
plz
|
||
ement
|
||
mastodon
|
||
qrencode
|
||
gcmh
|
||
use-package
|
||
esh-autosuggest
|
||
pkgs.mu
|
||
]));
|
||
defaultEditor = true;
|
||
};
|
||
services.samba-wsdd.enable = true;
|
||
services.samba = {
|
||
enable = true;
|
||
extraConfig = ''
|
||
workgroup = WORKGROUP
|
||
server string = smbnix
|
||
netbios name = smbnix
|
||
security = user
|
||
#use sendfile = yes
|
||
#max protocol = smb2
|
||
# note: localhost is the ipv6 localhost ::1
|
||
hosts allow = 192.168.0. 127.0.0.1 localhost
|
||
hosts deny = 0.0.0.0/0
|
||
guest account = nobody
|
||
map to guest = bad user
|
||
'';
|
||
shares = {
|
||
public = {
|
||
path = "/home/chris/Public";
|
||
"read only" = false;
|
||
browsable = true;
|
||
"guest ok" = true;
|
||
comment = "Share";
|
||
};
|
||
};
|
||
};
|
||
|
||
# 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.caddy = {
|
||
# enable = true;
|
||
# virtualHosts = {
|
||
# "videosdani.tfcconnection.org".extraConfig = ''
|
||
# reverse_proxy localhost:9000
|
||
# '';
|
||
# };
|
||
# virtualHosts = {
|
||
# "videosdani.tfcconnection.org:1935".extraConfig = ''
|
||
# reverse_proxy localhost:1935
|
||
# '';
|
||
# };
|
||
# };
|
||
|
||
# Open ports in the firewall.
|
||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
# 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 = "21.11"; # Did you read the comment?
|
||
|
||
}
|