This repository has been archived on 2024-04-14. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-dotfiles/flake.nix

191 lines
4.9 KiB
Nix
Raw Normal View History

2022-08-07 15:46:46 +01:00
{
description = "My personal dotfiles";
inputs = {
2022-08-21 01:18:19 +01:00
nixpkgs.url = "nixpkgs/nixpkgs-unstable";
2022-08-07 19:14:22 +01:00
2022-08-09 13:29:24 +01:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-08-07 19:14:22 +01:00
2022-11-14 11:58:04 +00:00
hyprland = {
url = "github:hyprwm/Hyprland";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-10-03 23:21:40 +01:00
# Fish Plugins
bobthefish = {
url = "github:oh-my-fish/theme-bobthefish";
flake = false;
};
2022-08-08 10:01:42 +01:00
# Kakoune Plugins
2022-08-09 13:29:24 +01:00
kakoune-smarttab = {
url = "github:andreyorst/smarttab.kak";
flake = false;
};
2022-09-04 00:54:47 +01:00
kakoune-sort-selections = {
url = "github:occivink/kakoune-sort-selections";
2022-08-09 13:29:24 +01:00
flake = false;
};
2022-08-08 10:01:42 +01:00
# Kakoune Plugins End
2022-08-09 13:29:24 +01:00
rofi-theme = {
url = "github:bardisty/gruvbox-rofi";
flake = false;
};
2022-08-07 15:46:46 +01:00
2022-09-04 00:54:47 +01:00
wlroots-git = {
url = "git+https://gitlab.freedesktop.org/wlroots/wlroots.git";
flake = false;
};
sway-git = {
url = "github:swaywm/sway";
flake = false;
};
2022-09-20 14:26:47 +01:00
gamescope-git = {
url = "github:Plagman/gamescope";
flake = false;
};
2022-09-10 05:44:34 +01:00
xorg-git = {
url = "git+https://gitlab.freedesktop.org/xorg/xserver.git";
flake = false;
};
mesa-git = {
url = "git+https://gitlab.freedesktop.org/mesa/mesa.git";
flake = false;
};
grub2-themes = {
url = "github:vinceliuice/grub2-themes";
inputs.nixpkgs.follows = "nixpkgs";
};
2022-11-14 11:58:04 +00:00
waybar = {
url = "github:alexays/waybar";
flake = false;
};
2022-08-21 01:18:19 +01:00
};
2022-08-14 21:20:39 +01:00
2022-10-03 23:21:40 +01:00
outputs = { self, nixpkgs, home-manager, ... }@inputs:
2022-08-07 15:46:46 +01:00
let
system = "x86_64-linux";
pkgs = import nixpkgs {
2022-08-07 19:14:22 +01:00
inherit system;
2022-08-14 21:20:39 +01:00
config = {
allowUnfree = true;
allowUnsupportedSystem = true;
};
2022-09-20 14:26:47 +01:00
overlays = [ self.overlays.default ];
2022-08-07 15:46:46 +01:00
};
in
{
2022-10-03 23:21:40 +01:00
overlays.default = final: prev: rec {
nerdfonts = prev.nerdfonts.override { fonts = [ "JetBrainsMono" ]; };
2022-09-04 00:54:47 +01:00
2022-09-20 14:26:47 +01:00
wlroots-git = prev.wlroots.overrideAttrs (old: {
2022-10-03 23:21:40 +01:00
version = "git";
2022-09-04 00:54:47 +01:00
src = inputs.wlroots-git;
2022-11-14 11:58:04 +00:00
nativeBuildInputs = old.nativeBuildInputs ++ [ pkgs.cmake pkgs.hwdata ];
postPatch = ''
substituteInPlace backend/drm/meson.build \
--replace "/usr/share/hwdata/pnp.ids" "${pkgs.hwdata}/share/hwdata/pnp.ids"
'';
2022-08-07 19:14:22 +01:00
});
2022-09-20 14:26:47 +01:00
sway-unwrapped = (prev.sway-unwrapped.overrideAttrs (old: {
2022-10-03 23:21:40 +01:00
version = "git";
buildInputs = old.buildInputs ++ [ prev.xorg.xcbutilwm prev.pcre2 ];
nativeBuildInputs = old.nativeBuildInputs ++ [ prev.cmake ];
2022-09-04 00:54:47 +01:00
src = inputs.sway-git;
2022-11-14 11:58:04 +00:00
})).override {
wlroots = wlroots-git;
};
2022-09-20 14:26:47 +01:00
2022-11-14 11:58:04 +00:00
waybar = (prev.waybar.overrideAttrs (old: {
version = "git";
src = inputs.waybar;
})).override {
wlroots = wlroots-git;
};
2022-09-04 00:54:47 +01:00
2022-11-14 11:58:04 +00:00
#xwayland = prev.xwayland.overrideAttrs (old: {
# version = "git";
#
# src = inputs.xorg-git;
2022-09-28 13:34:44 +01:00
# buildInputs = old.buildInputs ++ [
# prev.udev
# prev.xorg.libpciaccess
# ];
# });
2022-09-04 00:54:47 +01:00
2022-09-20 14:26:47 +01:00
steam = prev.steam.override {
extraPkgs = pkgs: [
pkgs.gnome.zenity
pkgs.gamescope
pkgs.libkrb5
pkgs.keyutils
2022-11-14 11:58:04 +00:00
pkgs.mpg123
];
extraLibraries = pkgs: [
pkgs.mpg123
2022-09-20 14:26:47 +01:00
];
};
gamescope = prev.gamescope.overrideAttrs (old: {
2022-10-03 23:21:40 +01:00
version = "git";
2022-09-20 14:26:47 +01:00
src = inputs.gamescope-git;
});
2022-09-28 13:34:44 +01:00
mesa-git = (prev.mesa.overrideAttrs (old: {
2022-10-03 23:21:40 +01:00
version = "git";
2022-09-28 13:34:44 +01:00
src = inputs.mesa-git;
2022-11-14 11:58:04 +00:00
buildInputs = old.buildInputs ++ [ pkgs.glslang pkgs.vulkan-loader ];
2022-09-28 13:34:44 +01:00
patches = [
2022-11-14 11:58:04 +00:00
./pkgs/patches/mesa-git/opencl.patch
./pkgs/patches/mesa-git/disk_cache-include-dri-driver-path-in-cache-key.patch
2022-09-28 13:34:44 +01:00
];
2022-10-03 23:21:40 +01:00
mesonFlags = pkgs.lib.lists.remove
"-Dxvmc-libs-path=${placeholder "drivers"}/lib"
old.mesonFlags; # xvmc was removed upstream
2022-09-28 13:34:44 +01:00
})).override {
2022-11-14 11:58:04 +00:00
galliumDrivers = [ "radeonsi" "swrast" "zink" ];
2022-09-28 13:34:44 +01:00
vulkanDrivers = [ "amd" ];
enableGalliumNine = false; # Replaced by DXVK
};
2022-10-03 23:21:40 +01:00
};
2022-11-14 11:58:04 +00:00
nixosConfigurations.terra = nixpkgs.lib.nixosSystem {
2022-10-03 23:21:40 +01:00
inherit system;
inherit pkgs;
specialArgs = { inherit inputs; };
modules = [
{
#needed to get tools working that expect a nixpkgs channel to exist
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
nix.registry = { nixpkgs.flake = nixpkgs; };
}
./system/configuration.nix
home-manager.nixosModules.home-manager
{
home-manager = {
useUserPackages = true;
2022-11-14 11:58:04 +00:00
users.manuel = import ./user/home.nix;
2022-10-03 23:21:40 +01:00
extraSpecialArgs = { inherit inputs pkgs; };
};
}
inputs.grub2-themes.nixosModule
];
};
2022-08-07 15:46:46 +01:00
};
}