aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/default.nix10
-rw-r--r--system/fonts.nix22
-rw-r--r--system/networking.nix23
-rw-r--r--system/pipewire.nix13
-rw-r--r--system/wifi.nix3
-rw-r--r--system/xserver.nix33
6 files changed, 104 insertions, 0 deletions
diff --git a/system/default.nix b/system/default.nix
new file mode 100644
index 0000000..8a8b05b
--- /dev/null
+++ b/system/default.nix
@@ -0,0 +1,10 @@
+{ ... }:
+
+{
+ imports = [
+ ./fonts.nix
+ ./networking.nix
+ ./pipewire.nix
+ ./xserver.nix
+ ];
+}
diff --git a/system/fonts.nix b/system/fonts.nix
new file mode 100644
index 0000000..89ee17a
--- /dev/null
+++ b/system/fonts.nix
@@ -0,0 +1,22 @@
+{ pkgs, ... }:
+
+{
+ fonts = {
+ packages = with pkgs; [
+ nerdfonts
+ noto-fonts
+ noto-fonts-cjk
+ noto-fonts-cjk-sans
+ noto-fonts-cjk-serif
+ noto-fonts-emoji
+ ];
+
+ fontconfig = {
+ defaultFonts = {
+ monospace = [ "CaskaydiaMono Nerd Font" ];
+ sansSerif = [ "DejaVu Sans" "Noto Sans CJK JP" "Noto Sans" ];
+ serif = [ "DejaVu Serif" "Noto Serif CJK JP" "Noto Serif" ];
+ };
+ };
+ };
+}
diff --git a/system/networking.nix b/system/networking.nix
new file mode 100644
index 0000000..13237a8
--- /dev/null
+++ b/system/networking.nix
@@ -0,0 +1,23 @@
+{ ... }:
+
+{
+ networking = {
+ hostName = "c-pc";
+ hostId = "23ce94ff";
+
+ useDHCP = true;
+
+ wireless = {
+ enable = true;
+ networks = import ./wifi.nix;
+ };
+
+ firewall = {
+ enable = false;
+
+ allowedTCPPorts = [ 8096 50000 ];
+ allowedUDPPorts = [ ];
+ };
+ };
+}
+
diff --git a/system/pipewire.nix b/system/pipewire.nix
new file mode 100644
index 0000000..0dfb230
--- /dev/null
+++ b/system/pipewire.nix
@@ -0,0 +1,13 @@
+{ ... }:
+
+{
+ security.rtkit.enable = true;
+ services.pipewire = {
+ enable = true;
+
+ pulse.enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ #jack.enable = true;
+ };
+}
diff --git a/system/wifi.nix b/system/wifi.nix
new file mode 100644
index 0000000..9e23e44
--- /dev/null
+++ b/system/wifi.nix
@@ -0,0 +1,3 @@
+{
+ "The Dwyers".psk = "86EC3E567E";
+}
diff --git a/system/xserver.nix b/system/xserver.nix
new file mode 100644
index 0000000..1530c44
--- /dev/null
+++ b/system/xserver.nix
@@ -0,0 +1,33 @@
+{ pkgs, ... }:
+
+{
+ services.xserver = {
+ enable = true;
+
+ videoDrivers = [ "amdgpu" ];
+
+ displayManager = {
+ lightdm.enable = true;
+ defaultSession = "none+i3";
+
+ setupCommands = ''
+ if ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1080; then
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x0
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1080 --rate 60 --pos 1920x0 --primary
+ ${pkgs.xorg.xrandr}/bin/xrandr --output HDMI-A-0 --mode 1920x1080 --rate 75 --pos 4480x0
+ elif ${pkgs.xorg.xrandr}/bin/xrandr --query | grep 2560x1440; then
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --rate 60 --pos 0x360
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-2 --mode 2560x1440 --rate 165 --pos 1920x0 --primary
+ ${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-1 --mode 1920x1200 --rate 60 --pos 4480x0
+ fi
+ '';
+ };
+
+ windowManager.i3 = {
+ enable = true;
+ };
+
+ xkb.layout = "us";
+# xkb.options = "eurosign:e,caps:escape";
+ };
+}