2022-04-27 06:38:39 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
|
|
|
|
|
|
|
# installer docs: https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/profiles/installation-device.nix
|
|
|
|
{
|
|
|
|
# Users are exactly these specified here;
|
|
|
|
# old ones will be deleted (from /etc/passwd, etc) upon upgrade.
|
|
|
|
users.mutableUsers = false;
|
|
|
|
|
|
|
|
# docs: https://nixpkgs-manual-sphinx-markedown-example.netlify.app/generated/options-db.xml.html#users-users
|
2022-04-28 06:23:02 +00:00
|
|
|
users.users.colin = {
|
2022-04-27 06:38:39 +00:00
|
|
|
# sets group to "users" (?)
|
|
|
|
isNormalUser = true;
|
2022-04-28 06:23:02 +00:00
|
|
|
home = "/home/colin";
|
2022-04-27 06:38:39 +00:00
|
|
|
uid = 1000;
|
|
|
|
# XXX colin: this is what the installer has, but is it necessary?
|
|
|
|
# group = "users";
|
|
|
|
extraGroups = [ "wheel" ];
|
|
|
|
initialHashedPassword = "";
|
|
|
|
shell = pkgs.bashInteractive;
|
|
|
|
openssh.authorizedKeys.keys = [
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGSDe/y0e9PSeUwYlMPjzhW0UhNsGAGsW3lCG3apxrD5 colin@colin.desktop"
|
|
|
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG+MZ/l5d8g5hbxMB9ed1uyvhV85jwNrSVNVxb5ujQjw colin@colin.laptop"
|
|
|
|
];
|
|
|
|
packages = [
|
2022-05-02 08:20:21 +00:00
|
|
|
pkgs.gnumake
|
|
|
|
pkgs.dig
|
|
|
|
pkgs.duplicity
|
2022-04-27 06:38:39 +00:00
|
|
|
pkgs.fd
|
|
|
|
pkgs.file
|
|
|
|
pkgs.git
|
|
|
|
pkgs.htop
|
2022-05-02 08:20:21 +00:00
|
|
|
pkgs.iftop
|
|
|
|
pkgs.iotop
|
|
|
|
pkgs.iptables
|
|
|
|
pkgs.lsof
|
2022-04-27 06:38:39 +00:00
|
|
|
pkgs.matrix-synapse
|
|
|
|
pkgs.mix2nix
|
2022-04-27 08:48:40 +00:00
|
|
|
pkgs.netcat
|
2022-05-02 08:20:21 +00:00
|
|
|
pkgs.nettools
|
2022-04-27 06:38:39 +00:00
|
|
|
pkgs.nmap
|
|
|
|
pkgs.ripgrep
|
2022-04-27 08:48:40 +00:00
|
|
|
pkgs.telnet
|
2022-04-27 06:38:39 +00:00
|
|
|
pkgs.sudo
|
2022-05-02 08:20:21 +00:00
|
|
|
pkgs.wireguard
|
|
|
|
pkgs.zola
|
2022-04-27 06:38:39 +00:00
|
|
|
(pkgs.vim_configurable.customize {
|
|
|
|
name = "vim";
|
|
|
|
vimrcConfig.customRC = ''
|
|
|
|
" wtf vim project: NOBODY LIKES MOUSE FOR VISUAL MODE
|
|
|
|
set mouse-=a
|
2022-05-02 23:49:30 +00:00
|
|
|
" copy/paste to system clipboard
|
|
|
|
set clipboard=unnamedplus
|
|
|
|
" <tab> completion menu settings
|
|
|
|
set wildmenu
|
|
|
|
set wildmode=longest,list,full
|
|
|
|
" highlight all matching searches (using / and ?)
|
|
|
|
set hlsearch
|
|
|
|
" allow backspace to delete empty lines in insert mode
|
|
|
|
set backspace=indent,eol,start
|
2022-05-02 23:55:46 +00:00
|
|
|
" built-in syntax highlighting
|
|
|
|
syntax enable
|
|
|
|
" show line/col number in bottom right
|
|
|
|
set ruler
|
2022-05-02 23:49:30 +00:00
|
|
|
" highlight trailing space & related syntax errors (does this work?)
|
|
|
|
let c_space_errors=1
|
|
|
|
let python_space_errors=1
|
2022-04-27 06:38:39 +00:00
|
|
|
'';
|
|
|
|
})
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# Automatically log in at the virtual consoles.
|
2022-04-28 06:23:02 +00:00
|
|
|
services.getty.autologinUser = "colin";
|
2022-04-27 06:38:39 +00:00
|
|
|
|
|
|
|
security.sudo = {
|
|
|
|
enable = lib.mkDefault true;
|
|
|
|
wheelNeedsPassword = lib.mkForce false;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.openssh = {
|
|
|
|
enable = true;
|
|
|
|
permitRootLogin = "no";
|
|
|
|
passwordAuthentication = false;
|
|
|
|
};
|
|
|
|
|
2022-04-27 07:44:02 +00:00
|
|
|
programs.vim.defaultEditor = true;
|
|
|
|
|
2022-04-27 06:38:39 +00:00
|
|
|
# gitea doesn't create the git user
|
|
|
|
users.users.git = {
|
|
|
|
description = "Gitea Service";
|
|
|
|
home = "/var/lib/gitea";
|
|
|
|
useDefaultShell = true;
|
|
|
|
group = "gitea";
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
}
|