the great update

This commit is contained in:
2025-03-07 17:04:41 +09:00
parent 442f46f622
commit 6216fcd751
77 changed files with 732 additions and 305 deletions

View File

@@ -1,18 +1,23 @@
{ ... }:
{ pkgs, ... }:
{
hardware.pulseaudio = {
services.pulseaudio = {
support32Bit = true;
daemon.config = {
flat-volumes = "yes";
};
package = pkgs.pulseaudioFull;
};
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
#services.pipewire = {
# enable = true;
# alsa.enable = true;
# alsa.support32Bit = true;
# pulse.enable = true;
# jack.enable = true;
#};
environment.systemPackages = with pkgs; [
alsa-utils
];
}

View File

@@ -1,4 +1,4 @@
{ ... }: {
{ pkgs, ... }: {
imports = [
./audio
./bluetooth
@@ -11,6 +11,7 @@
./time
./users
./services
./vnc
./wm
./env.nix
./utils.nix

View File

@@ -2,6 +2,5 @@
{
environment.variables = {
EDITOR = "vim";
MOZ_ENABLE_WAYLAND = 1;
};
}

View File

@@ -8,7 +8,7 @@
waylandFrontend = true;
plasma6Support = true;
addons = with pkgs; [
#fcitx5-mozc
fcitx5-mozc
fcitx5-skk
];
};

View File

@@ -5,5 +5,5 @@
networkmanager.enable = true;
firewall.enable = true;
};
systemd.network.wait-online.enable = false;
systemd.services.NetworkManager-wait-online.enable = false;
}

View File

@@ -28,6 +28,7 @@
nixpkgs = {
config = {
allowUnfree = true;
allowBroken = true;
};
};
}

View File

@@ -6,8 +6,8 @@
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
open = false;
package = config.boot.kernelPackages.nvidiaPackages.production;
};
}

View File

@@ -1,6 +1,7 @@
{ ... }: {
imports = [
./cups
./docker
./flatpak
./libvirtd
./podman

View File

@@ -15,8 +15,5 @@
docker
docker-compose
docker-buildx
nvidia-container-toolkit
];
hardware.nvidia-container-toolkit.enable = lib.lists.elem "nvidia" config.services.xserver.videoDrivers;
}

View File

@@ -4,8 +4,8 @@
virtualisation.podman = {
enable = true;
dockerCompat = true;
dockerSocket.enable = true;
dockerCompat = false;
dockerSocket.enable = false;
defaultNetwork.settings.dns_enabled = true;
};

View File

@@ -13,9 +13,28 @@
"video"
"audio"
"libvirtd"
"nix"
"power"
"docker"
];
uid = 1000;
homix = true;
};
users.defaultUserShell = pkgs.bash;
security.sudo = {
enable = true;
extraRules = [
{
commands =
builtins.map (command: {
command = "/run/current-system/sw/bin/${command}";
options = ["NOPASSWD"];
})
[ "poweroff" "reboot" "nixos-rebuild" "systemctl" "nmtui" "tailscale" ];
groups = [ "wheel" ];
}
];
};
}

11
system/vnc/default.nix Normal file
View File

@@ -0,0 +1,11 @@
{ pkgs, lib, ... }:
let
use-vnc = pkgs.callPackage ./use-vnc-script.nix { };
in
{
environment.systemPackages = with pkgs; [
x11vnc
wayvnc
use-vnc
];
}

View File

@@ -0,0 +1,10 @@
{ pkgs, lib, ... }:
pkgs.writeShellScriptBin "use-vnc" ''
if [[ $XDG_SESSION_TYPE == "x11" ]]; then
x11vnc -display :0 &
else
wayvnc 0.0.0.0 &
fi
sudo echo $! > /var/run/use-vnc.pid
''