feat(loona): a bunch of stuff

This commit is contained in:
Ashhhleyyy 2024-07-14 00:33:27 +01:00
parent 6216c95200
commit cdab35f904
Signed by: ash
GPG key ID: 83B789081A0878FB
7 changed files with 71 additions and 1 deletions

View file

@ -315,6 +315,22 @@
"type": "github"
}
},
"nixpkgs-zed": {
"locked": {
"lastModified": 1720763479,
"narHash": "sha256-7D4KeRoBKiSrjhKjCjkkNtdh4fUDmBVubdQMZokLQJE=",
"owner": "GaetanLepage",
"repo": "nixpkgs",
"rev": "f62f4aa5819324640d60158f38c8ed333b4de18f",
"type": "github"
},
"original": {
"owner": "GaetanLepage",
"ref": "zed",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"agenix": "agenix",
@ -324,6 +340,7 @@
"nixos-generators": "nixos-generators",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixpkgs-zed": "nixpkgs-zed",
"vscode-extensions": "vscode-extensions"
}
},

View file

@ -8,6 +8,10 @@
url = "github:NixOS/nixpkgs/nixos-unstable";
};
nixpkgs-zed = {
url = "github:GaetanLepage/nixpkgs/zed";
};
home-manager-stable = {
url = "github:nix-community/home-manager/release-24.05";
inputs.nixpkgs.follows = "nixpkgs-stable";
@ -36,12 +40,18 @@
agenix.url = "github:ryantm/agenix";
};
outputs = { self, nixpkgs-stable, nixpkgs-unstable, fsh, home-manager-stable, home-manager-unstable, nixos-generators, vscode-extensions, agenix, ... }:
outputs = { self, nixpkgs-stable, nixpkgs-unstable, nixpkgs-zed, fsh, home-manager-stable, home-manager-unstable, nixos-generators, vscode-extensions, agenix, ... }:
let
home-manager = home-manager-unstable;
zed-overlay = final: prev: {
# Inherit the changes into the overlay
inherit (nixpkgs-zed.legacyPackages.${prev.system})
zed-editor;
};
overlays = [
fsh.overlays.default
vscode-extensions.overlays.default
zed-overlay
];
overlays-module = ({ nixpkgs, ... }: {
nixpkgs.overlays = overlays;
@ -111,6 +121,7 @@
./home/ash/desktop.nix
./home/ash/emacs.nix
./home/ash/intellij.nix
./home/ash/lutris.nix
./home/ash/vscodium.nix
./home/ash/zoom.nix
];

View file

@ -7,6 +7,7 @@
gnome.gnome-sudoku
dino
thunderbird
# zed-editor
];
programs.direnv.enable = true;

5
home/ash/lutris.nix Normal file
View file

@ -0,0 +1,5 @@
{ config, pkgs, ... }: {
home.packages = with pkgs; [
lutris
];
}

View file

@ -26,6 +26,7 @@
tauri-apps.tauri-vscode
catppuccin.catppuccin-vsc
catppuccin.catppuccin-vsc-icons
ziglang.vscode-zig
]);
})
];

View file

@ -5,6 +5,7 @@
../../common/generic-uefi-zfs.nix
../../common/tailscale.nix
../../common/tpm.nix
../../roles/libvirt.nix
../../roles/podman.nix
./hardware-configuration.nix
];
@ -53,6 +54,22 @@
programs.steam.enable = true;
nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = pkgs: {
intel-vaapi-driver = pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
hardware.graphics = {
enable32Bit = true;
extraPackages = with pkgs; [
intel-media-driver # LIBVA_DRIVER_NAME=iHD
intel-vaapi-driver # LIBVA_DRIVER_NAME=i965 (older but works better for Firefox/Chromium)
libvdpau-va-gl
];
};
environment.sessionVariables = { LIBVA_DRIVER_NAME = "iHD"; };
boot.extraModulePackages = with config.boot.kernelPackages; [ xpadneo ];
virtualisation.waydroid.enable = true;
system.stateVersion = "22.11";

18
roles/libvirt.nix Normal file
View file

@ -0,0 +1,18 @@
{ pkgs, ... }: {
virtualisation.libvirtd = {
enable = true;
qemu = {
package = pkgs.qemu_kvm;
runAsRoot = true;
swtpm.enable = true;
ovmf = {
enable = true;
packages = [(pkgs.OVMF.override {
secureBoot = true;
tpmSupport = true;
}).fd];
};
};
};
users.users.ash.extraGroups = ["libvirtd"];
}