diff options
author | Tim Keller <tjkeller.xyz> | 2024-10-03 20:01:03 -0500 |
---|---|---|
committer | Tim Keller <tjkeller.xyz> | 2024-10-03 20:01:03 -0500 |
commit | a651a2150aca24d915f7d139f6a8bcce9c6f641b (patch) | |
tree | baeeb41312669a24919aeec8dd13bae618ea5470 /modules/root | |
parent | 9aad420411b703278ac555858dc60f14f8f156bc (diff) | |
download | nixos-a651a2150aca24d915f7d139f6a8bcce9c6f641b.tar.xz nixos-a651a2150aca24d915f7d139f6a8bcce9c6f641b.zip |
fix awesome with luajit and add some more cool stuff
Diffstat (limited to 'modules/root')
-rw-r--r-- | modules/root/autologin.nix | 13 | ||||
-rw-r--r-- | modules/root/awesome.nix | 28 | ||||
-rw-r--r-- | modules/root/default.nix | 3 | ||||
-rw-r--r-- | modules/root/normaluser.nix | 2 | ||||
-rw-r--r-- | modules/root/powerkeys.nix | 7 | ||||
-rw-r--r-- | modules/root/software.nix | 1 |
6 files changed, 51 insertions, 3 deletions
diff --git a/modules/root/autologin.nix b/modules/root/autologin.nix new file mode 100644 index 0000000..6e66160 --- /dev/null +++ b/modules/root/autologin.nix @@ -0,0 +1,13 @@ +{ lib, config, userDetails, ... }: { + options = { + autologin.enable = lib.mkEnableOption "enables getty automatic login"; + #autologin.user = lib.mkEnableOption "populate username"; + #autologin.password = lib.mkEnableOption "populate password"; + }; + + config = lib.mkIf config.autologin.enable { + services.getty = { + autologinUser = userDetails.username; + }; + }; +} diff --git a/modules/root/awesome.nix b/modules/root/awesome.nix index 4db5230..af1318f 100644 --- a/modules/root/awesome.nix +++ b/modules/root/awesome.nix @@ -1,9 +1,33 @@ -{ lib, config, ... }: { +{ nixpkgs, pkgs, lib, config, ... }: { options = { xserver.awesome.enable = lib.mkEnableOption "enables awesomewm"; }; config = lib.mkIf config.xserver.awesome.enable { - services.xserver.windowManager.awesome.enable = true; + services.xserver.windowManager.awesome = { + enable = true; + noArgb = true; # disables transparency. why not? + luaModules = with pkgs; [ + luajitPackages.lgi + ]; + }; + + #getLuaPath = lib: dir: "${lib}/${dir}/lua/${pkgs.luajit.luaversion}"; + #makeSearchPath = lib.concatMapStrings ( + # path: + # " --search " + # + (getLuaPath path "share") + # + " --search " + # + (getLuaPath path "lib") + #); + + + environment.systemPackages = with pkgs; [ + (awesome.override { + gtk3Support = true; + gtk3 = gtk3; + lua = luajit; + }) + ]; }; } diff --git a/modules/root/default.nix b/modules/root/default.nix index b03fab4..2ef73aa 100644 --- a/modules/root/default.nix +++ b/modules/root/default.nix @@ -1,5 +1,6 @@ { lib, ... }: { imports = [ + ./autologin.nix ./awesome.nix ./cups.nix ./doas.nix @@ -11,12 +12,14 @@ ./nix.nix ./normaluser.nix ./pipewire.nix + ./powerkeys.nix ./software.nix ./virtualisation.nix ./wifi.nix ./x11.nix ]; + autologin.enable = lib.mkDefault true; cups.enable = lib.mkDefault true; doas.enable = lib.mkDefault true; docker = { diff --git a/modules/root/normaluser.nix b/modules/root/normaluser.nix index 5d436e8..192e64e 100644 --- a/modules/root/normaluser.nix +++ b/modules/root/normaluser.nix @@ -1,7 +1,7 @@ { userDetails, ... }: { users.users.${userDetails.username} = { description = userDetails.fullname; - home = userDetails.home.root; + #home = userDetails.home.root; isNormalUser = true; extraGroups = [ "wheel" ]; }; diff --git a/modules/root/powerkeys.nix b/modules/root/powerkeys.nix new file mode 100644 index 0000000..dcb3616 --- /dev/null +++ b/modules/root/powerkeys.nix @@ -0,0 +1,7 @@ +{ + services.logind = { + powerKey = "ignore"; + powerKeyLongPress = "poweroff"; + hibernateKey = "suspend"; + }; +} diff --git a/modules/root/software.nix b/modules/root/software.nix index 4aa6f64..f52f25c 100644 --- a/modules/root/software.nix +++ b/modules/root/software.nix @@ -35,6 +35,7 @@ inkscape qbittorrent qdirstat + thunderbird ungoogled-chromium ] ++ pkgs.lib.optionals config.software.dev.enable [ # Development |