nixos-configuration/hive/phobos/default.nix

88 lines
2.2 KiB
Nix
Raw Permalink Normal View History

2024-01-23 20:58:09 +00:00
{ pkgs, lib, system, home-manager, ... }:
2024-01-22 23:47:19 +00:00
{
imports = lib.optional (builtins.pathExists ./do-userdata.nix) ./do-userdata.nix ++ [
../../digital-ocean/configuration.nix
home-manager.nixosModules.home-manager
];
2024-01-23 20:58:09 +00:00
environment = {
systemPackages = with pkgs; [
gcc
git
((vim_configurable.override {}).customize {
name = "vim";
vimrcConfig.customRC = ''
set nocompatible
syntax on
set colorcolumn=80,100
set expandtab " Spaces instead of tabs.
set list " Show hidden characters.
set listchars=tab:>\ ,trail:-,nbsp:+
set shiftwidth=2 " # of spaces to use for each (auto)indent.
set tabstop=2 " # of spaces a <Tab> in the file counts for.
'';
})
];
variables = {
EDITOR = "vim";
};
};
fonts.packages = with pkgs; [ iosevka ];
2024-01-22 23:47:19 +00:00
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
2024-01-23 22:17:04 +00:00
users.jrpotter = args@{ pkgs, lib, ... }:
let
base = import ../../users/jrpotter args;
in
lib.attrsets.updateManyAttrsByPath [
{
path = [ "home" "packages" ];
update = old: old ++ [ pkgs.wezterm ];
}
] base;
2024-01-22 23:47:19 +00:00
# Used to pass non-default parameters to submodules.
extraSpecialArgs = {
inherit system;
stateVersion = "23.11";
};
};
networking.hostName = "phobos";
2024-01-23 20:58:09 +00:00
nix.settings.experimental-features = [ "nix-command" "flakes" ];
2024-01-22 23:47:19 +00:00
programs.mosh.enable = true;
# Our NixOS droplet's do not have a root password set. Disable so we can still
# run commands that require sudo (e.g. `colmena apply-local --sudo`).
security.sudo.wheelNeedsPassword = false;
2024-01-22 23:47:19 +00:00
services.openssh.enable = true;
2024-01-23 20:58:09 +00:00
time.timeZone = "America/Denver";
2024-01-22 23:47:19 +00:00
users.users.jrpotter = {
isNormalUser = true;
extraGroups = [
"docker"
"networkmanager"
"libvirtd"
"wheel"
];
};
2024-01-23 20:58:09 +00:00
virtualisation.docker.rootless = {
enable = true;
# Sets the `DOCKER_HOST` variable to the rootless Docker instance for normal
# users by default.
setSocketVariable = true;
};
2024-01-22 23:47:19 +00:00
system.stateVersion = "23.11";
}