1
0
forked from extern/nix-config
donovanglover-nix-config/containers/dev.nix
Donovan Glover 57d6e3ea14
meta: Don't autostart containers
Unfortunately not possible (at least non-trivially) since containers may
depend on a graphical instance already running.
2023-06-15 11:11:08 -04:00

52 lines
1.1 KiB
Nix

{ home-manager, ... }:
let
VARIABLES = import ../src/variables.nix;
in
{
containers.dev = {
privateNetwork = true;
ephemeral = true;
hostAddress = "192.168.100.30";
localAddress = "192.168.100.31";
bindMounts = {
"/mnt" = {
hostPath = "/home/${VARIABLES.username}/containers/dev";
isReadOnly = false;
};
};
config = { pkgs, ... }: {
imports = [
home-manager.nixosModules.home-manager
../modules/git
../modules/neovim
../modules/fish-starship
];
users = {
mutableUsers = false;
allowNoPasswordLogin = true;
users.user = {
isNormalUser = true;
home = "/home/user";
};
};
home-manager.users.user = { pkgs, ... }: {
home.packages = [ pkgs.atool pkgs.httpie ];
home.stateVersion = VARIABLES.stateVersion;
};
environment = {
variables = { TERM = "xterm-kitty"; };
defaultPackages = [ ];
};
environment.systemPackages = with pkgs; [ kitty ];
system.stateVersion = VARIABLES.stateVersion;
};
};
}