diff options
Diffstat (limited to 'modules/workstation')
-rw-r--r-- | modules/workstation/default.nix | 11 | ||||
-rw-r--r-- | modules/workstation/fonts/default.nix | 5 | ||||
-rw-r--r-- | modules/workstation/hardware/default.nix | 6 | ||||
-rw-r--r-- | modules/workstation/mail/default.nix | 7 | ||||
-rw-r--r-- | modules/workstation/mail/isync/default.nix | 36 | ||||
-rw-r--r-- | modules/workstation/mail/mutt/default.nix | 7 | ||||
-rw-r--r-- | modules/workstation/networking/default.nix | 36 | ||||
-rw-r--r-- | modules/workstation/windowing/default.nix | 12 | ||||
-rw-r--r-- | modules/workstation/yubikey/default.nix | 7 |
9 files changed, 127 insertions, 0 deletions
diff --git a/modules/workstation/default.nix b/modules/workstation/default.nix new file mode 100644 index 000000000000..d9a4860cc372 --- /dev/null +++ b/modules/workstation/default.nix @@ -0,0 +1,11 @@ +{ lib, pkgs, ... }: + +{ + imports = [ + ../nix ../locale ../shell ../users + ./windowing ./fonts ./yubikey ./hardware ./networking + ./mail ../../config/weechat/module.nix ../../config/gnupg/module.nix + ]; + + environment.systemPackages = with pkgs; [ mosh ]; +} diff --git a/modules/workstation/fonts/default.nix b/modules/workstation/fonts/default.nix new file mode 100644 index 000000000000..9c59bb60189d --- /dev/null +++ b/modules/workstation/fonts/default.nix @@ -0,0 +1,5 @@ +{ pkgs, ... }: + +{ + fonts.fonts = with pkgs; [ fantasque-sans-mono ]; +} diff --git a/modules/workstation/hardware/default.nix b/modules/workstation/hardware/default.nix new file mode 100644 index 000000000000..a81508c7ed3b --- /dev/null +++ b/modules/workstation/hardware/default.nix @@ -0,0 +1,6 @@ +{ ... }: + +{ + i18n.consoleUseXkbConfig = true; + services.xserver.layout = "dvorak"; +} diff --git a/modules/workstation/mail/default.nix b/modules/workstation/mail/default.nix new file mode 100644 index 000000000000..9b14f2981ec8 --- /dev/null +++ b/modules/workstation/mail/default.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + imports = [ ./mutt ]; + + environment.systemPackages = with pkgs.pkgsConfigured; [ isync ]; +} diff --git a/modules/workstation/mail/isync/default.nix b/modules/workstation/mail/isync/default.nix new file mode 100644 index 000000000000..66343a0c3625 --- /dev/null +++ b/modules/workstation/mail/isync/default.nix @@ -0,0 +1,36 @@ +{ pkgs, options, ... }: + +let + inherit (pkgs.pkgsConfigured) isync; + +in { + config = + if options.environment ? "darwinConfig" then + { + launchd.user.agents.isync = { + serviceConfig.ProgramArguments = [ "${isync}/bin/mbsync" "Periodic" ]; + serviceConfig.StartInterval = 300; + serviceConfig.RunAtLoad = true; + }; + } + else + { + systemd.user.services.isync = { + serviceConfig = { + Type = "oneshot"; + ExecStart = '' + ${isync}/bin/mbsync Periodic + ''; + }; + }; + + systemd.user.timers.isync = { + timerConfig = { + Unit = "isync.service"; + OnCalendar = "*:0/5"; + Persistent = "true"; + }; + wantedBy = [ "default.target" ]; + }; + }; +} diff --git a/modules/workstation/mail/mutt/default.nix b/modules/workstation/mail/mutt/default.nix new file mode 100644 index 000000000000..1aa8d2aa29d3 --- /dev/null +++ b/modules/workstation/mail/mutt/default.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + imports = [ ../../../shell ]; + + environment.systemPackages = with pkgs.pkgsConfigured; [ neomutt ]; +} diff --git a/modules/workstation/networking/default.nix b/modules/workstation/networking/default.nix new file mode 100644 index 000000000000..b813b33924a6 --- /dev/null +++ b/modules/workstation/networking/default.nix @@ -0,0 +1,36 @@ +{ pkgs, ... }: + +{ + networking.networkmanager.enable = true; + + # Plausible MAC randomization + networking.networkmanager.ethernet.macAddress = "random"; + networking.networkmanager.wifi.macAddress = "random"; + networking.networkmanager.extraConfig = '' + [connection-extra] + ethernet.generate-mac-address-mask=FE:FF:FF:00:00:00 + wifi.generate-mac-address-mask=FE:FF:FF:00:00:00 + ''; + + networking.nameservers = [ "::1" ]; + + networking.networkmanager.dispatcherScripts = [ + { + source = pkgs.writeText "doh-stub" '' + if [ "$2" = up ] + then systemctl restart doh-stub.service + fi + ''; + type = "basic"; + } + ]; + + systemd.services.doh-stub = { + script = '' + exec ${pkgs.doh-proxy}/bin/doh-stub \ + --level INFO \ + --domain qyliss.net \ + --remote-address 85.119.82.108 + ''; + }; +} diff --git a/modules/workstation/windowing/default.nix b/modules/workstation/windowing/default.nix new file mode 100644 index 000000000000..e435fd42b68e --- /dev/null +++ b/modules/workstation/windowing/default.nix @@ -0,0 +1,12 @@ +{ pkgs, lib, ... }: + +{ + imports = [ ../../../config/firefox/module.nix ]; + + environment.variables.XKB_DEFAULT_LAYOUT = "dvorak"; + programs.sway-beta.enable = true; + programs.sway-beta.package = pkgs.pkgsConfigured.sway-beta; + + environment.systemPackages = with pkgs.pkgsConfigured; + lib.optionals (!stdenv.isDarwin) [ alacritty ]; +} diff --git a/modules/workstation/yubikey/default.nix b/modules/workstation/yubikey/default.nix new file mode 100644 index 000000000000..7f314bd5cbee --- /dev/null +++ b/modules/workstation/yubikey/default.nix @@ -0,0 +1,7 @@ +{ pkgs, ... }: + +{ + services.pcscd.enable = true; + + services.udev.packages = with pkgs; [ yubikey-personalization ]; +} |