switched from nixvim to nvf, including porting colour scheme over

This commit is contained in:
Gabriella Bere 2025-01-06 18:26:53 +00:00
parent 82268d652a
commit 38ff4ee9a8
4 changed files with 2367 additions and 306 deletions

2442
flake.lock generated

File diff suppressed because it is too large Load diff

169
flake.nix
View file

@ -18,8 +18,8 @@
flatpaks.url = "github:GermanBread/declarative-flatpak/stable-v3"; flatpaks.url = "github:GermanBread/declarative-flatpak/stable-v3";
# Nixvim neovim distro for easier nixified configuration # Nixvim neovim distro for easier nixified configuration
nixvim = { nvf = {
url = "github:nix-community/nixvim"; url = "github:notashelf/nvf";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
disko = { disko = {
@ -46,65 +46,64 @@
musnix.url = "github:musnix/musnix"; musnix.url = "github:musnix/musnix";
}; };
outputs = outputs = {
{ self,
self, nixpkgs-stable,
nixpkgs-stable, nixpkgs,
nixpkgs, nixpkgs-master,
nixpkgs-master, nur,
nur, home-manager,
home-manager, ...
... } @ inputs: let
}@inputs: system = "x86_64-linux";
let pkgs = import nixpkgs {
system = "x86_64-linux"; inherit system;
pkgs = import nixpkgs { config = {allowUnfree = true;};
inherit system; overlays = [
config = {allowUnfree = true;}; overlay-stable
overlays = [ overlay-master
overlay-stable nur.overlays.default
overlay-master
nur.overlays.default
];
};
genericModules = [
{
nix.registry.nixos.flake = inputs.self;
environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath;
nix.nixPath = [ "nixpkgs=${nixpkgs.outPath}" ];
}
]; ];
genericHomeModule = [ };
{ genericModules = [
nix.registry.nixos.flake = inputs.self; {
home-manager.useGlobalPkgs = true; nix.registry.nixos.flake = inputs.self;
home-manager.useUserPackages = true; environment.etc."nix/inputs/nixpkgs".source = nixpkgs.outPath;
} nix.nixPath = ["nixpkgs=${nixpkgs.outPath}"];
]; }
# Overlay definitions ];
# nixpkgs-unstable genericHomeModule = [
overlay-stable = final: prev: { {
stable = import nixpkgs-stable { nix.registry.nixos.flake = inputs.self;
inherit system; home-manager.useGlobalPkgs = true;
config.allowUnfree = true; home-manager.useUserPackages = true;
}; }
}; ];
# nixpkgs-master # Overlay definitions
overlay-master = final: prev: { # nixpkgs-unstable
master = import nixpkgs-master { overlay-stable = final: prev: {
inherit system; stable = import nixpkgs-stable {
config.allowUnfree = true;
};
};
in
{
nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
inherit pkgs; config.allowUnfree = true;
specialArgs = { };
inherit inputs; };
}; # nixpkgs-master
modules = genericModules ++ [ overlay-master = final: prev: {
master = import nixpkgs-master {
inherit system;
config.allowUnfree = true;
};
};
in {
nixosConfigurations.gabbielaptop = nixpkgs.lib.nixosSystem {
inherit system;
inherit pkgs;
specialArgs = {
inherit inputs;
};
modules =
genericModules
++ [
# Import nixos modules here # Import nixos modules here
./hosts/gabbielaptop/configuration.nix ./hosts/gabbielaptop/configuration.nix
./modules/nh.nix ./modules/nh.nix
@ -114,36 +113,38 @@
inputs.aagl.nixosModules.default inputs.aagl.nixosModules.default
inputs.lanzaboote.nixosModules.lanzaboote inputs.lanzaboote.nixosModules.lanzaboote
inputs.musnix.nixosModules.musnix inputs.musnix.nixosModules.musnix
# inputs.stylix.nixosModules.stylix # inputs.stylix.nixosModules.stylix
# inputs.home-manager.nixosModules.home-manager # inputs.home-manager.nixosModules.home-manager
# inputs.nixvim.homeManagerModules.nixvim # inputs.nixvim.homeManagerModules.nixvim
{ nix.settings = inputs.aagl.nixConfig; } # Setup cachix for aagl projects {nix.settings = inputs.aagl.nixConfig;} # Setup cachix for aagl projects
# { home-manager.users.blue = ./home-manager/home.nix; } # { home-manager.users.blue = ./home-manager/home.nix; }
]; ];
}; };
nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem { nixosConfigurations.biggerpi = nixpkgs.lib.nixosSystem {
inherit system; inherit system;
inherit pkgs; inherit pkgs;
modules = genericModules ++ [ modules =
genericModules
++ [
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
inputs.satisfactory-server.nixosModules.satisfactory inputs.satisfactory-server.nixosModules.satisfactory
./hosts/biggerpi/configuration.nix ./hosts/biggerpi/configuration.nix
./modules/satisfactory-server.nix ./modules/satisfactory-server.nix
]; ];
};
# Standalone home-manager config
homeConfigurations.blue = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
};
# Import home-manager modules here
modules = [
./home-manager/home.nix
inputs.nixvim.homeManagerModules.default
inputs.stylix.homeManagerModules.stylix # Not compatible with NixOS module as they will interfere with one another, use this when building on a non-NixOS machine
];
};
}; };
# Standalone home-manager config
homeConfigurations.blue = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs;
};
# Import home-manager modules here
modules = [
./home-manager/home.nix
inputs.nvf.homeManagerModules.default
inputs.stylix.homeManagerModules.stylix # Not compatible with NixOS module as they will interfere with one another, use this when building on a non-NixOS machine
];
};
};
} }

