diff options
author | EuAndreh <eu@euandre.org> | 2019-05-30 23:11:07 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-05-30 23:11:07 -0300 |
commit | e215d02457b5eb850109d43ab577c9e994fcbe7f (patch) | |
tree | c08a264de7a2d58d1563819a0e1a28ec948fd887 | |
parent | Move shellCheck derivation to utils.nix (diff) | |
download | dotfiles-e215d02457b5eb850109d43ab577c9e994fcbe7f.tar.gz dotfiles-e215d02457b5eb850109d43ab577c9e994fcbe7f.tar.xz |
Polish and use utils.fixme derivation
-rw-r--r-- | TODOs.org | 4 | ||||
-rw-r--r-- | bash/x.sh | 3 | ||||
-rw-r--r-- | default.nix | 6 | ||||
-rw-r--r-- | nixos/os-installation.sh | 1 | ||||
-rw-r--r-- | nixos/utils.nix | 17 | ||||
-rw-r--r-- | tmux/projects/annex.yml | 1 |
6 files changed, 16 insertions, 16 deletions
@@ -34,3 +34,7 @@ Profile =bash/bashrc.sh=. ** TODO Remove =shellcheck disable= directives * Nice to have ** TODO Test elfeed +* Fixes +** TODO Adjust layout for =annex.yml= tmuxinator template +** TODO Make xmodmap commands declarative +** TODO Open =.description= files with text editor @@ -1,7 +1,6 @@ #!/usr/bin/env bash isLinux && { - # FIXME: make this declarative xmodmap ~/.Xmodmap xset r rate 250 50 @@ -18,6 +17,4 @@ isLinux && { xdg-mime default firefox.desktop text/xml xdg-mime default nautilus.desktop inode/directory - - # FIXME: add .description files } diff --git a/default.nix b/default.nix index 7b6e001..8cd6397 100644 --- a/default.nix +++ b/default.nix @@ -1,8 +1,7 @@ let pkgs = import <nixpkgs> { }; rootSrc = pkgs.nix-gitignore.gitignoreSource [ ] ./.; -in with pkgs; -with pkgs.stdenv; rec { +in rec { utils = import ./nixos/utils.nix { pkgs = pkgs; rootSrc = rootSrc; # FIXME: remove the need for this @@ -11,8 +10,7 @@ with pkgs.stdenv; rec { test = utils.test [ utils.formatNix (utils.shellcheck ".*(encrypted|os-installation.sh).*") - # subtasks.fixme + (utils.fixme [ "default.nix" "utils.nix" ]) # subtasks.uniqueFeeds - # subtasks.formatNix ]; } diff --git a/nixos/os-installation.sh b/nixos/os-installation.sh index 0936f94..519ee5a 100644 --- a/nixos/os-installation.sh +++ b/nixos/os-installation.sh @@ -24,7 +24,6 @@ systemctl start display-manager # Change keyboard to pt_BR layout: loadkeys br-abnt2 -# FIXME: make it declarative # Format disk: gdisk /dev/nvme0n1 # disk found using lsblk diff --git a/nixos/utils.nix b/nixos/utils.nix index 30110a4..4a1b8fd 100644 --- a/nixos/utils.nix +++ b/nixos/utils.nix @@ -40,24 +40,27 @@ in rec { touch $out ''; }); - - fixme = baseTask.overrideAttrs (baseAttrs: { + fixme = ignoredFiles: + baseTask.overrideAttrs (baseAttrs: rec { name = "${baseAttrs.name}-fixme"; buildInputs = baseAttrs.buildInputs ++ [ pkgs.ag ]; + ignoredPattern = pkgs.lib.fold (a: b: " --ignore ${a} ${b}") "" + (if ignoredFiles == null then [ + "default.nix" + "TODOs.org" + ] else + ignoredFiles); buildPhase = '' - ag FIXME --ignore default.nix || { + ag FIXME ${ignoredPattern} || { touch $out exit 0 } - echo "^^^^^^^^^^^^^^^^^" - echo " Found dangling FIXME markers on the project xp" + echo " Found dangling FIXME markers on the project." exit 1 ''; }); - test = testDerivations: baseTask.overrideAttrs (baseAttrs: { - name = "${baseAttrs.name}-test"; buildPhase = '' echo "Ran tests for:" diff --git a/tmux/projects/annex.yml b/tmux/projects/annex.yml index 00b3a8a..a964d67 100644 --- a/tmux/projects/annex.yml +++ b/tmux/projects/annex.yml @@ -3,7 +3,6 @@ name: annex windows: - annex+dotfiles: root: ~/annex/ - # FIXME layout: main-vertical panes: - misc: |