diff options
author | Profpatsch <mail@profpatsch.de> | 2017-01-27 00:50:47 +0100 |
---|---|---|
committer | Profpatsch <mail@profpatsch.de> | 2017-01-27 00:50:47 +0100 |
commit | 6e831ef05284590b53d179ff3755076b3e6dbdb3 (patch) | |
tree | fe379d0518d8956319e9f734b89561bea1bfc7af /machines/profpatsch/base.nix | |
parent | f19a54d6c8efea1e2354f4cd8e418c2ccf9b6641 (diff) |
machines/profpatsch: factor out basic server config
Diffstat (limited to 'machines/profpatsch/base.nix')
-rw-r--r-- | machines/profpatsch/base.nix | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/machines/profpatsch/base.nix b/machines/profpatsch/base.nix new file mode 100644 index 00000000..758a6d8a --- /dev/null +++ b/machines/profpatsch/base.nix @@ -0,0 +1,38 @@ +# Base config shared by all machines +{ pkgs, config, lib, ... }: + +let + # TODO: inject into every config from outside + myLib = import ./lib.nix { inherit pkgs lib; }; + myPkgs = import ./pkgs.nix { inherit pkgs lib myLib; }; + +in +{ + config = { + # correctness before speed + nix.useSandbox = true; + + programs.bash = { + loginShellInit = '' + alias c='vim /etc/nixos/configuration.nix' + alias nsp='nix-shell -p' + alias nrs='nixos-rebuild switch' + alias tad='tmux attach -d' + ''; + }; + + environment.systemPackages = with pkgs; [ + curl # transfer data to/from a URL + file # file information + git # version control system + htop # top replacement + nmap # stats about clients in the network + rsync # file syncing tool + tmux # detachable terminal multiplexer + wget # the other URL file fetcher + myPkgs.vim # slight improvement over vi + ]; + + }; + +} |