Skip to content

Commit

Permalink
add lorri
Browse files Browse the repository at this point in the history
  • Loading branch information
adomixaszvers committed Nov 2, 2019
1 parent dfbd6e2 commit 3970603
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 65 deletions.
3 changes: 1 addition & 2 deletions cli/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }:

{
imports = [ ./neovim ./kakoune ];
imports = [ ./lorri.nix ./neovim ./kakoune ];
home.packages = with pkgs; [
bfs
cachix
Expand Down Expand Up @@ -32,7 +32,6 @@
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
stdlib = lib.readFile ./use_nix.sh;
};
programs.fzf = {
changeDirWidgetCommand = "bfs -type d";
Expand Down
38 changes: 38 additions & 0 deletions cli/lorri.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{ pkgs, ... }:
let lorri = pkgs.channels.lorri;
in {
home.packages = [ lorri ];
programs.direnv = {
stdlib = ''
use_nix() {
eval "$(lorri direnv)"
}
'';
};
systemd.user.sockets.lorri = {
Unit = { Description = "lorri build daemon"; };
Socket = { ListenStream = "%t/lorri/daemon.socket"; };
Install = { WantedBy = [ "sockets.target" ]; };
};
systemd.user.services.lorri =
let path = with pkgs; lib.makeBinPath [ nix gnutar git mercurial ];
in {
Unit = {
Description = "lorri build daemon";
Documentation = "https://github.com/target/lorri";
ConditionUser = "!@system";
Requires = "lorri.socket";
After = "lorri.socket";
RefuseManualStart = true;
};

Service = {
ExecStart = "${lorri}/bin/lorri daemon";
PrivateTmp = true;
ProtectSystem = "strict";
WorkingDirectory = "%h";
Restart = "on-failure";
Environment = "PATH=${path} RUST_BACKTRACE=1";
};
};
}
63 changes: 0 additions & 63 deletions cli/use_nix.sh

This file was deleted.

1 change: 1 addition & 0 deletions nix-channels
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
https://github.com/Infinisil/all-hies/archive/master.tar.gz all-hies
https://github.com/rycee/home-manager/archive/release-19.09.tar.gz home-manager
https://github.com/target/lorri/archive/rolling-release.tar.gz lorri
https://nixos.org/channels/nixos-unstable nixos-unstable
1 change: 1 addition & 0 deletions overlays/channels.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
self: super: {
channels = {
all-hies = import <all-hies> { };
lorri = import <lorri> { };
nixos-unstable = import <nixos-unstable> { };
};
}

0 comments on commit 3970603

Please sign in to comment.