WIP networking stuff
This commit is contained in:
@@ -9,35 +9,42 @@ in
|
|||||||
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
(modulesPath + "/virtualisation/proxmox-lxc.nix")
|
||||||
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz}/nixos")
|
(import "${builtins.fetchTarball https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz}/nixos")
|
||||||
(fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master")
|
(fetchTarball "https://github.com/nix-community/nixos-vscode-server/tarball/master")
|
||||||
|
./users.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
(pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch")
|
(pkgs.writeShellScriptBin "nrbs" "sudo nixos-rebuild switch")
|
||||||
(pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch")
|
(pkgs.writeShellScriptBin "nrbsu" "sudo nix-channel --update && sudo nixos-rebuild switch")
|
||||||
bash
|
bash
|
||||||
|
busybox
|
||||||
git
|
git
|
||||||
eza
|
eza
|
||||||
gh
|
gh
|
||||||
];
|
];
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
# For SSH access
|
||||||
services.vscode-server.enable = true;
|
|
||||||
services.openssh.enable = true;
|
services.openssh.enable = true;
|
||||||
|
|
||||||
|
# Networking stuff
|
||||||
|
# networking.interfaces.eth0.useDHCP = true;
|
||||||
|
# services.resolved = { enable = true; dns = "default"; };
|
||||||
|
# services.resolved.enable = true;
|
||||||
|
# networking.nameservers = [ "192.168.1.1" ];
|
||||||
|
# services.avahi = { enable = true; nssmdns4 = true; };
|
||||||
|
|
||||||
|
# Enables some tools
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
services.vscode-server.enable = true;
|
||||||
|
|
||||||
system.activationScripts.startup = ''
|
system.activationScripts.startup = ''
|
||||||
echo "Starting Nix-Docker container"
|
echo "Starting Nix-Docker container"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
# Uses rust-based sudo
|
||||||
security.sudo-rs = {
|
security.sudo-rs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
execWheelOnly = false;
|
execWheelOnly = false;
|
||||||
wheelNeedsPassword = false;
|
wheelNeedsPassword = false; # allows sudo without password for those in the wheel group
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.myuser = {
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "docker" ];
|
|
||||||
openssh.authorizedKeys.keyFiles = [ "/root/.ssh/authorized_keys" ];
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
13
users.nix
Normal file
13
users.nix
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
users.users.myuser = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel" # needed for sudo without password
|
||||||
|
"docker" # needed for docker without sudo
|
||||||
|
];
|
||||||
|
openssh.authorizedKeys.keyFiles = [
|
||||||
|
"/root/.ssh/authorized_keys" # should already have your public SSH key inside
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user