From f832d0daa9b52328afd2ee8cfd6576074dfde748 Mon Sep 17 00:00:00 2001 From: Felix Wittwer Date: Thu, 31 Mar 2022 10:46:12 +0200 Subject: [PATCH] Clean up config a bit --- entropy/nixos/configuration.nix | 24 ++++++------------------ entropy/nixos/modules/audio.nix | 5 +++++ entropy/nixos/modules/hardware.nix | 20 ++++++++++++++++++++ entropy/nixos/modules/sway.nix | 1 - 4 files changed, 31 insertions(+), 19 deletions(-) create mode 100644 entropy/nixos/modules/hardware.nix diff --git a/entropy/nixos/configuration.nix b/entropy/nixos/configuration.nix index c4b26c9..8ef0131 100644 --- a/entropy/nixos/configuration.nix +++ b/entropy/nixos/configuration.nix @@ -15,6 +15,9 @@ in [ # Include the results of the hardware scan. ./hardware-configuration.nix + # Hardware support for Moonlander & U2F + ./modules/hardware.nix + ./modules/audio.nix ./modules/video.nix #./modules/v4l2loopback.nix @@ -42,9 +45,6 @@ in boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; - # ------------ hardware ----------------------------------------------------- - hardware.keyboard.zsa.enable = true; - # ------------ networking --------------------------------------------------- networking.hostName = "entropy"; # Define your hostname. networking.wireless = { @@ -125,15 +125,6 @@ in pinentryFlavor = "curses"; }; - services.udev.packages = [ pkgs.libu2f-host ]; - - ## enable fingerprint reader - #services.fprintd.enable = true; - #security.pam.services.login.fprintAuth = true; - ##security.pam.services.xscreensaver.fprintAuth = true; - #security.pam.services.sudo.fprintAuth = true; - - # ------------ programs ----------------------------------------------------- programs.fish.enable = true; programs.vim.defaultEditor = true; @@ -158,10 +149,6 @@ in usbutils moreutils file - ## firmware tool for keyboard - wally-cli - ## audio management - pavucontrol ## password management pass pinentry-curses @@ -200,10 +187,11 @@ in gitAndTools.gitui ## GitHub actions act - ## terminal, browsers, text editing - kitty + ## terminal, browsers, text editing, note taking + alacritty vscodium firefox-wayland + obsidian ## time tracking watson ## file managers diff --git a/entropy/nixos/modules/audio.nix b/entropy/nixos/modules/audio.nix index 0a3c90d..a4dcbc6 100644 --- a/entropy/nixos/modules/audio.nix +++ b/entropy/nixos/modules/audio.nix @@ -3,6 +3,11 @@ { # Enable sound. sound.enable = true; + + environment.systemPackages = with pkgs; [ + pavucontrol + ]; + # configure pulseaudio to work with bluetooth headsets using aptx hardware.pulseaudio = { enable = true; diff --git a/entropy/nixos/modules/hardware.nix b/entropy/nixos/modules/hardware.nix new file mode 100644 index 0000000..9a82f40 --- /dev/null +++ b/entropy/nixos/modules/hardware.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ... }: + +{ + # Enable support for flashing new firmware onto my Moonlander + hardware.keyboard.zsa.enable = true; + + services.udev.packages = [ pkgs.libu2f-host ]; + + ## enable fingerprint reader + #services.fprintd.enable = true; + #security.pam.services.login.fprintAuth = true; + ##security.pam.services.xscreensaver.fprintAuth = true; + #security.pam.services.sudo.fprintAuth = true; + + environment.systemPackages = with pkgs; [ + # tool for flashing firmware + wally-cli + ]; + +} diff --git a/entropy/nixos/modules/sway.nix b/entropy/nixos/modules/sway.nix index e371cfb..289fae3 100644 --- a/entropy/nixos/modules/sway.nix +++ b/entropy/nixos/modules/sway.nix @@ -11,7 +11,6 @@ waybar wl-clipboard mako # notification daemon - alacritty # Alacritty is the default terminal in the config #dmenu # Dmenu is the default in the config but i recommend wofi since its wayland native bemenu kanshi # replacement for autorandr