{ config, pkgs, lib, ... }: { imports = [ ]; security = { rtkit.enable = true; doas.enable = true; doas.wheelNeedsPassword = false; sudo.wheelNeedsPassword = false; }; boot.kernelPackages = pkgs.linuxPackages_xanmod; boot.kernelParams = [ "nohibernate" "nmi_watchdog=0" "systemd.watchdog-device/dev/watchdog" ]; boot.initrd.supportedFilesystems = [ "zfs" ]; boot.supportedFilesystems = [ "zfs" ]; boot.zfs.devNodes = "/dev/"; boot.zfs.enableUnstable = true; # GRUB bootloader boot.loader.efi.canTouchEfiVariables = true; boot.loader.grub = { enable = true; version = 2; efiSupport = true; configurationLimit = 10; device = "nodev"; useOSProber = true; copyKernels = true; extraEntries = '' menuentry "Reboot" { reboot } menuentry "Shutdown" { halt } ''; }; networking.hostName = "alpha"; networking.hostId = "641a7b10"; networking.networkmanager.enable = true; networking.useDHCP = false; networking.firewall.enable = true; i18n.defaultLocale = "en_US.UTF-8"; console.font = "${pkgs.dina-font}/share/fonts/misc/DinaMedium10.pcf.gz"; console.colors = [ "151515" "b17f81" "8aa387" "d4ae80" "84a0c6" "a093c7" "7aacaa" "d0d0c7" "222329" "c59395" "9eb79b" "e8c294" "a2bee4" "beb1e5" "8ec0be" "e4e4db" ]; console.keyMap = "us"; time.timeZone = "Asia/Seoul"; environment.systemPackages = with pkgs; [ gcc gnumake ]; services.zfs.trim.enable = true; services.zfs.autoScrub.enable = true; services.zfs.autoScrub.pools = [ "rpool" ]; services.openssh.enable = true; services.openssh.passwordAuthentication = false; sound.enable = false; services.pipewire = { enable = true; #alsa.enable = true; #alsa.support32Bit = true; pulse.enable = true; }; # TODO: https://github.com/NixOS/nixpkgs/pull/157631 environment.etc."alsa/conf.d/49-pipewire-modules.conf".text = '' pcm_type.pipewire { lib ${pkgs.pipewire.lib}/lib/alsa-lib/libasound_module_pcm_pipewire.so ; } ctl_type.pipewire { lib ${pkgs.pipewire.lib}/lib/alsa-lib/libasound_module_ctl_pipewire.so ; } ''; environment.etc."alsa/conf.d/50-pipewire.conf".source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/50-pipewire.conf"; environment.etc."alsa/conf.d/99-pipewire-default.conf".source = "${pkgs.pipewire}/share/alsa/alsa.conf.d/99-pipewire-default.conf"; hardware.bluetooth.enable = true; services.greetd = { enable = true; settings.default_session.command = "${pkgs.greetd.tuigreet}/bin/tuigreet -t -c sway"; }; # https://github.com/apognu/tuigreet/issues/17 systemd.services.greetd.unitConfig.After = lib.mkOverride 0 [ "multi-user.target" ]; services.journald.extraConfig = lib.mkForce ""; systemd.extraConfig = "RebootWatchdogSec=5"; fonts = { fontDir.enable = true; fonts = with pkgs; [ bitmap-font-collections cozette dina-font envypn-font iosevka-pure-bin readable-cherry sarasa-gothic siji jetbrains-mono tamzen twemoji-color-font terminus-font-ll2-td1 emacs-all-the-icons-fonts (nerdfonts.override { fonts = [ "Iosevka" "JetBrainsMono" ]; }) ]; fontconfig = { enable = true; defaultFonts = { serif = [ "Sarasa Gothic C" "Sarasa Gothic J" "Sarasa Gothic K" ]; sansSerif = [ "Sarasa Gothic C" "Sarasa Gothic J" "Sarasa Gothic K" ]; monospace = [ "Dina" "Terminus" "cherry" "Iosevka Pure" "Iosevka Nerd Font" "JetBrainsMono Nerd Font" ]; emoji = [ "Siji" "Twitter Color Emoji" ]; }; }; }; programs = { sway = { enable = true; wrapperFeatures.gtk = true; extraPackages = with pkgs; [ autotiling swaylock swayidle swaybg wayland-utils wl-clipboard grim slurp sway-contrib.grimshot waybar bemenu qt5.qtwayland xdg_utils ]; }; zsh.enable = true; zsh.enableCompletion = false; }; hardware.opengl.enable = true; hardware.opengl.driSupport32Bit = true; hardware.opengl.extraPackages = with pkgs; [ vaapiVdpau libvdpau-va-gl ]; xdg.portal = { enable = true; gtkUsePortal = true; extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; }; sops.defaultSopsFile = ./secrets/secrets.yaml; sops.secrets.spotify-password.owner = "boopy"; users.users = { boopy = { isNormalUser = true; shell = pkgs.zsh; extraGroups = [ "wheel" "audio" "networkmanager" ]; }; }; # This value determines the NixOS release with which your system is to be # compatible, in order to avoid breaking some software such as database # servers. You should change this only after NixOS release notes say you # should. system.stateVersion = "22.05"; # Did you read the comment? }