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

169 lines
4.4 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-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-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
2022-08-07 20:02:21 +01:00
username = "manuel";
2022-08-08 10:01:42 +01:00
hostname = "terra";
2022-08-07 20:02:21 +01:00
2022-08-07 15:46:46 +01:00
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-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-09-28 13:34:44 +01:00
})).override { wlroots = wlroots-git; };
2022-09-20 14:26:47 +01:00
2022-10-03 23:21:40 +01:00
waybar = prev.waybar.override { wlroots = wlroots-git; };
2022-09-04 00:54:47 +01:00
2022-09-28 13:34:44 +01:00
# xwayland = prev.xwayland.overrideAttrs (old: {
# version = "22.2";
# src = inputs.xorg-git;
# 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
];
};
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-10-03 23:21:40 +01:00
buildInputs = old.buildInputs ++ [ pkgs.glslang ];
2022-09-28 13:34:44 +01:00
patches = [
./pkgs/mesa-git/opencl.patch
./pkgs/mesa-git/disk_cache-include-dri-driver-path-in-cache-key.patch
];
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 {
galliumDrivers = [ "radeonsi" "swrast" ];
vulkanDrivers = [ "amd" ];
enableGalliumNine = false; # Replaced by DXVK
};
2022-10-03 23:21:40 +01:00
fzf = prev.fzf.overrideAttrs (old: { version = "0.33.0"; });
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
nixosConfigurations.${hostname} = nixpkgs.lib.nixosSystem {
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;
users.${username} = import ./user/home.nix;
extraSpecialArgs = { inherit inputs pkgs; };
};
}
inputs.grub2-themes.nixosModule
];
};
2022-08-07 15:46:46 +01:00
};
}