View file

@ -4,9 +4,7 @@
lib, lib,
inputs, inputs,
... ...
}: }: {
{
home.username = "blue"; home.username = "blue";
home.homeDirectory = "/home/blue"; home.homeDirectory = "/home/blue";
@ -14,12 +12,10 @@
./hyprland.nix ./hyprland.nix
./waybar.nix ./waybar.nix
./swaync.nix ./swaync.nix
# ./flatpak.nix
# ./sober.nix
./hyprlock.nix ./hyprlock.nix
./zsh.nix ./zsh.nix
./eza.nix ./eza.nix
./nixvim.nix ./nvf.nix
./nextcloud.nix ./nextcloud.nix
./git.nix ./git.nix
./stylix.nix ./stylix.nix
@ -32,14 +28,14 @@
services.gnome-keyring.enable = true; # used for protonmail-bridge and nextcloud-client services.gnome-keyring.enable = true; # used for protonmail-bridge and nextcloud-client
# Cursor configuration that I hope to one day understand, currently has a scaling issue but thats probably my fault # Cursor configuration that I hope to one day understand, currently has a scaling issue but thats probably my fault
# home.pointerCursor = # home.pointerCursor =
# let # let
# getFrom = url: hash: name: { # getFrom = url: hash: name: {
# gtk.enable = true; # gtk.enable = true;
# x11.enable = true; # x11.enable = true;
# name = name; # name = name;
# size = 24; # size = 24;
# package = # package =
# pkgs.runCommand "moveUp" {} '' # pkgs.runCommand "moveUp" {} ''
# mkdir -p $out/share/icons # mkdir -p $out/share/icons
# ln -s ${pkgs.fetchzip { # ln -s ${pkgs.fetchzip {
@ -49,7 +45,7 @@
# ''; # '';
# }; # };
# in # in
# getFrom # getFrom
# "https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz" # "https://github.com/ful1e5/fuchsia-cursor/releases/download/v2.0.0/Fuchsia-Pop.tar.gz"
# "sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk=" # "sha256-BvVE9qupMjw7JRqFUj1J0a4ys6kc9fOLBPx2bGaapTk="
# "Fuchsia-Pop"; # "Fuchsia-Pop";
@ -122,6 +118,6 @@
# ]; # ];
# }; # };
# }; # };
services.blueman-applet.enable = true; services.blueman-applet.enable = true;
} }

44
home-manager/nvf.nix Normal file
View file

@ -0,0 +1,44 @@
{config, ...}: {
programs.nvf = {
enable = true;
settings = {
vim = {
theme = {
enable = true;
name = "base16";
};
viAlias = true;
vimAlias = true;
lsp = {
enable = true;
};
languages = {
rust.enable = true;
nix.enable = true;
markdown.enable = true;
java.enable = true;
};
};
};
};
# Pulls stylix base16 colours into nvf for use in the vim theme.
# This works for colours generated from the wallpaper, colours set manually and colours pulled from a base16Scheme yaml file.
programs.nvf.settings.vim.theme.base16-colors = {
base00 = "${config.lib.stylix.colors.base00}";
base01 = "${config.lib.stylix.colors.base01}";
base02 = "${config.lib.stylix.colors.base02}";
base03 = "${config.lib.stylix.colors.base03}";
base04 = "${config.lib.stylix.colors.base04}";
base05 = "${config.lib.stylix.colors.base05}";
base06 = "${config.lib.stylix.colors.base06}";
base07 = "${config.lib.stylix.colors.base07}";
base08 = "${config.lib.stylix.colors.base08}";
base09 = "${config.lib.stylix.colors.base09}";
base0A = "${config.lib.stylix.colors.base0A}";
base0B = "${config.lib.stylix.colors.base0B}";
base0C = "${config.lib.stylix.colors.base0C}";
base0D = "${config.lib.stylix.colors.base0D}";
base0E = "${config.lib.stylix.colors.base0E}";
base0F = "${config.lib.stylix.colors.base0F}";
};
}