Merge pull request 'chore(update): remove lix patch, minor waybar changes' (#2) from update into main
Reviewed-on: https://git.cnix.dev/cnst/cnix/pulls/2
This commit was merged in pull request #2.
This commit is contained in:
@@ -97,7 +97,7 @@
|
||||
./nixos/services/greetd
|
||||
./nixos/services/gvfs
|
||||
./nixos/services/kanata
|
||||
./nixos/services/libvirtd
|
||||
./nixos/services/virtualisation
|
||||
./nixos/services/locate
|
||||
./nixos/services/mullvad
|
||||
./nixos/services/mullvad-netns
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
[
|
||||
{
|
||||
"height": 25,
|
||||
"layer": "top",
|
||||
"output": [
|
||||
"DP-3",
|
||||
"eDP-1"
|
||||
],
|
||||
"modules-left": [
|
||||
"group/system"
|
||||
],
|
||||
@@ -9,13 +15,12 @@
|
||||
"modules-right": [
|
||||
"custom/progress",
|
||||
"custom/systemd",
|
||||
"group/tray",
|
||||
"pulseaudio",
|
||||
"backlight",
|
||||
"battery",
|
||||
"date",
|
||||
"clock",
|
||||
"custom/dunst"
|
||||
"group/tray",
|
||||
"custom/dunst",
|
||||
"clock"
|
||||
],
|
||||
"backlight": {
|
||||
"format": "<span foreground='#928374'>{icon}</span> {percent}%",
|
||||
@@ -42,18 +47,9 @@
|
||||
"clock": {
|
||||
"interval": 60,
|
||||
"format": "{:%H:%M}",
|
||||
// "on-click": "calcurse-toggle.sh",
|
||||
// "on-click-right": "calsync.sh",
|
||||
"rotate": 0,
|
||||
"tooltip": false
|
||||
},
|
||||
// "date": {
|
||||
// "format": "<span foreground='#928374'></span> {%a, %d %b}",
|
||||
// "on-click": "calcurse-toggle.sh",
|
||||
// "on-click-right": "calsync.sh",
|
||||
// "rotate": 0,
|
||||
// "tooltip": false
|
||||
// },
|
||||
"cpu": {
|
||||
"format": "<span foreground='#928374'></span> {usage}%",
|
||||
"states": {
|
||||
@@ -125,16 +121,13 @@
|
||||
],
|
||||
"orientation": "inherit"
|
||||
},
|
||||
"height": 25,
|
||||
"hyprland/workspaces": {
|
||||
"active-only": false,
|
||||
"all-outputs": false,
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
"urgent": "",
|
||||
"active": "",
|
||||
"visible": "",
|
||||
"default": "",
|
||||
"empty": ""
|
||||
},
|
||||
"on-click": "activate",
|
||||
@@ -148,14 +141,11 @@
|
||||
"niri/workspaces": {
|
||||
"format": "{icon}",
|
||||
"format-icons": {
|
||||
// Named workspaces
|
||||
// (you need to configure them in niri)
|
||||
"browser": "",
|
||||
"discord": "",
|
||||
"chat": "<b></b>",
|
||||
// Icons by state
|
||||
"active": "",
|
||||
"default": ""
|
||||
"active": "",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"memory": {
|
||||
@@ -173,10 +163,6 @@
|
||||
"interval": 2,
|
||||
"tooltip-format": "{ifname}: {ipaddr}/{cidr}\n {bandwidthDownBits}\n {bandwidthUpBits}"
|
||||
},
|
||||
"output": [
|
||||
"DP-3",
|
||||
"eDP-1"
|
||||
],
|
||||
"pulseaudio": {
|
||||
"format": "<span foreground='#928374'>{icon}</span> {volume}% {format_source}",
|
||||
"format-bluetooth": "<span foreground='#928374'>{icon}</span> {volume}% {format_source}",
|
||||
|
||||
@@ -2,14 +2,25 @@
|
||||
all: unset;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
font-family: "DepartureMono Nerd Font", "Font Awesome 6 Free Solid";
|
||||
font-size: 14px;
|
||||
font-family:
|
||||
"DepartureMono Nerd Font", "Input Sans Compressed",
|
||||
"Font Awesome 6 Free Solid";
|
||||
font-size: 15px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
color: #fbf1c7;
|
||||
background-color: rgba(43, 45, 50, 0.6);
|
||||
background-color: rgba(43, 45, 50, 0.5);
|
||||
}
|
||||
|
||||
tooltip {
|
||||
background: rgba(50, 50, 50, 0.9);
|
||||
border: 1px solid rgba(100, 114, 125, 0.6);
|
||||
}
|
||||
tooltip label {
|
||||
color: #fbf1c7;
|
||||
font-family: "Input Sans Compressed";
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
@@ -23,14 +34,10 @@ window#waybar {
|
||||
|
||||
#workspaces button:hover {
|
||||
color: #ebdbb2;
|
||||
animation: ws_active 0s ease-in-out 1;
|
||||
transition: all 0.2s cubic-bezier(0.55, -0.68, 0.48, 1.682);
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: #fbf1c7;
|
||||
animation: ws_active 0s ease-in-out 1;
|
||||
transition: all 0.2s cubic-bezier(0.55, -0.68, 0.48, 1.682);
|
||||
}
|
||||
|
||||
#custom-logo {
|
||||
@@ -87,13 +94,14 @@ window#waybar {
|
||||
#memory,
|
||||
#backlight,
|
||||
#battery,
|
||||
#date,
|
||||
#clock {
|
||||
#date {
|
||||
padding: 0 3px;
|
||||
margin: 0 3px;
|
||||
}
|
||||
|
||||
#clock {
|
||||
padding: 0px 3px;
|
||||
margin: 0px 6px 0px 0px;
|
||||
font-family: "DepartureMono Nerd Font";
|
||||
}
|
||||
|
||||
@@ -132,12 +140,17 @@ window#waybar {
|
||||
}
|
||||
|
||||
#tray menu * {
|
||||
background-color: rgba(50, 48, 47, 0.9);
|
||||
background: rgba(50, 50, 50, 0.9);
|
||||
color: #fbf1c7;
|
||||
font-family: "Input Sans Compressed";
|
||||
padding: 2px 2px;
|
||||
}
|
||||
|
||||
#tray menu menuitem:hover {
|
||||
#tray menu {
|
||||
border: 1px solid rgba(100, 114, 125, 0.6);
|
||||
}
|
||||
|
||||
#tray menu item:hover {
|
||||
color: #4c7a5d;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,12 +6,15 @@
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.nixos.services.libvirtd;
|
||||
cfg = config.nixos.services.virtualisation;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nixos.services.libvirtd.enable = mkEnableOption "Enables libvirtd";
|
||||
nixos.services.virtualisation.enable = mkEnableOption "Enables virtualisation";
|
||||
};
|
||||
imports = [
|
||||
./vfio.nix
|
||||
];
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking.firewall.trustedInterfaces = [ "virbr0" ];
|
||||
@@ -21,7 +24,6 @@ in
|
||||
];
|
||||
|
||||
virtualisation = {
|
||||
kvmgt.enable = true;
|
||||
spiceUSBRedirection.enable = true;
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
@@ -34,5 +36,6 @@ in
|
||||
};
|
||||
};
|
||||
};
|
||||
nixos.services.virtualisation.vfio.enable = true;
|
||||
};
|
||||
}
|
||||
41
modules/nixos/services/virtualisation/vfio.nix
Normal file
41
modules/nixos/services/virtualisation/vfio.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
gpuIDs = [
|
||||
"1002:13c0"
|
||||
"1002:1640"
|
||||
];
|
||||
|
||||
vfioIds = "vfio-pci.ids=" + lib.concatStringsSep "," gpuIDs;
|
||||
baseBootKernelParams = config.boot.kernelParams or [ ];
|
||||
cfg = config.nixos.services.virtualisation.vfio;
|
||||
in
|
||||
{
|
||||
options = {
|
||||
nixos.services.virtualisation.vfio.enable =
|
||||
lib.mkEnableOption "Enable VFIO passthrough for the iGPU";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
boot = {
|
||||
initrd.kernelModules = [
|
||||
"vfio_pci"
|
||||
"vfio"
|
||||
"vfio_iommu_type1"
|
||||
];
|
||||
|
||||
kernelParams = [
|
||||
"amd_iommu=on"
|
||||
"iommu=pt"
|
||||
]
|
||||
++ [ vfioIds ];
|
||||
};
|
||||
|
||||
specialisation.vfio.configuration = {
|
||||
system.nixos.tags = [ "vfio" ];
|
||||
boot = {
|
||||
kernelParams = baseBootKernelParams ++ [ vfioIds ];
|
||||
blacklistedKernelModules = [ "amdgpu:0f:00.0" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user