Nixos: Config overhaul + cleanup
This commit is contained in:
@ -32,30 +32,6 @@ rec {
|
||||
google = false;
|
||||
};
|
||||
|
||||
# emacs = {
|
||||
# enable = false;
|
||||
# pgtkNativeComp = false;
|
||||
# nativeComp = false;
|
||||
# nixpkgs = true;
|
||||
|
||||
# doom.enable = true;
|
||||
# doom.autoSync = true;
|
||||
# doom.autoUpgrade = false; # Very volatile as the upgrade fails sometimes with bleeding edge emacs
|
||||
# };
|
||||
|
||||
# TODO: Only sync protonmail using its bridge
|
||||
email = {
|
||||
enable = false;
|
||||
autosync = true;
|
||||
imapnotify = false;
|
||||
|
||||
# Use kmail as viewer for stuff synced by mbsync
|
||||
kmail = {
|
||||
enable = false;
|
||||
autostart = true;
|
||||
};
|
||||
};
|
||||
|
||||
firefox = {
|
||||
enable = true;
|
||||
wayland = true;
|
||||
@ -67,8 +43,6 @@ rec {
|
||||
|
||||
fish.enable = true;
|
||||
|
||||
helix.enable = false;
|
||||
|
||||
hyprland = {
|
||||
enable = true;
|
||||
# theme = "Three-Bears";
|
||||
@ -174,19 +148,12 @@ rec {
|
||||
|
||||
nnn.enable = true;
|
||||
|
||||
# ranger = {
|
||||
# enable = false;
|
||||
# preview = true;
|
||||
# };
|
||||
|
||||
rofi = {
|
||||
enable = true;
|
||||
# theme = "Three-Bears";
|
||||
theme = "Foggy-Lake";
|
||||
};
|
||||
|
||||
vscode.enable = false; # TODO: Had broken package ms-vscode-cpptools
|
||||
|
||||
waybar = {
|
||||
enable = true;
|
||||
};
|
||||
|
@ -1,25 +1,29 @@
|
||||
{inputs, ...}: {
|
||||
imports = [
|
||||
# Obsolete modules are kept in this folder for reference.
|
||||
# ./audio
|
||||
# ./emacs
|
||||
# ./email
|
||||
# ./flatpak
|
||||
# ./helix
|
||||
# ./gaming
|
||||
# ./misc
|
||||
# ./nextcloud
|
||||
# ./ranger
|
||||
# ./vscode
|
||||
|
||||
# My own HM modules
|
||||
./chromium
|
||||
./emacs
|
||||
./email
|
||||
./firefox
|
||||
./fish
|
||||
# ./flatpak
|
||||
# ./gaming
|
||||
./helix
|
||||
./hyprland
|
||||
./kitty
|
||||
# ./misc
|
||||
./neovim
|
||||
# ./nextcloud
|
||||
./nnn
|
||||
./ranger
|
||||
./rofi
|
||||
./vscode
|
||||
./waybar
|
||||
|
||||
# HM modules imported from the flake inputs
|
||||
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
|
@ -7,19 +7,20 @@
|
||||
mylib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
} @ inputs: let
|
||||
cfg = config.modules.hyprland;
|
||||
in {
|
||||
options.modules.hyprland = import ./options.nix {inherit lib mylib;};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# TODO: Can't get the nixosConfig from standalone HM...
|
||||
# assertions = [
|
||||
# {
|
||||
# assertion = (import <nixpkgs/nixos> {}).config.programs.hyprland.enable;
|
||||
# message = "Can't enable Hyprland module with Hyprland disabled!";
|
||||
# }
|
||||
# ];
|
||||
assertions = [
|
||||
{
|
||||
# This assertion is not possible if HM is used standalone,
|
||||
# because nixosConfig won't be available.
|
||||
assertion = inputs.nixosConfig.programs.hyprland.enable;
|
||||
message = "Can't enable Hyprland module with Hyprland disabled!";
|
||||
}
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
@ -15,6 +15,9 @@ in {
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
home = {
|
||||
file.".config/neovide/config.toml".source = ./neovide_config.ini;
|
||||
file.".config/vale/.vale.ini".source = ./vale_config.ini;
|
||||
|
||||
sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "nvim";
|
||||
@ -67,9 +70,6 @@ in {
|
||||
stylua
|
||||
]
|
||||
];
|
||||
|
||||
file.".config/neovide/config.toml".source = ./neovide_config.ini;
|
||||
file.".config/vale/.vale.ini".source = ./vale_config.ini;
|
||||
};
|
||||
|
||||
programs.nixvim = {
|
||||
@ -108,6 +108,7 @@ in {
|
||||
extraConfigLuaPost = builtins.readFile ./extraConfigLuaPost.lua;
|
||||
extraConfigLua = builtins.readFile ./extraConfigLua.lua;
|
||||
|
||||
# Those files will be added to the nvim runtimpath
|
||||
extraFiles = {
|
||||
# For this its probably important to set the default filetype to tex (see extraConfigLua)
|
||||
"ftplugin/tex/mappings.lua".text = mylib.generators.toLuaKeymap (import ./mappings_latex.nix {});
|
||||
@ -907,7 +908,6 @@ in {
|
||||
{name = "clojure_lsp";}
|
||||
{name = "cmake";}
|
||||
{name = "lua_ls";}
|
||||
# {name = "nil_ls";} # TODO: To use together with nixd, its hover functionality needs to be disabled to not conflict
|
||||
{
|
||||
name = "ltex";
|
||||
extraOptions.settings = {
|
||||
@ -916,9 +916,9 @@ in {
|
||||
};
|
||||
};
|
||||
}
|
||||
# {name = "nil_ls";} # Conflicts with nixd's hover
|
||||
{
|
||||
name = "nixd";
|
||||
# TODO: Figure out how to structure this attrset
|
||||
extraOptions.settings = {
|
||||
nixd = {
|
||||
nixpkgs = {
|
||||
@ -931,9 +931,10 @@ in {
|
||||
nixos = {
|
||||
expr = "(builtins.getFlake \"/home/${username}/NixFlake\").nixosConfigurations.${hostname}.options";
|
||||
};
|
||||
home_manager = {
|
||||
expr = "(builtins.getFlake \"/home/${username}/NixFlake\").homeConfigurations.\"${username}@${hostname}\".options";
|
||||
};
|
||||
# When using HM as a NixOS module, nixd's HM option completion doesn't work.
|
||||
# home_manager = {
|
||||
# expr = "(builtins.getFlake \"/home/${username}/NixFlake\").homeConfigurations.\"${username}@${hostname}\".options";
|
||||
# };
|
||||
};
|
||||
diagnostic = {
|
||||
suppress = [
|
||||
|
Reference in New Issue
Block a user