summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hosts/omar/desktop-environment/default.nix1
-rw-r--r--hosts/omar/desktop-environment/input.nix1
-rw-r--r--hosts/omar/desktop-environment/window-manager.nix36
-rw-r--r--pkgs/dwm-setstatus/default.nix2
-rw-r--r--shared/home-manager/firefox/default.nix5
-rw-r--r--shared/home-manager/firefox/privacy.nix31
-rw-r--r--shared/nixos/danish/default.nix5
7 files changed, 34 insertions, 47 deletions
diff --git a/hosts/omar/desktop-environment/default.nix b/hosts/omar/desktop-environment/default.nix
index 48598eb..52800e0 100644
--- a/hosts/omar/desktop-environment/default.nix
+++ b/hosts/omar/desktop-environment/default.nix
@@ -1,5 +1,4 @@
# This module configures a desktop environment specific to this host.
-
{
imports = [
./window-manager.nix
diff --git a/hosts/omar/desktop-environment/input.nix b/hosts/omar/desktop-environment/input.nix
index bb138c7..63cddca 100644
--- a/hosts/omar/desktop-environment/input.nix
+++ b/hosts/omar/desktop-environment/input.nix
@@ -1,5 +1,4 @@
{
-
# Configure keymap in X11
services.xserver.xkb.layout = "dk";
services.xserver.xkb.options = "caps:escape";
diff --git a/hosts/omar/desktop-environment/window-manager.nix b/hosts/omar/desktop-environment/window-manager.nix
index 926268e..0a6d878 100644
--- a/hosts/omar/desktop-environment/window-manager.nix
+++ b/hosts/omar/desktop-environment/window-manager.nix
@@ -1,6 +1,4 @@
-{pkgs, ...}:
-
-{
+{pkgs, ...}: {
services.xserver.windowManager.dwm.enable = true;
# Show battery and clock in status bar. This is a background daemon which
@@ -11,25 +9,25 @@
wantedBy = ["graphical-session.target"];
serviceConfig.ExecStart = pkgs.writeShellScript "dwm-battery" ''
- while true; do
- echo -n "$(date +%H:%M) - ";
+ while true; do
+ echo -n "$(date +%H:%M) - ";
- # See: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power
- case "$(cat /sys/class/power_supply/BAT0/status)" in
- Charging) echo -n "🔋 " ;;
- Discharging) echo -n "🪫 " ;;
- "Not charging") echo -n "🪫 " ;;
- Full) echo -n "🔋 " ;;
- Unknown) echo -n "? " ;;
- ""|*) echo -n "?? " ;;
- esac
+ # See: https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-power
+ case "$(cat /sys/class/power_supply/BAT0/status)" in
+ Charging) echo -n "🔋 " ;;
+ Discharging) echo -n "🪫 " ;;
+ "Not charging") echo -n "🪫 " ;;
+ Full) echo -n "🔋 " ;;
+ Unknown) echo -n "? " ;;
+ ""|*) echo -n "?? " ;;
+ esac
- echo -n "$(cat /sys/class/power_supply/BAT0/capacity)%"
+ echo -n "$(cat /sys/class/power_supply/BAT0/capacity)%"
- echo
- sleep 5
- done | ${pkgs.dwm-setstatus}/bin/dwm-setstatus
- '';
+ echo
+ sleep 5
+ done | ${pkgs.dwm-setstatus}/bin/dwm-setstatus
+ '';
};
environment.systemPackages = with pkgs; [
diff --git a/pkgs/dwm-setstatus/default.nix b/pkgs/dwm-setstatus/default.nix
index cf7b261..606744e 100644
--- a/pkgs/dwm-setstatus/default.nix
+++ b/pkgs/dwm-setstatus/default.nix
@@ -8,7 +8,7 @@ stdenv.mkDerivation {
version = "16-11-2024"; # Date of last change
src = ./.;
- nativeBuildInputs = [ libX11 ];
+ nativeBuildInputs = [libX11];
buildPhase = ''
cc dwm-setstatus.c -lX11 -o dwm-setstatus
'';
diff --git a/shared/home-manager/firefox/default.nix b/shared/home-manager/firefox/default.nix
index f2fc3e3..af11521 100644
--- a/shared/home-manager/firefox/default.nix
+++ b/shared/home-manager/firefox/default.nix
@@ -1,8 +1,5 @@
# This module configures Firefox with all my plugins and such.
-
-{pkgs,...}:
-
-{
+{pkgs, ...}: {
imports = [
./privacy.nix
];
diff --git a/shared/home-manager/firefox/privacy.nix b/shared/home-manager/firefox/privacy.nix
index 67da005..1ab3820 100644
--- a/shared/home-manager/firefox/privacy.nix
+++ b/shared/home-manager/firefox/privacy.nix
@@ -1,24 +1,21 @@
# This HM module sets pr
-
-{pkgs,...}:
-
-{
+{pkgs, ...}: {
programs.firefox = {
policies = {
- DisableTelemetry = true;
- EnableTrackingProtection = {
- Value= true;
- Locked = true;
- Cryptomining = true;
- Fingerprinting = true;
- };
+ DisableTelemetry = true;
+ EnableTrackingProtection = {
+ Value = true;
+ Locked = true;
+ Cryptomining = true;
+ Fingerprinting = true;
+ };
- # Disable various features, that we don't want.
- DisablePocket = true;
- DisableFirefoxStudies = true;
- DisableFirefoxAccounts = true;
- DisableAccounts = true;
- DisableFirefoxScreenshots = true;
+ # Disable various features, that we don't want.
+ DisablePocket = true;
+ DisableFirefoxStudies = true;
+ DisableFirefoxAccounts = true;
+ DisableAccounts = true;
+ DisableFirefoxScreenshots = true;
};
profiles."default".extensions = with pkgs.nur.repos.rycee.firefox-addons; [
diff --git a/shared/nixos/danish/default.nix b/shared/nixos/danish/default.nix
index b8a33ed..fb6bb86 100644
--- a/shared/nixos/danish/default.nix
+++ b/shared/nixos/danish/default.nix
@@ -1,8 +1,5 @@
# This module should be imported on Danish hosts.
-
-{lib, ...}:
-
-{
+{lib, ...}: {
i18n.defaultLocale = "da_DK.UTF-8";
# Allow indirect overwriting via `console.useXkbConfig`.