misc: zed editor, try to get scream working, other small changes
This commit is contained in:
parent
ab001fac00
commit
8a928e8f58
6 changed files with 67 additions and 27 deletions
|
@ -5,6 +5,7 @@
|
||||||
imports = [
|
imports = [
|
||||||
./apps/firefox.nix
|
./apps/firefox.nix
|
||||||
./apps/syncthing.nix
|
./apps/syncthing.nix
|
||||||
|
./apps/zed.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = [
|
home.packages = [
|
||||||
|
@ -23,7 +24,7 @@
|
||||||
pkgs.libreoffice
|
pkgs.libreoffice
|
||||||
pkgs.gimp
|
pkgs.gimp
|
||||||
pkgs.krita
|
pkgs.krita
|
||||||
pkgs.okular
|
pkgs.kdePackages.okular
|
||||||
pkgs.localsend
|
pkgs.localsend
|
||||||
|
|
||||||
pkgs.ffmpeg # Generally useful
|
pkgs.ffmpeg # Generally useful
|
||||||
|
@ -49,6 +50,7 @@
|
||||||
#pkgs.zed-editor
|
#pkgs.zed-editor
|
||||||
|
|
||||||
pkgs.obsidian
|
pkgs.obsidian
|
||||||
|
pkgs.quickemu
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.mpv.enable = true; # media player
|
programs.mpv.enable = true; # media player
|
||||||
|
|
22
home/apps/zed.nix
Normal file
22
home/apps/zed.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
programs.zed-editor = {
|
||||||
|
enable = true;
|
||||||
|
extensions = [
|
||||||
|
"dockerfile"
|
||||||
|
# disabled until https://github.com/eth0net/zed-docker-compose/issues/2
|
||||||
|
# "docker-compose"
|
||||||
|
|
||||||
|
"nix"
|
||||||
|
];
|
||||||
|
installRemoteServer = true;
|
||||||
|
userSettings = {
|
||||||
|
"vim_mode" = true;
|
||||||
|
"terminal"."shell"."program" = "fish";
|
||||||
|
|
||||||
|
"lsp"."package-version-server"."binary"."path" = pkgs.package-version-server + "/bin/package-version-server";
|
||||||
|
"lsp"."nixd"."binary"."path" = pkgs.nixd + "/bin/nixd";
|
||||||
|
"lsp"."nil"."binary"."path" = pkgs.nil + "/bin/nil";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -32,6 +32,7 @@
|
||||||
pkgs.pciutils # lspci
|
pkgs.pciutils # lspci
|
||||||
pkgs.usbutils # lsusb
|
pkgs.usbutils # lsusb
|
||||||
|
|
||||||
|
pkgs.btop
|
||||||
pkgs.bottom
|
pkgs.bottom
|
||||||
pkgs.htop
|
pkgs.htop
|
||||||
pkgs.lsof
|
pkgs.lsof
|
||||||
|
|
|
@ -6,9 +6,9 @@
|
||||||
...
|
...
|
||||||
}:
|
}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.disko.nixosModules.disko
|
inputs.disko.nixosModules.disko
|
||||||
|
|
||||||
./device.nix
|
./device.nix
|
||||||
./disk-config.nix
|
./disk-config.nix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
@ -28,7 +28,7 @@
|
||||||
./vm.nix
|
./vm.nix
|
||||||
(import ./kvmfr.nix { std = inputs.nix-std.lib; lib = lib; pkgs = pkgs; config = config; })
|
(import ./kvmfr.nix { std = inputs.nix-std.lib; lib = lib; pkgs = pkgs; config = config; })
|
||||||
./libvirtd.nix
|
./libvirtd.nix
|
||||||
|
|
||||||
./osrs.nix
|
./osrs.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
|
|
||||||
vfio = {
|
vfio = {
|
||||||
enable = true;
|
enable = true;
|
||||||
earlyKMS = true;
|
earlyKMS = true;
|
||||||
applyACSpatch = true;
|
applyACSpatch = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
# };
|
# };
|
||||||
|
|
||||||
# Allows referring to this flake by the shorthand `nixos-config`, which lets you do e.g.
|
# Allows referring to this flake by the shorthand `nixos-config`, which lets you do e.g.
|
||||||
# nix repl nixos-config
|
# nix repl nixos-config
|
||||||
nix.registry.nixos-config.to = {
|
nix.registry.nixos-config.to = {
|
||||||
type = "git";
|
type = "git";
|
||||||
url = "file://${config.users.users.evar.home}/git/nixos-framework-laptop-config";
|
url = "file://${config.users.users.evar.home}/git/nixos-framework-laptop-config";
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
# In order to catch all logs, we need to mount this early enough in the boot process.
|
# In order to catch all logs, we need to mount this early enough in the boot process.
|
||||||
fileSystems."/var/log".neededForBoot = true;
|
fileSystems."/var/log".neededForBoot = true;
|
||||||
|
|
||||||
zramSwap = {
|
zramSwap = {
|
||||||
enable = true;
|
enable = true;
|
||||||
memoryPercent = 25;
|
memoryPercent = 25;
|
||||||
|
@ -186,7 +186,11 @@
|
||||||
|
|
||||||
### System software
|
### System software
|
||||||
|
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = [
|
||||||
|
pkgs.unifi
|
||||||
|
|
||||||
pkgs.git
|
pkgs.git
|
||||||
pkgs.gdu
|
pkgs.gdu
|
||||||
|
|
||||||
|
@ -254,4 +258,4 @@
|
||||||
#
|
#
|
||||||
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
|
||||||
system.stateVersion = "23.11"; # Did you read the comment?
|
system.stateVersion = "23.11"; # Did you read the comment?
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
|
# to allow me to be an exit node
|
||||||
|
boot.kernel.sysctl."net.ipv4.ip_forward" = 1;
|
||||||
|
boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
|
||||||
|
|
||||||
services.tailscale = {
|
services.tailscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
openFirewall = true;
|
openFirewall = true;
|
||||||
|
|
45
nixos/vm.nix
45
nixos/vm.nix
|
@ -90,22 +90,26 @@ in {
|
||||||
|
|
||||||
networking.dhcpcd.denyInterfaces = [ "winvm0" ];
|
networking.dhcpcd.denyInterfaces = [ "winvm0" ];
|
||||||
|
|
||||||
|
# TODO: the below doesn't actually work, so I just
|
||||||
|
# disable wait-online entirely.
|
||||||
# ensure the bridge network doesn't cause us to wait
|
# ensure the bridge network doesn't cause us to wait
|
||||||
# on boot
|
# on boot
|
||||||
systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
# systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
||||||
|
systemd.network.wait-online.anyInterface = true;
|
||||||
boot.initrd.systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
boot.initrd.systemd.network.wait-online.ignoredInterfaces = [ "eth0" "winvm0" ];
|
||||||
|
|
||||||
# These are needed, since I'm not currently trying to
|
# These are needed, since I'm not currently trying to
|
||||||
# reserve a static IP for the bridge interface
|
# reserve a static IP for the bridge interface
|
||||||
|
networking.defaultGateway = { address = "10.0.0.1"; interface = "eth0"; };
|
||||||
networking.interfaces.winvm0 = {
|
networking.interfaces.winvm0 = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
ipv4 = {
|
ipv4 = {
|
||||||
addresses = [
|
addresses = [
|
||||||
{ address = "10.0.5.1"; prefixLength = 16; }
|
{ address = "10.0.5.1"; prefixLength = 24; }
|
||||||
];
|
];
|
||||||
routes = [{
|
routes = [{
|
||||||
address = "10.0.0.0";
|
address = "10.0.5.1";
|
||||||
prefixLength = 16;
|
prefixLength = 24;
|
||||||
options = { scope = "link"; metric = "900"; };
|
options = { scope = "link"; metric = "900"; };
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
@ -148,22 +152,25 @@ in {
|
||||||
|
|
||||||
# note that the VM needs 64 MB for the shmem in side the
|
# note that the VM needs 64 MB for the shmem in side the
|
||||||
# xml for the full res of the FW laptop
|
# xml for the full res of the FW laptop
|
||||||
# systemd.tmpfiles.rules = [
|
systemd.tmpfiles.rules = [
|
||||||
# "f /dev/shm/scream 0660 evar qemu-libvirtd -"
|
"f /dev/shm/scream 0660 evar qemu-libvirtd -"
|
||||||
# "f /dev/shm/looking-glass 0660 evar qemu-libvirtd -"
|
];
|
||||||
# ];
|
|
||||||
|
|
||||||
# service for hooking up scream for audio
|
# service for hooking up scream for audio
|
||||||
# systemd.user.services.scream-ivshmem = {
|
systemd.user.services.scream-ivshmem = {
|
||||||
# enable = true;
|
enable = true;
|
||||||
# description = "Scream IVSHMEM";
|
description = "Scream";
|
||||||
# serviceConfig = {
|
serviceConfig = {
|
||||||
# ExecStart = "${pkgs.scream}/bin/scream-ivshmem-pulse /dev/shm/scream";
|
ExecStart = "${pkgs.scream}/bin/scream -v -n scream -o pulse -m /dev/shm/scream";
|
||||||
# Restart = "always";
|
Restart = "always";
|
||||||
# };
|
};
|
||||||
# wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
# requires = [ "pulseaudio.service" ];
|
requires = [
|
||||||
# };
|
"pipewire-pulse.service"
|
||||||
|
"pipewire.service"
|
||||||
|
"sound.target"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
initrd.kernelModules = [
|
initrd.kernelModules = [
|
||||||
|
@ -215,7 +222,7 @@ in {
|
||||||
|
|
||||||
"interfaces" = "virbr0";
|
"interfaces" = "virbr0";
|
||||||
# note: localhost is the ipv6 localhost ::1
|
# note: localhost is the ipv6 localhost ::1
|
||||||
"hosts allow" = "192.168.122.";
|
"hosts allow" = "192.168.122. 100.64.0.0/10";
|
||||||
# "hosts deny" = "0.0.0.0/0";
|
# "hosts deny" = "0.0.0.0/0";
|
||||||
"guest account" = "nobody";
|
"guest account" = "nobody";
|
||||||
"map to guest" = "bad user";
|
"map to guest" = "bad user";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue