added vm auto-resizing screens.

This commit is contained in:
Gabe Venberg 2024-05-09 17:47:54 -05:00
parent 43a47321e4
commit 07a4bf6477
11 changed files with 70 additions and 38 deletions

View file

@ -13,6 +13,7 @@ inputs.nixpkgs.lib.nixosSystem {
modules = [ modules = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./hardware-configuration.nix ./hardware-configuration.nix
../../roles/nixos/graphical-vm.nix
../../modules/hostopts.nix ../../modules/hostopts.nix
../../modules/nixos/common.nix ../../modules/nixos/common.nix
../../modules/nixos/printing.nix ../../modules/nixos/printing.nix
@ -54,11 +55,13 @@ inputs.nixpkgs.lib.nixosSystem {
xkb.variant = ""; xkb.variant = "";
}; };
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.${config.host.user} = { users.users.${config.host.user} = {
isNormalUser = true; isNormalUser = true;
description = "Gabe Venberg"; description = "Gabe Venberg";
shell = pkgs.nushell; shell = pkgs.zsh;
extraGroups = ["wheel"]; extraGroups = ["wheel"];
packages = with pkgs; [ packages = with pkgs; [
firefox firefox
@ -74,10 +77,6 @@ inputs.nixpkgs.lib.nixosSystem {
host = osConfig.host; host = osConfig.host;
home = { home = {
enable-speech = true; enable-speech = true;
nvim = {
enable-lsp = true;
enable-treesitter = true;
};
git = { git = {
profile = { profile = {
name = "Gabe Venberg"; name = "Gabe Venberg";
@ -87,7 +86,7 @@ inputs.nixpkgs.lib.nixosSystem {
}; };
}; };
imports = [ imports = [
../../roles/terminal.nix ../../roles/home-manager/terminal.nix
../../modules/home-manager/nvim ../../modules/home-manager/nvim
../../modules/home-manager/common.nix ../../modules/home-manager/common.nix
../../modules/home-manager/email.nix ../../modules/home-manager/email.nix

View file

@ -34,7 +34,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
home.username = "gabe"; home.username = "gabe";
home.homeDirectory = /home/gabe; home.homeDirectory = /home/gabe;
imports = [ imports = [
../roles/terminal.nix ../roles/home-manager/terminal.nix
../modules/home-manager/nvim ../modules/home-manager/nvim
../modules/home-manager/common.nix ../modules/home-manager/common.nix
../modules/home-manager/syncthing.nix ../modules/home-manager/syncthing.nix

View file

@ -37,7 +37,7 @@ inputs.home-manager.lib.homeManagerConfiguration {
home.username = "gabe"; home.username = "gabe";
home.homeDirectory = /home/gabe; home.homeDirectory = /home/gabe;
imports = [ imports = [
../roles/terminal.nix ../roles/home-manager/terminal.nix
../modules/home-manager/nvim ../modules/home-manager/nvim
../modules/home-manager/common.nix ../modules/home-manager/common.nix
../modules/home-manager/syncthing.nix ../modules/home-manager/syncthing.nix

View file

@ -13,6 +13,7 @@ inputs.nixpkgs.lib.nixosSystem {
modules = [ modules = [
inputs.home-manager.nixosModules.home-manager inputs.home-manager.nixosModules.home-manager
./hardware-configuration.nix ./hardware-configuration.nix
../../roles/nixos/graphical-vm.nix
../../modules/hostopts.nix ../../modules/hostopts.nix
../../modules/nixos/common.nix ../../modules/nixos/common.nix
../../modules/nixos/printing.nix ../../modules/nixos/printing.nix
@ -54,12 +55,13 @@ inputs.nixpkgs.lib.nixosSystem {
xkb.variant = ""; xkb.variant = "";
}; };
environment.shells = with pkgs; [nushell zsh]; programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
# Define a user account. Don't forget to set a password with passwd. # Define a user account. Don't forget to set a password with passwd.
users.users.${config.host.user} = { users.users.${config.host.user} = {
isNormalUser = true; isNormalUser = true;
description = "Gabe Venberg"; description = "Gabe Venberg";
shell = pkgs.nushell; shell = pkgs.zsh;
extraGroups = ["wheel"]; extraGroups = ["wheel"];
packages = with pkgs; [ packages = with pkgs; [
firefox firefox
@ -88,7 +90,7 @@ inputs.nixpkgs.lib.nixosSystem {
}; };
}; };
imports = [ imports = [
../../roles/terminal.nix ../../roles/home-manager/terminal.nix
../../modules/home-manager/nvim ../../modules/home-manager/nvim
../../modules/home-manager/common.nix ../../modules/home-manager/common.nix
inputs.nixvim.homeManagerModules.nixvim inputs.nixvim.homeManagerModules.nixvim

View file

@ -19,3 +19,6 @@ format:
home-gc: home-gc:
home-manager expire-generations -7days home-manager expire-generations -7days
nix store gc nix store gc
nixos-gc:
sudo nix-collect-garbage --delete-older-than 7d

View file

@ -25,6 +25,8 @@
home.packages = with pkgs; [ home.packages = with pkgs; [
maim maim
brightnessctl brightnessctl
arandr
dex
]; ];
services.playerctld.enable = true; services.playerctld.enable = true;
xsession.enable = true; xsession.enable = true;
@ -209,13 +211,18 @@
{ {
command = "betterlockscreen --lock blur"; command = "betterlockscreen --lock blur";
notification = false; notification = false;
always = true; always = false;
} }
{ {
command = "betterlockscreen --wall"; command = "betterlockscreen --wall";
notification = false; notification = false;
always = true; always = true;
} }
{
command = "dex --autostart";
notification = false;
always = false;
}
# { # {
# command = "~/.fehbg"; # command = "~/.fehbg";
# notification = false; # notification = false;

View file

@ -5,8 +5,7 @@
... ...
}: { }: {
options = { options = {
home = { home.git = {
git = {
workProfile = { workProfile = {
enable = lib.mkEnableOption "git work profile"; enable = lib.mkEnableOption "git work profile";
email = lib.mkOption { email = lib.mkOption {
@ -26,7 +25,6 @@
}; };
}; };
}; };
};
config = { config = {
programs.git = { programs.git = {

View file

@ -5,11 +5,11 @@
... ...
}: { }: {
imports = [ imports = [
../modules/home-manager/terminal/zsh.nix ../../modules/home-manager/terminal/zsh.nix
../modules/home-manager/terminal/git.nix ../../modules/home-manager/terminal/git.nix
../modules/home-manager/terminal/zellij ../../modules/home-manager/terminal/zellij
../modules/home-manager/terminal/ssh-agent.nix ../../modules/home-manager/terminal/ssh-agent.nix
../modules/home-manager/terminal/direnv.nix ../../modules/home-manager/terminal/direnv.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
sshfs sshfs

View file

@ -6,10 +6,10 @@
}: { }: {
imports = [ imports = [
./minimal-terminal.nix ./minimal-terminal.nix
../modules/home-manager/terminal/nushell ../../modules/home-manager/terminal/nushell
../modules/home-manager/terminal/starship.nix ../../modules/home-manager/terminal/starship.nix
../modules/home-manager/terminal/voice.nix ../../modules/home-manager/terminal/voice.nix
../modules/home-manager/terminal/tiny-irc.nix ../../modules/home-manager/terminal/tiny-irc.nix
]; ];
home.packages = with pkgs; [ home.packages = with pkgs; [
tre-command tre-command

View file

@ -0,0 +1,13 @@
{
config,
pkgs,
lib,
...
}: {
#note: needs to have something that autostarts desktop files.
services.spice-vdagentd.enable = true;
imports = [
./vm.nix
];
host.gui.enable = true;
}

10
roles/nixos/vm.nix Normal file
View file

@ -0,0 +1,10 @@
{
config,
pkgs,
lib,
inputs,
...
}: {
services.qemuGuest.enable = true;
host.isVm = true;
}