trying some "default" for nixos-remote
This commit is contained in:
202
system-config/services/containers/nixos-remote/default.nix
Normal file
202
system-config/services/containers/nixos-remote/default.nix
Normal file
@@ -0,0 +1,202 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
|
||||
options.sysconfig.opts.virtualization.nixos-remote.enable = lib.options.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
};
|
||||
|
||||
config = lib.mkIf config.sysconfig.opts.virtualization.nixos-remote.enable {
|
||||
|
||||
containers.nixos-remote = {
|
||||
|
||||
autoStart = false;
|
||||
privateNetwork = true;
|
||||
hostAddress = "192.168.100.10";
|
||||
localAddress = "192.168.100.17";
|
||||
|
||||
forwardPorts = [
|
||||
{
|
||||
containerPort = 5900;
|
||||
hostPort = 5910;
|
||||
}
|
||||
];
|
||||
|
||||
extraFlags = [ "-U" ];
|
||||
|
||||
config = {
|
||||
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
users.users.nixos = {
|
||||
isNormalUser = true;
|
||||
extraGroups = [ "wheel" ];
|
||||
initialPassword = "1234";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
extraSpecialArgs = { inherit inputs; };
|
||||
backupFileExtension = "backup";
|
||||
users.nixos = {
|
||||
|
||||
home.username = "nixos";
|
||||
|
||||
home.homeDirectory = "/home/nixos";
|
||||
|
||||
home.file = {
|
||||
".config/hypr/hyprland.conf".text = ''
|
||||
|
||||
monitor=HEADLESS-2,1920x1080@60,0x0,1
|
||||
|
||||
execOnce = ${pkgs.dunst}/bin/dunst & ${pkgs.wayvnc}/bin/wayvnc 0.0.0.0 &
|
||||
|
||||
input {
|
||||
kb_layout = us
|
||||
kb_variant =
|
||||
kb_model =
|
||||
kb_options =
|
||||
kb_rules =
|
||||
|
||||
follow_mouse = 1
|
||||
|
||||
touchpad {
|
||||
natural_scroll = yes
|
||||
}
|
||||
|
||||
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
|
||||
}
|
||||
|
||||
cursor {
|
||||
no_hardware_cursors = true
|
||||
}
|
||||
|
||||
general {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
gaps_in = 5
|
||||
gaps_out = 4
|
||||
border_size = 2
|
||||
col.active_border = $color1 $color5 100deg
|
||||
col.inactive_border = $color0
|
||||
|
||||
layout = dwindle
|
||||
}
|
||||
decoration { # See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
|
||||
rounding = 2
|
||||
|
||||
blur {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
|
||||
drop_shadow = yes
|
||||
shadow_range = 4
|
||||
shadow_render_power = 3
|
||||
col.shadow = rgba(1a1a1aee)
|
||||
}
|
||||
|
||||
animations {
|
||||
enabled = yes
|
||||
|
||||
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
|
||||
|
||||
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
|
||||
|
||||
animation = windows, 1, 7, myBezier
|
||||
animation = windowsOut, 1, 7, default, popin 80%
|
||||
animation = border, 1, 10, default
|
||||
animation = borderangle, 1, 8, default
|
||||
animation = fade, 1, 7, default
|
||||
animation = workspaces, 1, 6, default
|
||||
}
|
||||
|
||||
|
||||
|
||||
dwindle {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = yes # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = yes # you probably want this
|
||||
}
|
||||
|
||||
master {
|
||||
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
|
||||
new_status = "master"
|
||||
}
|
||||
|
||||
gestures {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = off
|
||||
}
|
||||
|
||||
misc {
|
||||
disable_hyprland_logo = false
|
||||
disable_splash_rendering = true
|
||||
force_default_wallpaper = 2
|
||||
}
|
||||
|
||||
$mainMod = ALT
|
||||
|
||||
bind = $mainMod, E, exec, kitty
|
||||
|
||||
bind = $mainMod, B, exec, firefox
|
||||
|
||||
bind = $mainMod, Q, killactive,
|
||||
|
||||
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix = {
|
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
||||
settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
videoDrivers = [ "nvidia" ];
|
||||
};
|
||||
displayManager = {
|
||||
enable = true;
|
||||
sddm = {
|
||||
enable = true;
|
||||
wayland.enable = true;
|
||||
settings = {
|
||||
Autologin = {
|
||||
User = "nixos";
|
||||
Session = "hyprland";
|
||||
Relogin = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment = {
|
||||
sessionVariables = {
|
||||
WLR_BACKENDS = "headless";
|
||||
WLR_LIBINPUT_NO_DEVICES = "1";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
systemPackages = with pkgs; [
|
||||
kitty
|
||||
firefox-wayland
|
||||
];
|
||||
};
|
||||
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
};
|
||||
|
||||
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user