From 509f4096167f24a07b4b82d282f18e87a6865c67 Mon Sep 17 00:00:00 2001 From: krizej Date: Fri, 2 Aug 2024 00:10:45 +0200 Subject: [PATCH] laptop config confirmed building and seems working --- files/black.png | Bin 0 -> 4294 bytes hosts/default.nix | 17 ++++++++-------- hosts/desktop/default.nix | 4 ++++ hosts/laptop/default.nix | 41 +++++++++++++++++++++----------------- modules/stuff/i3.nix | 6 +++--- modules/stuff/xserver.nix | 24 ++++++++++------------ 6 files changed, 49 insertions(+), 43 deletions(-) create mode 100644 files/black.png diff --git a/files/black.png b/files/black.png new file mode 100644 index 0000000000000000000000000000000000000000..8c738d55c38ba248ec8b1b5038e2464ed9f4665b GIT binary patch literal 4294 zcmeHLYitx%6rMh?wNT_u3L1yuQCggx$If3$}`8?<|td^Sz-><}LIzb+R>Hkh*ZXhVK zlQx!J4>>a<3(ErC4rqfjGO=OMzYc8}=xt1p$7Bq!<#$0Io08uLd2-6e@@K#|ANqD^ zEXX6EKMPIWm|XV~$kvlM(T~pLB z!mz}imhHaE&#FhPuc|p#Q9O9m(3NMa-?+Y?*t%#vQJZ_Ltab1t>h9V}`GJ>Se!FW? z?9b5AU%D>0wXSW&bMLM4O!XACS8l#Nas4P}N#gjno47qmm@(l^v_T!N4XM(;f9z_@ z<;hdND8Avn@ljy(gcq;0U%oN+>i#b?zuvNY*R9f(JL{flJaYb2o4ou?%^7C?g`%Zr zo7?ox%Wd4DVJ6*YC>B67+LqjJV-88Xs$iBTB*y1BY4=yhJylnTm;nVI37pd*f zj$2T$<;j8Xl&!sf=hQ!4x5I}{Us?Cshyd0>ZN16lt!rGZbgVqN?Wu!Jnb~ixo^s;1 z!zHVBRh|DeLN;dK(y~Thj0C^Sa>Q5dEA*G31$pO(~k!go`?z33S{CU3aL>a@y92h61Xb+hy|`79gO)=y;|995e ztnl;7XQd!u6t^%1QEM=L1OfAScYKjpFqnpq8Yvcl4=N$VD8@lkkqFh(!!Rov0VEaBLp_Yz zrWm5;Awz4>B~;OfqUQLX5VDl^k2UCFdpoj3p)iVosR64py_U4@W!l4{Af!fOwil4y z%hFVp`(*Ws&6=^d(=!loPviEo?%um?3|7G)U#>|FR(OGOA7QP}%bKLhye%>=50Y4? zNV+*s3CST=AO+->NjF_0&~8DYWyakDDiAeHAu1sY3cwvI;CLBPq+KN(DY!idAQYAq zosvj889{O?GR<*_?g3GytB{pKxMx%rlnhWMqT+P9SVYRQAOn=hkfJO*Nm}Muff2l% zm-X0Cvc%8Q^oRh*sYZklqGHjIJz){f&#Vsk2-cBY)z(yp1ycbBA2CObHYDzw)~XRy zV+t0VjGJX$E}C|Eyd3A{k_*}1&mrA_OtdiV3TwMt$HK#AfLOuGQvk5_uovDgqnci; zX<;8>LD;o9JspJWBnzfc4pkjM)784RyIN17S)NXl#s@W7Rhs_G+PXY=Y4XS`Rm0Tu zCR>%fQ8j2~a+Dl~Rr@O8xP2*jK}v4H5E_we#|c=;DXCtFh7eSbRJwNS)rX{lEQl=Y zQM{x};TV$hh$0Eu!H{0Jh-ig#BNvw>DUEJuiWwJlG&2M|0#}fpHdpv$`=E+?#}cnc z)+qpCB<&$-wwo|diZCj*Valo*-8(L&9^jYmfG6KZ-iH^ z$77WX4GeRPw^~Nx!1P8?=9qzCMb5R{j8Qq0re3=+98?8nMV;x_BGzwk?14Az1*->- l2BSfN@|m@{7o}y(mca=A1t{bSt$!@AK*ikh_sW*7`4@f-p&kGL literal 0 HcmV?d00001 diff --git a/hosts/default.nix b/hosts/default.nix index ab4ba1f..eaffe8b 100644 --- a/hosts/default.nix +++ b/hosts/default.nix @@ -7,12 +7,11 @@ inputs.home-manager.nixosModules.home-manager ]; }; - # "laptop" = inputs.nixpkgs.lib.nixosSystem { - # modules = [ - # ./laptop - # ../modules - # # { nixpkgs.overlays = [ nur.overlay ]; } - # # nur.nixosModules.nur - # ]; - # }; -} \ No newline at end of file + "laptop" = inputs.nixpkgs.lib.nixosSystem { + modules = [ + ./laptop + ../modules + inputs.home-manager.nixosModules.home-manager + ]; + }; +} diff --git a/hosts/desktop/default.nix b/hosts/desktop/default.nix index 6ab3bb8..6dd5be0 100644 --- a/hosts/desktop/default.nix +++ b/hosts/desktop/default.nix @@ -104,6 +104,10 @@ "1" = monitors.primary; "2" = monitors.secondary; }; + communicators = { + autostart = true; + workspace = "2"; + }; }; ssh = { diff --git a/hosts/laptop/default.nix b/hosts/laptop/default.nix index 6a14f81..234db94 100644 --- a/hosts/laptop/default.nix +++ b/hosts/laptop/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ config, pkgs, ... }: { imports = [ ./hardware-configuration.nix @@ -13,13 +13,21 @@ efi.canTouchEfiVariables = true; }; - home-manager.users.${user}.home.packages = with pkgs; [ - pamixer - yt-dlp - aseprite - cloc - viu - ]; + home-manager.users.${user}.home = { + packages = with pkgs; [ + pamixer + yt-dlp + aseprite + cloc + viu + ]; + + file = { + # for some reason no background is set at all by default + # which means i get the last "frame" of the login screen as my bg + ".background-image".source = ../../files/black.png; + }; + }; chuj = { system = { @@ -31,7 +39,6 @@ home-manager.enable = true; stuff = { - xserver.enable = true; sddm.enable = true; alacritty.enable = true; vim.enable = true; @@ -44,6 +51,12 @@ documentation.enable = true; theme.enable = true; printing.enable = true; + i3.enable = true; + + xserver = { + enable = true; + libinput = true; + }; gaming = { enable = true; @@ -57,14 +70,6 @@ }; }; - i3 = { - enable = true; - communicators = { - autostart = false; - workspace = null; - }; - }; - ssh = { enable = true; keys = { @@ -86,4 +91,4 @@ }; }; }; -} \ No newline at end of file +} diff --git a/modules/stuff/i3.nix b/modules/stuff/i3.nix index ce9dee6..3af26da 100644 --- a/modules/stuff/i3.nix +++ b/modules/stuff/i3.nix @@ -14,11 +14,11 @@ in { options = { autostart = mkOption { type = types.bool; - default = true; + default = false; }; workspace = mkOption { type = types.str; - default = "2"; + default = ""; }; }; }; @@ -34,7 +34,7 @@ in { xsession.windowManager.i3 = { enable = true; config = rec { - assigns = mkIf (cfg.communicators.workspace != null) { + assigns = mkIf (cfg.communicators.workspace != "") { ${cfg.communicators.workspace} = [ { class = "discord"; } { class = "SchildiChat"; } diff --git a/modules/stuff/xserver.nix b/modules/stuff/xserver.nix index bbe62e3..375afeb 100644 --- a/modules/stuff/xserver.nix +++ b/modules/stuff/xserver.nix @@ -4,6 +4,7 @@ in { options.chuj.stuff.xserver = { enable = mkEnableOption "xserver"; + libinput = mkEnableOption "libinput"; }; config = mkIf cfg.enable { @@ -27,17 +28,14 @@ in { xdotool ]; - # https://www.reddit.com/r/linux_gaming/comments/1dkbh5t/games_behaving_differently_on_xorg_than_on/ - # FUCK YOU LIBINPUT - services.libinput.enable = lib.mkForce false; - # services.libinput = { - # enable = true; - # touchpad = { - # naturalScrolling = false; # it's reversed on my laptop for some reason - # tapping = true; - # tappingButtonMap = "lmr"; - # scrollMethod = "edge"; - # }; - # }; + services.libinput = if cfg.libinput then { + enable = true; + touchpad = { + naturalScrolling = false; # it's reversed on my laptop for some reason + tapping = true; + tappingButtonMap = "lmr"; + scrollMethod = "edge"; + }; + } else { enable = lib.mkForce false; }; # fuck you }; -} \ No newline at end of file +}