# FIXME
# FIXME
# TODO this file is super rough and very specific
# FIXME
# FIXME
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, lib, ... }:
{
imports =
[
<nixos-hardware/dell/xps/13-9310>
./hardware-configuration.nix
];
nix.binaryCaches = [ "https://cache.nixos.org/" ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.initrd.luks.devices = {
root = {
device = "/dev/nvme0n1p2";
preLVM = true;
};
};
users.users.chris = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" ];
shell = pkgs.zsh;
};
environment.systemPackages = with pkgs; [
git
nix-prefetch-scripts
neovim
networkmanagerapplet
which
];
networking.hostName = "xps-nixos"; # Define your hostname.
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.wlp0s20f3.useDHCP = true;
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};
# #############
# Enable sound.
# #############
#
# these are disabled in favor of PipeWire
# https://nixos.wiki/wiki/PipeWire
# #######################################
sound.enable = false;
hardware.pulseaudio.enable = false;
# #######################################
security.rtkit.enable = true; # rtkit is optional but recommended
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;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
# media-session.enable = true;
#
media-session.config.bluez-monitor.rules = [
{
# Matches all cards
matches = [{ "device.name" = "~bluez_card.*"; }];
actions = {
"update-props" = {
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
# mSBC is not expected to work on all headset + adapter combinations.
"bluez5.msbc-support" = true;
# SBC-XQ is not expected to work on all headset + adapter combinations.
"bluez5.sbc-xq-support" = true;
};
};
}
{
matches = [
# Matches all sources
{ "node.name" = "~bluez_input.*"; }
# Matches all outputs
{ "node.name" = "~bluez_output.*"; }
];
actions = {
"node.pause-on-idle" = false;
};
}
];
};
hardware.bluetooth.enable = true;
hardware.bluetooth.hsphfpd.enable = true;
# Enable CUPS to print documents.
# services.printing.enable = true;
programs.sway.enable = true;
services.blueman.enable = true;
services.openssh.enable = true;
services.greetd = {
enable = true;
settings = {
default_session = {
command = "${lib.makeBinPath [pkgs.greetd.tuigreet] }/tuigreet --time --cmd sway";
user = "greeter";
};
};
};
system.stateVersion = "21.05";
}