update system config
This commit is contained in:
parent
a87c4a786c
commit
4d3865b362
6 changed files with 57 additions and 26 deletions
|
@ -1,7 +1,7 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
let
|
||||
secrets = import ./secrets.nix;
|
||||
secrets = import ../secrets.nix;
|
||||
in
|
||||
{
|
||||
imports = (import ./wm) ++ (import ./shell) ++ (import ./progs);
|
||||
|
@ -22,6 +22,7 @@ in
|
|||
|
||||
home.packages = with pkgs; [
|
||||
# TODO: move packages to separate modules
|
||||
kotatogram-desktop
|
||||
|
||||
asciinema # record the terminal
|
||||
neofetch # command-line system information
|
||||
|
|
|
@ -60,7 +60,7 @@ with lib;
|
|||
type = "internal/network";
|
||||
interval = 3;
|
||||
interface = {
|
||||
text = "wlxd03745e1e87b";
|
||||
text = "wlp11s0f3u2";
|
||||
type = "wireless";
|
||||
};
|
||||
label.connected = "%essid% %signal%";
|
||||
|
|
|
@ -25,7 +25,7 @@ in
|
|||
config = mkIf cfg.enable {
|
||||
systemd.user.services.polybar = {
|
||||
# Add additional /usr/bin to run custom scripts
|
||||
Service.Environment = mkForce "PATH=${pcfg.package}/bin:/run/wrappers/bin:/usr/bin";
|
||||
Service.Environment = mkForce "PATH=${pcfg.package}/bin:/run/current-system/sw/bin";
|
||||
};
|
||||
|
||||
services.polybar = {
|
||||
|
|
|
@ -295,9 +295,9 @@ myKeys conf = mkKeymap conf $
|
|||
, ("M4-l", spawn "bash ~/scripts/lock.sh")
|
||||
|
||||
-- Change volume
|
||||
, ("<XF86AudioMute>", spawn "amixer -qD pulse sset Master toggle")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "amixer -qD pulse sset Master 5%+")
|
||||
, ("<XF86AudioLowerVolume>", spawn "amixer -qD pulse sset Master 5%-")
|
||||
, ("<XF86AudioMute>", spawn "amixer -q sset Master toggle")
|
||||
, ("<XF86AudioRaiseVolume>", spawn "amixer -q sset Master 5%+")
|
||||
, ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 5%-")
|
||||
|
||||
-- Keyboard apps
|
||||
, ("<XF86Calculator>", spawn "gnome-calculator")
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
#!/bin/sh
|
||||
enabled=$(amixer -D pulse sget Master | egrep -o "\[on\]" | wc -l)
|
||||
enabled=$(amixer sget Master | egrep -o "\[on\]" | wc -l)
|
||||
if [[ $enabled == "0" ]]; then
|
||||
echo "off"
|
||||
else
|
||||
echo $(amixer -D pulse sget Master | egrep -o "[0-9]+%" | head -n 1)
|
||||
echo $(amixer sget Master | egrep -o "[0-9]+%" | head -n 1)
|
||||
fi
|
||||
exit 0
|
||||
|
|
|
@ -19,16 +19,24 @@
|
|||
};
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
extraModulePackages = with config.boot.kernelPackages; [
|
||||
rtl88x2bu
|
||||
];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "nixos"; # Define your hostname.
|
||||
hostName = "home"; # Define your hostname.
|
||||
networkmanager.enable = true;
|
||||
|
||||
# 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.
|
||||
useDHCP = false;
|
||||
|
||||
interfaces = {
|
||||
enp3s0.useDHCP = true;
|
||||
wlp11s0f3u2.useDHCP = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Select internationalisation properties.
|
||||
|
@ -49,6 +57,11 @@
|
|||
|
||||
# Enable the X11 windowing system.
|
||||
services = {
|
||||
# Enable the OpenSSH daemon.
|
||||
openssh.enable = true;
|
||||
|
||||
# Xmonad
|
||||
|
||||
dbus = {
|
||||
enable = true;
|
||||
packages = [ pkgs.dconf ];
|
||||
|
@ -69,20 +82,15 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
# services.xserver.xkbOptions = {
|
||||
# "eurosign:e";
|
||||
# "caps:escape" # map caps to escape.
|
||||
# };
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
|
||||
# Enable sound.
|
||||
sound.enable = true;
|
||||
hardware.pulseaudio.enable = true;
|
||||
|
||||
# Enable touchpad support (enabled default in most desktopManager).
|
||||
# services.xserver.libinput.enable = true;
|
||||
sound = {
|
||||
enable = true;
|
||||
mediaKeys.enable = true;
|
||||
};
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
};
|
||||
|
||||
programs.zsh.enable = true;
|
||||
|
||||
|
@ -90,7 +98,11 @@
|
|||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.janabhumi = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
||||
extraGroups = [
|
||||
"wheel" # Enable ‘sudo’ for the user.
|
||||
"networkmanager"
|
||||
"audio"
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
|
||||
|
@ -110,10 +122,28 @@
|
|||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
# List services that you want to enable:
|
||||
nix = {
|
||||
# Automate garbage collection
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
# Flakes settings
|
||||
package = pkgs.nixFlakes;
|
||||
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
|
||||
trusted-users = [ "root" "janabhumi" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
|
|
Loading…
Reference in a new issue