Signed-off-by: Magic_RB <magic_rb@redalder.org>
This commit is contained in:
Magic_RB 2021-05-09 23:34:02 +02:00
parent fecadd5daf
commit f0b933b2e6
No known key found for this signature in database
GPG key ID: 08D5287CC5DDCA0E
5 changed files with 35 additions and 28 deletions

View file

@ -84,6 +84,10 @@ xssh() {
fi
}
if [[ "@direnvEnabled@" == "true" ]] ; then
eval "$(direnv hook bash)"
fi
## Set prompt
export EDITOR="emacsclient"

View file

@ -12,13 +12,23 @@ in
type = types.bool;
default = true;
};
enableDirenv = mkEnableOption "Enable direnv";
};
config = mkIf cfg.enable {
home.packages = mkIf cfg.emacsclient-remote [
pkgs.magic_rb.emacsclient-remote
home.packages = mkMerge [
(mkIf cfg.emacsclient-remote [
pkgs.magic_rb.emacsclient-remote
])
(mkIf cfg.enableDirenv [
pkgs.direnv
])
];
programs.direnv.enable = mkIf cfg.enableDirenv true;
programs.direnv.enableNixDirenvIntegration = mkIf cfg.enableDirenv true;
home.file = {
".bashrc".source = nglib.writeSubstitutedFile {
name = ".bashrc";
@ -26,6 +36,7 @@ in
substitutes = {
"exa" = "${pkgs.exa}";
"bat" = "${pkgs.bat}";
"direnvEnabled" = if cfg.enableDirenv then "true" else "false";
};
};
};

View file

@ -21,7 +21,10 @@ inputs: {
overlays = inputs.self.overlays;
programs = {
bash.enable = true;
bash = {
enable = true;
enableDirenv = true;
};
};
};

View file

@ -32,7 +32,10 @@ inputs: {
programs = {
alacritty.enable = true;
bash.enable = true;
bash = {
enable = true;
enableDirenv = true;
};
shh.enable = true;
emacs.enable = true;
xmonad.enable = true;
@ -165,7 +168,7 @@ inputs: {
services.nomad = {
enable = true;
enableDocker = true;
enableDocker = false;
dropPrivileges = false;
extraPackages = [ nixpkgs-unstable.consul ];
@ -175,26 +178,6 @@ inputs: {
extraSettingsPaths = [ "/var/secrets/nomad.hcl" ];
};
services.hydra = {
enable = true;
hydraURL = "http://localhost:3000";
notificationSender = "hydra@localhost"; # e-mail of hydra service
# a standalone hydra will require you to unset the buildMachinesFiles list to avoid using a nonexistant /etc/nix/machines
buildMachinesFiles = [];
# you will probably also want, otherwise *everything* will be built from scratch
useSubstitutes = true;
extraConfig = ''
<runcommand>
command = ${pkgs.curl}/bin/curl -X POST -H "Content-Type: application/json" -d @$HYDRA_JSON http://localhost:8080/hydra
</runcommand>
'';
};
nix.extraOptions = ''
allowed-uris = https://gitea.redalder.org/RedAlder/rlib
'';
networking = {
firewall = {
allowedUDPPorts = [ 6666 ];
@ -218,6 +201,11 @@ inputs: {
};
};
};
virtualisation.podman = {
enable = true;
dockerCompat = true;
};
})
] ++ [
({ pkgs, ... }: {
@ -234,8 +222,6 @@ inputs: {
system.stateVersion = "20.09";
security.pki.certificates = [ (builtins.readFile ../redalder.org.crt) ];
virtualisation.docker.enable = true;
})
];
}

View file

@ -27,7 +27,10 @@ inputs: {
programs = {
alacritty.enable = true;
bash.enable = true;
bash = {
enable = true;
enableDirenv = true;
};
ssh.enable = true;
emacs.enable = true;
xmonad.enable = true;