diff --git a/flake.nix b/flake.nix index fd49342..38e3f4e 100644 --- a/flake.nix +++ b/flake.nix @@ -78,7 +78,6 @@ m = { ezpassthru = import ./modules/ezpassthru.nix; ezwg = import ./modules/ezwg.nix; - kiosk = import ./modules/kiosk.nix; fuckingprint = import ./modules/fuckingprint.nix; workstation = import ./modules/workstation.nix; ezpw = import ./modules/ezpw.nix; diff --git a/home-manager/users/notgne2.nix b/home-manager/users/notgne2.nix index 161ccfe..6fbbdf9 100644 --- a/home-manager/users/notgne2.nix +++ b/home-manager/users/notgne2.nix @@ -86,6 +86,8 @@ in { elmtooling.elm-ls-vscode kamadorueda.alejandra hashicorp.terraform + serayuzgur.crates + vadimcn.vscode-lldb (rust-lang.rust-analyzer.override { rust-analyzer = pkgs.writeShellScriptBin "rust-analyzer" '' exec rust-analyzer "$@" diff --git a/modules/kiosk.nix b/modules/kiosk.nix deleted file mode 100644 index 3da6b06..0000000 --- a/modules/kiosk.nix +++ /dev/null @@ -1,90 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: -with lib; let - cfg = config.services.kiosk; -in { - options.services.kiosk = { - enable = mkEnableOption "Enable simple kiosk display"; - - user = mkOption { - type = types.str; - default = "root"; - description = "The user to run the kiosk under"; - }; - - cursor = mkOption { - type = types.bool; - default = false; - description = "Allow a cursor"; - }; - - session = mkOption { - type = types.lines; - default = "${pkgs.kitty}/bin/kitty ${pkgs.htop}/bin/htop"; - description = "The session script to run for the kiosk"; - }; - - wayland = mkOption { - type = types.bool; - default = false; - description = "Use wayland instead of xserver"; - }; - }; - - config = mkIf cfg.enable { - services.cage = mkIf cfg.wayland { - enable = true; - user = cfg.user; - program = cfg.session; - # TODO cursor - }; - - services.xserver = mkIf (!cfg.wayland) { - enable = true; - - windowManager.ratpoison.enable = true; - - monitorSection = '' - Option "NODPMS" - ''; - - serverLayoutSection = '' - Option "BlankTime" "0" - Option "DPMS" "false" - ''; - - displayManager.lightdm = { - enable = true; - autoLogin = { - enable = true; - user = "${cfg.user}"; - }; - }; - - displayManager.xserverArgs = - if cfg.cursor - then [] - else ["-nocursor"]; - displayManager.defaultSession = "kiosk+ratpoison"; - - desktopManager.session = [ - { - name = "kiosk"; - start = '' - # dont blank the screen after 5min - xset dpms force on - xset -dpms - xset s noblank - xset s off - - ${cfg.session} - ''; - } - ]; - }; - }; -} diff --git a/modules/workstation.nix b/modules/workstation.nix index bd6dced..d6fa4a0 100644 --- a/modules/workstation.nix +++ b/modules/workstation.nix @@ -74,6 +74,7 @@ in { percentageLow = lib.mkDefault 15; percentageCritical = lib.mkDefault 10; percentageAction = lib.mkDefault 5; + criticalPowerAction = lib.mkDefault "Hibernate"; }; # Make battery usage sane