refactor: attempting to merge nix-starter-configs and chfour's nixos config together

This commit is contained in:
Ruben 2024-04-17 20:52:32 -05:00
commit ffc95db1f8
No known key found for this signature in database
GPG key ID: AE181294E97E4802
13 changed files with 330 additions and 228 deletions

View file

@ -1,98 +0,0 @@
{ config, pkgs, ... }:
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# auto optimize store and experimental features
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
};
# Enable networking
networking.networkmanager.enable = true;
# we're using/prioritizing dnscrypt!
networking.nameservers = [ "127.0.0.1" "::1" ];
# resolved and others conflicts with setting dns here
networking.resolvconf.enable = pkgs.lib.mkForce false;
networking.dhcpcd.extraConfig = "nohook resolv.conf";
services.resolved.enable = false;
# also ensuring that networkmanager doesn't modify dns settings
networking.networkmanager.dns = "none";
# dnscrypt settings
services.dnscrypt-proxy2 = {
enable = true;
settings = {
ipv6_servers = true;
require_dnssec = true;
sources.public-resolvers = {
# of course, sourcing from the main public lists
urls = [
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
];
cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md";
minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3";
};
# You can choose a specific set of servers from https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
# prioritize quad9, then adguard, and cloudflare as last resort
server_names = [ "quad9-dnscrypt-ip4-filter-pri" "quad9-doh-ip4-port443-filter-pri" "quad9-doh-ip6-port443-filter-pri" "adguard-dns-doh" "adguard-dns-ipv6" "cloudflare" "cloudflare-ipv6" ];
};
};
systemd.services.dnscrypt-proxy2.serviceConfig = {
StateDirectory = "dnscrypt-proxy";
};
# enable plymouth because it looks cool :)))
boot.plymouth = {
enable = true;
theme = "bgrt";
};
# Enable CUPS to print documents.
services.printing = {
enable = true;
drivers = with pkgs; [ canon-cups-ufr2 ];
};
services.avahi.enable = true;
services.avahi.nssmdns4 = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# wireplumber exists so, lets *not* use the example session
wireplumber.enable = true;
};
# gnupg is basically required for everything i use
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# virtualization stuff
virtualisation.libvirtd = {
enable = true;
#qemu.runAsRoot = false;
qemu.swtpm.enable = true;
};
virtualisation.spiceUSBRedirection.enable = true;
# waydroid
virtualisation.waydroid.enable = true;
}

View file

@ -1,33 +0,0 @@
{ config, pkgs, ... }:
{
# List packages installed in system profile. To search, run:
# $ nix search wget
#
# enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
# git is required for flakes, and either way i use it
git
wget
curl
jq
imagemagick
ffmpeg
virt-manager
];
# set the default editor to neovim
environment.variables.EDITOR = "nvim";
# we like flatpaks
services.flatpak.enable = true;
# steam
programs.steam = {
enable = true;
};
# android debugging tools
programs.adb.enable = true;
}

View file

@ -1,42 +0,0 @@
{ pkgs, ... }:
{
# so, funny thing i learned - "xserver" is basically the blanket term for all gui stuff in nixos.
# this really confuses me, because i'm trying to keep xorg out of this install and only wayland in.
# i may miss some spots though.
# see: https://www.reddit.com/r/NixOS/comments/17ia1g8/i_dont_understand_nixoss_wayland_setup/
services.xserver.enable = true;
# use sddm and only use its wayland session
services.displayManager.sddm.enable = true;
services.displayManager.sddm.wayland.enable = true;
# default to plasma wayland session
services.displayManager.defaultSession = "plasma";
# gyattde rizzma 6
services.desktopManager.plasma6 = {
enable = true;
};
programs.xwayland.enable = true;
# we use flatpak
programs.firefox.enable = false;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
};
# don't install some of the default packages since i don't need them
environment.plasma6.excludePackages = with pkgs.kdePackages; [
plasma-browser-integration
#konsole
#oxygen
];
# ensure we have dconf enabled
programs.dconf.enable = true;
# this enables the ozone stuff on wayland for chromium and electron and shit
environment.variables.NIXOS_OZONE_WL = "1";
}