From 018cf09776c53d967a5b9ce558c1c8766c0400ab Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Sat, 3 Jul 2021 22:42:24 -0600 Subject: [PATCH] Add minimal.nix --- nixos/minimal.nix | 255 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 255 insertions(+) create mode 100644 nixos/minimal.nix diff --git a/nixos/minimal.nix b/nixos/minimal.nix new file mode 100644 index 00000000..3e09fd25 --- /dev/null +++ b/nixos/minimal.nix @@ -0,0 +1,255 @@ +{ config, pkgs, options, ... }: +{ + + nixpkgs.overlays = [ + (import ./overlays.nix) + (import ../dotfiles/config/taffybar/taffybar/overlay.nix) + (import ../dotfiles/config/xmonad/overlay.nix) + (import ../dotfiles/config/taffybar/overlay.nix) + ]; + + # Allow all the things + nixpkgs.config.allowUnfree = true; + + # Disabling these waits disables the stuck on boot up issue + systemd.services.systemd-udev-settle.enable = false; + systemd.services.NetworkManager-wait-online.enable = false; + networking.firewall.enable = false; + + # Security + security.sudo.wheelNeedsPassword = false; + programs.gnupg.agent = { enable = true; enableSSHSupport = true; }; + services.pcscd.enable = true; + + # Networking + environment.etc."ipsec.secrets".text = '' + include ipsec.d/ipsec.nm-l2tp.secrets + ''; + networking.networkmanager = { + enable = true; + }; + + # Audio + sound.enable = true; + hardware.pulseaudio.enable = true; + + # Video + hardware.opengl.driSupport32Bit = true; + + # Bluetooth + hardware.bluetooth.enable = true; + services.blueman.enable = true; + + # Keyboard + console.keyMap = "us"; + + fonts = { + fonts = with pkgs; [ + dejavu_fonts + emojione + fira-mono + font-awesome-ttf + noto-fonts-emoji + roboto + source-code-pro + source-sans-pro + source-serif-pro + # twemoji-color-font + ]; + fontconfig = { + allowBitmaps = true; + useEmbeddedBitmaps = true; + defaultFonts = { + monospace = [ "Source Code Pro" ]; + sansSerif = [ "Roboto" ]; + serif = [ "Source Serif Pro" ]; + }; + }; + }; + + environment.systemPackages = with pkgs; [ + + # Applications + alacritty + emacs + firefox + google-chrome + yubikey-manager + + + # Haskell Desktop + haskellPackages.imalison-xmonad + haskellPackages.imalison-taffybar + # notifications-tray-icon + haskellPackages.status-notifier-item + haskellPackages.xmonad + haskellPackages.dbus-hslogger + + # Desktop + autorandr + libnotify + lxqt.lxqt-powermanagement + networkmanagerapplet + notify-osd-customizable + pasystray + picom + pinentry + pommed_light + rofi + rofi-pass + rofi-systemd + udiskie + volnoti + + # xorg + wmctrl + xclip + xdotool + xorg.xev + xorg.xkbcomp + xorg.xwininfo + xsettingsd + + + # Haskell + cabal-install + cabal2nix + ghc + # stack + haskellPackages.hpack + haskellPackages.hasktags + haskellPackages.hoogle + + # Rust + cargo + rustc + rustfmt + + # Tools + automake + bind + binutils + cmake + dex + direnv + dpkg + fd + file + gcc + gdb + gitAndTools.git-crypt + gitAndTools.git-extras + gitAndTools.hub + gitFull + glxinfo + gnumake + gnupg + gparted + htop + inetutils + inotify-tools + ispell + jq + libtool + lsof + ncdu + openvpn + parallel + pass + patchelf + pciutils + prometheus + pscircle + pstree + qt5.qttools + rcm + scrot + silver-searcher + stow + swig + tmux + tzupdate + unzip + usbutils + valgrind + wget + yubikey-manager + + # Nix + nix-prefetch-git + cachix + + # Miscellaneous + android-udev-rules + librsvg + ]; + + programs.zsh.enable = true; + + # TODO: Add a comment explaining what this does. + services.gnome.at-spi2-core.enable = true; + + services.xserver = { + exportConfiguration = true; + enable = true; + layout = "us"; + desktopManager = { + plasma5.enable = true; + }; + windowManager = { + session = [ + { + name = "xmonad"; + start = '' + /usr/bin/env imalison-xmonad & + waitPID=$! + ''; + } + ]; + }; + displayManager = { + sddm = { + enable = true; + }; + sessionCommands = '' + systemctl --user import-environment GDK_PIXBUF_MODULE_FILE DBUS_SESSION_BUS_ADDRESS PATH + ''; + }; + }; + + users.extraUsers = let + extraGroups = [ + "audio" + "adbusers" + "disk" + "docker" + "networkmanager" + "plugdev" + "systemd-journal" + "video" + "wheel" + ]; + userDefaults = { + inherit extraGroups; + group = "users"; + isNormalUser = true; + createHome = true; + shell = pkgs.zsh; + }; + in { + imalison = userDefaults // { + name = "imalison"; + uid = 1000; + home = "/home/imalison"; + shell = pkgs.zsh; + }; + kat = userDefaults // { + name = "kat"; + uid = 1001; + home = "/home/kat"; + shell = pkgs.zsh; + }; + }; + + nix.trustedUsers = ["imalison" "kat"]; +}