Compare commits

...

4 commits

Author SHA1 Message Date
fb4b98e023 tools 2020-06-13 23:20:39 +02:00
2c8feae00c use keepasscx from unstable 2020-06-13 23:20:10 +02:00
d5165d670e use starship 2020-06-13 23:19:34 +02:00
7711e69e5c add admin role 2020-06-13 23:17:19 +02:00
6 changed files with 74 additions and 14 deletions

View file

@ -13,6 +13,7 @@
# Include the results of the hardware scan.
./hardware-configuration.nix
./roles/admin.nix
./roles/dev.nix
./roles/base.nix
./roles/desktop.nix

7
dotfiles/starship.toml Normal file
View file

@ -0,0 +1,7 @@
add_newline = false
[username]
show_always = true
[hostname]
ssh_only = false

46
roles/admin.nix Normal file
View file

@ -0,0 +1,46 @@
{ pkgs, options, ...}:
{
environment.systemPackages = with pkgs; [
kubectl
# podman
conmon
fuse-overlayfs
podman
podman-compose
runc
slirp4netns
];
users.users.stefan.subUidRanges = [{ startUid = 100000; count = 65536; }];
users.users.stefan.subGidRanges = [{ startGid = 100000; count = 65536; }];
environment.etc."containers/policy.json" = {
mode="0644";
text=''
{
"default": [
{
"type": "insecureAcceptAnything"
}
],
"transports":
{
"docker-daemon":
{
"": [{"type":"insecureAcceptAnything"}]
}
}
}
'';
};
environment.etc."containers/registries.conf" = {
mode="0644";
text=''
[registries.search]
registries = ['docker.io', 'quay.io']
'';
};
}

View file

@ -1,9 +1,8 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, ... }:
{
let
unstable = import <nixos-unstable> {};
in {
environment.systemPackages = with pkgs; [
bash
bat
@ -11,17 +10,29 @@
fd
fzf
git
gnupg
htop
jq
ncdu
ripgrep
z-lua
unstable.starship
(import ../packages/neovim.nix)
];
environment = {
etc = {
"starship.toml".source = ../dotfiles/starship.toml;
};
};
programs.bash = {
promptInit = ''
. <(starship init bash)
'';
interactiveShellInit = ''
export EDITOR=nvim
export STARSHIP_CONFIG=/etc/starship.toml
if [ -z "$SSH_AUTH_SOCK" ]; then
eval $(ssh-agent)
@ -43,14 +54,6 @@
fi
}
git_branch(){
branch=$(git branch 2> /dev/null) || exit 0
branch=$(sed -n '/^*/ s/* \(.*\)/\1/p' <<< $branch)
status=$(git status 2> /dev/null \
| grep -q "nothing to commit, working tree clean" || e cho -n '*')
echo "$branch$status "
}
. "$(fzf-share)/key-bindings.bash"
. "$(fzf-share)/completion.bash"
. <(z --init bash)

View file

@ -43,10 +43,11 @@ in {
environment.systemPackages = with pkgs; [
alacritty
firefox
unstable.keepassxc
mumble
neofetch
pulseaudio
pulsemixer
unstable.keepassxc
(
pkgs.writeTextFile {
name = "startsway";

View file

@ -5,7 +5,7 @@
let
unstable = import <nixos-unstable> {};
mozilla_overlay = import <mozilla> {};
mozilla = import <mozilla> {};
in {
environment.systemPackages = with pkgs; [
@ -15,6 +15,8 @@ in {
python37Packages.pyls-isort
python37Packages.pyls-mypy
rustup
sops
tig
unstable.gopls
unstable.rust-analyzer
];