waybar config, add calufrax (laptop), etc

This commit is contained in:
alyx 2026-02-23 17:32:32 +00:00
parent e4e1bea480
commit b6e449dd48
Signed by: alyx
SSH key fingerprint: SHA256:jnVDhAlcSXL67FEpIYmr80+FnLv93q3S2MtZ92ohQeA
7 changed files with 160 additions and 5 deletions

View file

@ -60,5 +60,27 @@
} }
]; ];
}; };
nixosConfigurations."calufrax" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = { inherit inputs; };
modules = [
./hosts/calufrax
./variables.nix
{ config.var.username = "alyx";
config.var.hostname = "calufrax";
config.var.timezone = "Europe/London";
config.var.class = "desktop";
}
home-manager.nixosModules.home-manager {
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.sharedModules = [{ imports = with inputs; [nix-index-database.homeModules.default];}];
home-manager.users.alyx = ./home;
}
];
};
}; };
} }

View file

@ -118,7 +118,17 @@
wayland.windowManager.sway.package = pkgs.swayfx; wayland.windowManager.sway.package = pkgs.swayfx;
wayland.windowManager.sway.config = null; wayland.windowManager.sway.config = null;
wayland.windowManager.sway.extraConfigEarly = (if osConfig.var.username == "alyx" then ''set $mod Mod1'' else ''set $mod Mod4''); #wayland.windowManager.sway.extraConfigEarly = (if osConfig.var.username == "alyx" then ''set $mod Mod1'' else ''set $mod Mod4'');
wayland.windowManager.sway.extraConfigEarly =
(if osConfig.var.username == "alyx" then ''set $mod Mod1
'' else ''set $mod Mod4
'') + (if osConfig.var.hostname == "calufrax" then ''
input 1:1:AT_Translated_Set_2_keyboard {
xkb_layout "gb"
xkb_variant "colemak"
}
'' else '''');
wayland.windowManager.sway.extraConfig = '' wayland.windowManager.sway.extraConfig = ''
include ~/.config/nixos/home/wms/sway include ~/.config/nixos/home/wms/sway

View file

@ -1,8 +1,8 @@
[{ [{
"position": "top", "position": "top",
"modules-left": ["group/traydrawer", "custom/weather"], "modules-left": ["group/traydrawer", "custom/weather", "battery", "power-profiles-daemon"],
"modules-center": ["cpu", "group/mpdcontrols", "cpu#frequency"], "modules-center": ["cpu", "group/mpdcontrols", "cpu#frequency"],
"modules-right": ["clock", "wireplumber", "battery", "memory", "disk", "group/poweroptions"], "modules-right": ["clock", "wireplumber", "memory", "disk", "group/poweroptions"],
"margin-top": 8, "margin-top": 8,
"margin-left": 8, "margin-left": 8,
"margin-right": 8, "margin-right": 8,
@ -26,6 +26,18 @@
"tooltip-format": "BAT0, {power}W", "tooltip-format": "BAT0, {power}W",
}, },
"power-profiles-daemon": {
"format": "{icon} {profile}",
"tooltip-format": "Power profile: {profile}\nDriver: {driver}",
"tooltip": true,
"format-icons": {
"default": "",
"performance": "",
"balanced": " ",
"power-saver": " "
}
},
"group/mpdcontrols": { "group/mpdcontrols": {
"orientation": "inherit", "orientation": "inherit",
"drawer": { "drawer": {
@ -68,6 +80,11 @@
"format": " " "format": " "
}, },
"tray": {
"icon-size": 15,
"spacing": 10,
},
"custom/systemadvisory": { "custom/systemadvisory": {
"format": "󱖫 " "format": "󱖫 "
}, },

View file

@ -10,6 +10,7 @@
#cpu, #cpu,
#cpu-frequency, #cpu-frequency,
#battery, #battery,
#power-profiles-daemon,
#clock, #clock,
#memory, #memory,
#disk, #disk,

View file

@ -149,7 +149,7 @@ exec "/nix/store/pb9dhpk6qxjybb8p7prvs18ls2vxk51a-dbus-1.14.10/bin/dbus-update-a
blur enable blur enable
corner_radius 10 corner_radius 10
shadows enable - not using this because of flicker shadows enable
default_dim_inactive 0.3 default_dim_inactive 0.3
client.focused 000000 00ffff 000000 00ffff client.focused 000000 00ffff 000000 00ffff
for_window [title="Picture-in-Picture"] dim_inactive 0.0 for_window [title="Picture-in-Picture"] dim_inactive 0.0

View file

@ -0,0 +1,72 @@
{ config, pkgs, lib, inputs, ...}:{
imports = [
./hardware-configuration.nix
../generic.nix
];
hardware.bluetooth.enable = true;
services.blueman.enable = true;
boot.initrd.luks.devices = {
crypted = {
device = "/dev/disk/by-partuuid/5c614ca4-71bc-4ba7-a603-bf168f671533";
allowDiscards = true;
preLVM = true;
};
};
services.upower.enable = true;
services.power-profiles-daemon.enable = true;
services.xserver.xkb = {
layout = lib.mkForce "gb";
variant = lib.mkForce "colemak";
};
console.useXkbConfig = true;
console.earlySetup = true;
programs.bash.shellAliases = {
nano = "nvim";
};
services.displayManager.ly = {
enable = true;
settings.animation = "colormix";
};
boot.kernelModules = [ "kvm-intel" "vhost_vsock" "vfio_virqfd" "vhost-net" "vfio_pci" "vfio_iommu_type1" "vfio"];
boot.kernelParams = [ "intel_iommu=on" "iommu=pt" "i915.force_probe=!7d51" "xe.force_probe=7d51" ];
services.printing.enable = true;
services.printing.drivers = [pkgs.gutenprint];
programs.virt-manager.enable = true;
users.groups.libvirtd.members = ["alyx"];
virtualisation.libvirtd.enable = true;
virtualisation.libvirtd.onBoot = "ignore";
virtualisation.libvirtd.onShutdown = "shutdown";
virtualisation.libvirtd.qemu.package = pkgs.qemu_kvm;
virtualisation.libvirtd.qemu.swtpm.enable = true;
virtualisation.libvirtd.qemu.runAsRoot = true;
virtualisation.spiceUSBRedirection.enable = true;
users.users."qemu-libvirtd" = {
extraGroups = [ "kvm" "input" ];
isSystemUser = true;
};
boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest;
hardware.graphics.extraPackages = with pkgs; [vpl-gpu-rt mesa.opencl libvdpau-va-gl intel-media-driver intel-vaapi-driver libva-vdpau-driver vulkan-validation-layers];
hardware.graphics.extraPackages32 = with pkgs; [driversi686Linux.mesa.opencl];
users.users.${config.var.username} = {
description = "Alyx Wren";
extraGroups = [ "networkmanager" "wheel" "camera" "input" "adbusers" "inputs" "uinput" "pipewire" "kvm" "qemu-libvirt" "qemu-libvirtd" "lxd" "libvirtd" ];
};
}

View file

@ -0,0 +1,33 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/vg-nixos";
fsType = "xfs";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/C0F5-6023";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
swapDevices =
[ { device = "/dev/mapper/vg-swap"; }
];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}