|
| 1 | +{ pkgs, ... }: |
| 2 | + |
| 3 | +{ |
| 4 | + users.users.luciano = { |
| 5 | + description = "Luciano Gomes"; |
| 6 | + |
| 7 | + isNormalUser = true; |
| 8 | + extraGroups = [ "docker" "wheel" ]; |
| 9 | + |
| 10 | + openssh.authorizedKeys.keys = [ |
| 11 | + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7/YBWZFreiTQDgb++49H6087Uy6iSJ/VFJRrXUc+O7DfsV7K35aWQE10K7lAurL0m8c//mMADxoUsGLef/cF2jO/UOcQD4lnsmU2uQXubJ0QLDKykMDwp+wgXTdfWFQwM4wpqJSvRnobMbgpep1xmaZetng62XMg4BKj8Le62oE+owtLVj7Vkn010HVnkbThBzyhTYLCtq8HNrFz5BGpDCO8LGGCzyTIXoX+ilepiMy64UhdX+kzZ0zcWl5tjOWyjV+4wP2U6xCIZys4q6IohPq9bqRnRzpPNqLdgrCaLPDAuCAO3ye9P9XONF7ZVFdaba+n39Y10FE8lu2Y4tZgGzVTkugrd6t01w76FnJx6hPHhkhW7fIe6SM2WQLQ8ViHh9sblFmRYSCTpEZYyiU8+FJqSrL6k+c/hBohg5yh8knUih932N+cpQUnVfgVW1JteC9GKwoKFFmAeAKTxzbbHtxiQ1SKw4Ya0VpAxIHP3nszvkKKO708SQsbo7sFDzwBesAntLqhIMcLtDZAQ34PbqDm6WY0SZA/EmTfQeRA8fpMUb2IS8KSzXnYfR37v4ZO7FynBKFwIYv/J/gj/HLFEED62+b4wQioU4xsJ/Ud9oc/QYrg0dMtf4wFTu6XPWjsK58lJDRYzfzPxo2ntUWHQlsPtXX06vfckgl5b3oHxIw== luciano@archlinux" |
| 12 | + ]; |
| 13 | + |
| 14 | + # Default - used for bootstrapping. |
| 15 | + password = "pw"; |
| 16 | + }; |
| 17 | + |
| 18 | + home-manager.users.luciano = { |
| 19 | + home = { |
| 20 | + packages = with pkgs; [ |
| 21 | + bintools |
| 22 | + gitRepo |
| 23 | + htop |
| 24 | + kas |
| 25 | + nmap |
| 26 | + oelint-adv |
| 27 | + openfortivpn |
| 28 | + tmux |
| 29 | + tmuxp |
| 30 | + tree |
| 31 | + unzip |
| 32 | + wget |
| 33 | + ]; |
| 34 | + file = { |
| 35 | + ".yocto/site.conf".source = ./yocto/site.conf; |
| 36 | + }; |
| 37 | + |
| 38 | + stateVersion = "23.05"; |
| 39 | + }; |
| 40 | + |
| 41 | + # set the bash configurations |
| 42 | + programs.bash = { |
| 43 | + enable = true; |
| 44 | + bashrcExtra = '' |
| 45 | + parse_git_branch() { |
| 46 | + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' |
| 47 | + } |
| 48 | + export PS1="\[\033[01;32m\]\u@\[\033[00m\]\[\033[01;35m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\e[91m\]\$(parse_git_branch)\[\e[00m\]$ " |
| 49 | + ''; |
| 50 | + shellAliases = { |
| 51 | + # Insecure SSH and SCP aliases. I use this to connect to temporary devices |
| 52 | + # such as embedded devices under test or development so we don't need to |
| 53 | + # delete the fingerprint every time we reinstall them. |
| 54 | + issh = "ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"; |
| 55 | + iscp = "scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"; |
| 56 | + }; |
| 57 | + }; |
| 58 | + |
| 59 | + programs.emacs = { |
| 60 | + enable = true; |
| 61 | + }; |
| 62 | + |
| 63 | + programs.fzf = { |
| 64 | + enable = true; |
| 65 | + enableBashIntegration = true; |
| 66 | + |
| 67 | + tmux.enableShellIntegration = true; |
| 68 | + }; |
| 69 | + |
| 70 | + programs.git = { |
| 71 | + enable = true; |
| 72 | + |
| 73 | + userName = "Luciano Gomes"; |
| 74 | + userEmail = "luciano@ossystems.com.br"; |
| 75 | + |
| 76 | + delta = { |
| 77 | + enable = true; |
| 78 | + options.syntax-theme = "base16-256"; |
| 79 | + }; |
| 80 | + |
| 81 | + extraConfig = { |
| 82 | + core.sshCommand = "${pkgs.openssh}/bin/ssh -F ~/.ssh/config"; |
| 83 | + core.editor = "nvim"; |
| 84 | + }; |
| 85 | + }; |
| 86 | + |
| 87 | + programs.ssh = { |
| 88 | + enable = true; |
| 89 | + extraConfig = '' |
| 90 | + Host *.ossystems.com.br |
| 91 | + HostkeyAlgorithms +ssh-rsa |
| 92 | + PubkeyAcceptedAlgorithms +ssh-rsa |
| 93 | +
|
| 94 | + Host *.lab.ossystems |
| 95 | + ForwardAgent yes |
| 96 | + ForwardX11 yes |
| 97 | + ForwardX11Trusted yes |
| 98 | + ''; |
| 99 | + }; |
| 100 | + }; |
| 101 | +} |
0 commit comments