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, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
secrets = import ./secrets.nix;
|
secrets = import ../secrets.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = (import ./wm) ++ (import ./shell) ++ (import ./progs);
|
imports = (import ./wm) ++ (import ./shell) ++ (import ./progs);
|
||||||
|
@ -22,6 +22,7 @@ in
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
# TODO: move packages to separate modules
|
# TODO: move packages to separate modules
|
||||||
|
kotatogram-desktop
|
||||||
|
|
||||||
asciinema # record the terminal
|
asciinema # record the terminal
|
||||||
neofetch # command-line system information
|
neofetch # command-line system information
|
||||||
|
|
|
@ -60,7 +60,7 @@ with lib;
|
||||||
type = "internal/network";
|
type = "internal/network";
|
||||||
interval = 3;
|
interval = 3;
|
||||||
interface = {
|
interface = {
|
||||||
text = "wlxd03745e1e87b";
|
text = "wlp11s0f3u2";
|
||||||
type = "wireless";
|
type = "wireless";
|
||||||
};
|
};
|
||||||
label.connected = "%essid% %signal%";
|
label.connected = "%essid% %signal%";
|
||||||
|
|
|
@ -25,7 +25,7 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
systemd.user.services.polybar = {
|
systemd.user.services.polybar = {
|
||||||
# Add additional /usr/bin to run custom scripts
|
# 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 = {
|
services.polybar = {
|
||||||
|
|
|
@ -295,9 +295,9 @@ myKeys conf = mkKeymap conf $
|
||||||
, ("M4-l", spawn "bash ~/scripts/lock.sh")
|
, ("M4-l", spawn "bash ~/scripts/lock.sh")
|
||||||
|
|
||||||
-- Change volume
|
-- Change volume
|
||||||
, ("<XF86AudioMute>", spawn "amixer -qD pulse sset Master toggle")
|
, ("<XF86AudioMute>", spawn "amixer -q sset Master toggle")
|
||||||
, ("<XF86AudioRaiseVolume>", spawn "amixer -qD pulse sset Master 5%+")
|
, ("<XF86AudioRaiseVolume>", spawn "amixer -q sset Master 5%+")
|
||||||
, ("<XF86AudioLowerVolume>", spawn "amixer -qD pulse sset Master 5%-")
|
, ("<XF86AudioLowerVolume>", spawn "amixer -q sset Master 5%-")
|
||||||
|
|
||||||
-- Keyboard apps
|
-- Keyboard apps
|
||||||
, ("<XF86Calculator>", spawn "gnome-calculator")
|
, ("<XF86Calculator>", spawn "gnome-calculator")
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/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
|
if [[ $enabled == "0" ]]; then
|
||||||
echo "off"
|
echo "off"
|
||||||
else
|
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
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -19,16 +19,24 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
extraModulePackages = with config.boot.kernelPackages; [
|
||||||
|
rtl88x2bu
|
||||||
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
hostName = "nixos"; # Define your hostname.
|
hostName = "home"; # Define your hostname.
|
||||||
networkmanager.enable = true;
|
networkmanager.enable = true;
|
||||||
|
|
||||||
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
# 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
|
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||||
# replicates the default behaviour.
|
# replicates the default behaviour.
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
|
|
||||||
|
interfaces = {
|
||||||
|
enp3s0.useDHCP = true;
|
||||||
|
wlp11s0f3u2.useDHCP = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
|
@ -49,6 +57,11 @@
|
||||||
|
|
||||||
# Enable the X11 windowing system.
|
# Enable the X11 windowing system.
|
||||||
services = {
|
services = {
|
||||||
|
# Enable the OpenSSH daemon.
|
||||||
|
openssh.enable = true;
|
||||||
|
|
||||||
|
# Xmonad
|
||||||
|
|
||||||
dbus = {
|
dbus = {
|
||||||
enable = true;
|
enable = true;
|
||||||
packages = [ pkgs.dconf ];
|
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.
|
# Enable sound.
|
||||||
sound.enable = true;
|
sound = {
|
||||||
hardware.pulseaudio.enable = true;
|
enable = true;
|
||||||
|
mediaKeys.enable = true;
|
||||||
# Enable touchpad support (enabled default in most desktopManager).
|
};
|
||||||
# services.xserver.libinput.enable = true;
|
hardware.pulseaudio = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.pulseaudioFull;
|
||||||
|
};
|
||||||
|
|
||||||
programs.zsh.enable = true;
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
|
@ -90,7 +98,11 @@
|
||||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||||
users.users.janabhumi = {
|
users.users.janabhumi = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
|
extraGroups = [
|
||||||
|
"wheel" # Enable ‘sudo’ for the user.
|
||||||
|
"networkmanager"
|
||||||
|
"audio"
|
||||||
|
];
|
||||||
shell = pkgs.zsh;
|
shell = pkgs.zsh;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,10 +122,28 @@
|
||||||
enableSSHSupport = true;
|
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.
|
# Flakes settings
|
||||||
services.openssh.enable = true;
|
package = pkgs.nixFlakes;
|
||||||
|
|
||||||
|
extraOptions = ''
|
||||||
|
experimental-features = nix-command flakes
|
||||||
|
'';
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
auto-optimise-store = true;
|
||||||
|
|
||||||
|
trusted-users = [ "root" "janabhumi" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||||
|
|
Loading…
Reference in a new issue