Add initial nixos configuration
This commit is contained in:
parent
5b29c52889
commit
111c824354
|
@ -1,4 +1,4 @@
|
||||||
font_family Iosevka Fixed SS07 Medium
|
font_family Iosevka
|
||||||
|
|
||||||
repaint_delay 5
|
repaint_delay 5
|
||||||
input_delay 1
|
input_delay 1
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
flags=("")
|
flags=("")
|
||||||
case "$TERMINAL" in
|
case "$TERMINAL" in
|
||||||
kitty )
|
kitty )
|
||||||
flags=(-o remember_window_size=no -o initial_window_width=122c -o initial_window_height=24c --class floating_terminal)
|
flags=(-o remember_window_size=no -o initial_window_width=60c -o initial_window_height=12c --class floating_terminal)
|
||||||
;;
|
;;
|
||||||
|
|
||||||
# TODO: rxvt?
|
# TODO: rxvt?
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
loginctl show-session "$(loginctl | grep "$(whoami)" | head -n 1 | field 1)" -p Type | grep -i wayland >/dev/null
|
exit 0
|
||||||
|
# loginctl show-session "$(loginctl | grep "$(whoami)" | head -n 1 | field 1)" -p Type | grep -i wayland >/dev/null
|
||||||
|
|
|
@ -7,7 +7,7 @@ app="$(
|
||||||
awk 'NF{NF--};1' | \
|
awk 'NF{NF--};1' | \
|
||||||
cat - <(dmenu_path) | \
|
cat - <(dmenu_path) | \
|
||||||
sort | uniq -c | sort -nr | \
|
sort | uniq -c | sort -nr | \
|
||||||
sd '^\s+' '' | \
|
sd -fm '^\s+' '' | \
|
||||||
cut -d' ' -f2- | \
|
cut -d' ' -f2- | \
|
||||||
fzf
|
fzf
|
||||||
)"
|
)"
|
||||||
|
|
32
env/laptop/hardware.nix
vendored
Normal file
32
env/laptop/hardware.nix
vendored
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/d1d92974-c0c0-4566-8131-c3dda9b21122";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/3EB9-C18F";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
nix.maxJobs = lib.mkDefault 4;
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
# High-DPI console
|
||||||
|
console.font = lib.mkDefault "${pkgs.terminus_font}/share/consolefonts/ter-u28n.psf.gz";
|
||||||
|
}
|
7
env/laptop/sway/config.d/main
vendored
7
env/laptop/sway/config.d/main
vendored
|
@ -2,9 +2,6 @@ exec libinput-gestures -c $DOTFILES_PATH/apps/de/libinput/sway-gestures.conf
|
||||||
|
|
||||||
# exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
|
# exec swayidle -w timeout 300 'swaylock -f -c 000000' timeout 600 'swaymsg "output * dpms off"' resume 'swaymsg "output * dpms on"' before-sleep 'swaylock -f -c 000000'
|
||||||
|
|
||||||
# TODO: setup displays (when docked for work?)
|
|
||||||
output eDP-1 res 1600x900 pos 0 0
|
|
||||||
|
|
||||||
bindswitch lid:toggle exec swaylock
|
bindswitch lid:toggle exec swaylock
|
||||||
|
|
||||||
input type:touchpad {
|
input type:touchpad {
|
||||||
|
@ -18,3 +15,7 @@ input type:touchpad {
|
||||||
input type:keyboard {
|
input type:keyboard {
|
||||||
xkb_options ctrl:nocaps
|
xkb_options ctrl:nocaps
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# TODO: setup displays (when docked for work?)
|
||||||
|
output eDP-1 res 1600x900 pos 0 0
|
||||||
|
|
||||||
|
|
88
env/nix/personal-machine.nix
vendored
Normal file
88
env/nix/personal-machine.nix
vendored
Normal file
|
@ -0,0 +1,88 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ /etc/nixos/hardware-configuration.nix ];
|
||||||
|
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs.config = {
|
||||||
|
allowUnfree = true;
|
||||||
|
packageOverrides = pkgs: {
|
||||||
|
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking = {
|
||||||
|
networkmanager.enable = true;
|
||||||
|
hostName = "third.lyte.dev";
|
||||||
|
};
|
||||||
|
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console.keyMap = "us";
|
||||||
|
|
||||||
|
time.timeZone = "America/Chicago";
|
||||||
|
|
||||||
|
environment = {
|
||||||
|
systemPackages = with pkgs; [
|
||||||
|
wget vim neovim git curl fish bash tmux pciutils usbutils w3m networkmanager sway zsh kitty firefox-devedition-bin ripgrep lightdm fortune sd fzf dmenu ranger nodejs python3 rsync pass brightnessctl wl-clipboard waybar mako vulkan-tools htop rustup clang
|
||||||
|
];
|
||||||
|
variables = {
|
||||||
|
EDITOR = "nvim";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
fonts.fonts = with pkgs; [ iosevka ];
|
||||||
|
|
||||||
|
hardware = {
|
||||||
|
pulseaudio = {
|
||||||
|
enable = true;
|
||||||
|
support32Bit = true;
|
||||||
|
};
|
||||||
|
opengl = {
|
||||||
|
enable = true;
|
||||||
|
driSupport = true;
|
||||||
|
driSupport32Bit = true;
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
vaapiIntel
|
||||||
|
vaapiVdpau
|
||||||
|
libvdpau-va-gl
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs = {
|
||||||
|
fish.enable = true;
|
||||||
|
mtr.enable = true;
|
||||||
|
gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
pinentryFlavor = "curses";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
openssh.enable = true;
|
||||||
|
xserver = {
|
||||||
|
enable = true;
|
||||||
|
displayManager.lightdm = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
sound.enable = true;
|
||||||
|
|
||||||
|
users.users.daniel = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
shell = pkgs.fish;
|
||||||
|
home = "/home/daniel/.home";
|
||||||
|
};
|
||||||
|
|
||||||
|
system.stateVersion = "20.03";
|
||||||
|
}
|
Reference in a new issue