diff options
-rw-r--r-- | modules/home/default.nix | 1 | ||||
-rw-r--r-- | modules/home/pcmanfm.nix | 6 | ||||
-rw-r--r-- | modules/home/resources/pcmanfm/root.desktop | 11 | ||||
-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 | ||||
-rw-r--r-- | todo | 26 |
10 files changed, 84 insertions, 14 deletions
diff --git a/modules/home/default.nix b/modules/home/default.nix index e60bbff..a883234 100644 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -9,6 +9,7 @@ ./firefox.nix ./git.nix ./initial-home-setup.nix + ./pcmanfm.nix # TODO mk name changeable & doesn't seem to work right now ./theme.nix ]; diff --git a/modules/home/pcmanfm.nix b/modules/home/pcmanfm.nix new file mode 100644 index 0000000..3c70521 --- /dev/null +++ b/modules/home/pcmanfm.nix @@ -0,0 +1,6 @@ +{ + home.file.pcmanfm-root = { + target = ".local/share/file-manager/actions/root.desktop"; + source = ./resources/pcmanfm/root.desktop; + }; +} diff --git a/modules/home/resources/pcmanfm/root.desktop b/modules/home/resources/pcmanfm/root.desktop new file mode 100644 index 0000000..4b4d263 --- /dev/null +++ b/modules/home/resources/pcmanfm/root.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Action +Tooltip=Open Directory As Root +Name=Open Directory As Root +Profiles=profile-zero; +Icon=gtk-dialog-authentication + +[X-Action-Profile profile-zero] +MimeTypes=inode/directory; +Exec=/home/timmy/.local/bin/x11/xsudo /usr/bin/pcmanfm %u +Name=Default profile 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 @@ -1,22 +1,26 @@ -wifi nets -wpa supplicant? over nm -ssh keys -install zsh as root -fstab for net shares -shutdownprompt on power button press (handlepowerkey ignore in /etc/systemd/logind.conf) +# Misc / low priority fix screen turning off when playing video for extended period sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target ^- systemctl restart systemd-logind.service -autologin -git repo remotes inputleap for t495 -thunderbird ff violentmonkey userscripts -printers -pcmanfm config +pcmanfm config FIX + +# Secrets wireguard +printers (https://nixos.wiki/wiki/Printing) +wifi nets +wpa supplicant? over nm +ssh keys +fstab for net shares (fileSystems) +git repo remotes +thunderbird (https://home-manager-options.extranix.com/?query=thunderbird&release=release-24.05) +# Derivations lowbat pavolctrld + +# Not needed +install zsh as root |