nixdirfmt + swaylock -> exprs + katexprs update

This commit is contained in:
kat witch 2021-08-30 19:45:02 +01:00
parent 9f35a4b893
commit 7eb1366c31
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
8 changed files with 90 additions and 132 deletions

View file

@ -8,7 +8,6 @@
(import sources.anicca).modules.home
./deploy.nix
./theme.nix
./swaylock.nix
./secrets.nix
(sources.tf-nix + "/modules/home/secrets.nix")
];

View file

@ -1,44 +0,0 @@
{ config, lib, pkgs, ... }: with lib;
let cfg = config.programs.swaylock; in
{
options.programs.swaylock = {
enable = mkEnableOption "locker integration";
package = mkOption {
type = types.package;
default = pkgs.swaylock-effects;
};
wrapped = mkOption {
type = types.package;
};
script = mkOption {
type = types.path;
default = "${cfg.wrapped}/bin/swaylock";
};
colors = mkOption {
type = types.attrsOf types.str;
default = { };
};
args = mkOption {
type = with types; attrsOf (oneOf [ str bool int float ]);
default = { };
};
};
config = mkIf cfg.enable {
programs.swaylock = let
argList = concatLists (mapAttrsToList (arg: value:
if value == true then
singleton "--${toString arg}"
else [
"--${arg}"
(toString value)
]) cfg.args);
argStr = escapeShellArgs argList;
in {
args = mapAttrs' (arg: color: nameValuePair ("${arg}-color") (removePrefix "#" color)) cfg.colors;
wrapped = pkgs.writeShellScriptBin "swaylock" ''
${cfg.package}/bin/swaylock ${argStr} $@
'';
};
};
}

View file

@ -114,9 +114,11 @@ let cfg = config.kw.theme; in
};
Service = {
Type = "simple";
ExecStart = let
ExecStart =
let
lockCommand = config.programs.swaylock.script;
in ''
in
''
${pkgs.swayidle}/bin/swayidle -w \
timeout 300 '${lockCommand}' \
timeout 600 'swaymsg "output * dpms off"' \

View file

@ -4,7 +4,7 @@ require'nvim-treesitter.configs'.setup {
ignore_install = { }, -- List of parsers to ignore installing
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
additional_vim_regex_highlighting = true,
},
indent = {
enable = true,

View file

@ -1,6 +1,7 @@
{ config, pkgs, lib, ... }:
let lockCommand = config.programs.swaylock.script; in {
let lockCommand = config.programs.swaylock.script; in
{
home.sessionVariables = {
XDG_CURRENT_DESKTOP = "sway";
XDG_SESSION_TYPE = "wayland";

View file

@ -89,10 +89,10 @@
"homepage": null,
"owner": "kittywitch",
"repo": "nixexprs",
"rev": "a1ef2f8f807205d39c113617670f843690253b43",
"sha256": "14pg1vl4ys7zbhmiy4l99fngmj1z9csrm2vap375vyjns837q9kg",
"rev": "cace9038678b16a73a41430ef6fd32b7a86c2ef6",
"sha256": "0sm1ak1av97s0wm3z47f2aknf5a943lr2cqsyhl4mp9vhvhy87fd",
"type": "tarball",
"url": "https://github.com/kittywitch/nixexprs/archive/a1ef2f8f807205d39c113617670f843690253b43.tar.gz",
"url": "https://github.com/kittywitch/nixexprs/archive/cace9038678b16a73a41430ef6fd32b7a86c2ef6.tar.gz",
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
},
"niv": {

@ -1 +1 @@
Subproject commit a1ef2f8f807205d39c113617670f843690253b43
Subproject commit 3872f4f23c60b2a398ed074d4db60c6344bdd500