diff --git a/configuration.nix b/configuration.nix index d696dc5..abd89eb 100644 --- a/configuration.nix +++ b/configuration.nix @@ -4,17 +4,20 @@ pkgs, ... }: -let - home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/master.tar.gz"; -in { imports = [ - (import "${home-manager}/nixos") ./hardware-configuration.nix ./modules/system/nix/default.nix ]; - nixpkgs.config.allowUnfree = true; + nixpkgs = { + config = { + allowUnfree = true; + permittedInsecurePackages = [ + "freeimage-unstable-2021-11-01" + ]; + }; + }; nix.settings.experimental-features = [ "nix-command" "flakes" @@ -166,6 +169,7 @@ in fzf htop btop + kew # dev rustup @@ -264,6 +268,5 @@ in }; system.stateVersion = "unstable"; - home-manager.users.fabian = ./modules/home/home.nix; } diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..671759e --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + description = "fqbn207 shitty NixOS Configuration lol"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = + { + self, + nixpkgs, + home-manager, + }: + { + nixosConfigurations.poggers = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + users.fabian = import ./modules/home/home.nix; + }; + } + ]; + }; + }; +} diff --git a/modules/home/nix/nvim/cmp.nix b/modules/home/nix/nixvim/cmp.nix similarity index 100% rename from modules/home/nix/nvim/cmp.nix rename to modules/home/nix/nixvim/cmp.nix diff --git a/modules/home/nix/nvim/default.nix b/modules/home/nix/nixvim/default.nix similarity index 100% rename from modules/home/nix/nvim/default.nix rename to modules/home/nix/nixvim/default.nix diff --git a/modules/home/nix/nvim/dev.nix b/modules/home/nix/nixvim/dev.nix similarity index 100% rename from modules/home/nix/nvim/dev.nix rename to modules/home/nix/nixvim/dev.nix diff --git a/modules/home/nix/nvim/lsp.nix b/modules/home/nix/nixvim/lsp.nix similarity index 73% rename from modules/home/nix/nvim/lsp.nix rename to modules/home/nix/nixvim/lsp.nix index 98370e6..9877254 100644 --- a/modules/home/nix/nvim/lsp.nix +++ b/modules/home/nix/nixvim/lsp.nix @@ -54,12 +54,6 @@ enable = true; autostart = true; }; - rust_analyzer = { - enable = true; - autostart = true; - installRustc = true; - installCargo = true; - }; clangd = { enable = true; autostart = true; @@ -74,5 +68,31 @@ }; }; }; + rustaceanvim = { + enable = true; + settings = { + server = { + cmd = [ + "rustup" + "run" + "nightly" + "rust-analyzer" + ]; + default_settings = { + rust-analyzer = { + check = { + command = "clippy"; + }; + inlayHints = { + lifetimeElisionHints = { + enable = "always"; + }; + }; + }; + }; + standalone = false; + }; + }; + }; }; } diff --git a/modules/home/nix/nvim/lualine.nix b/modules/home/nix/nixvim/lualine.nix similarity index 100% rename from modules/home/nix/nvim/lualine.nix rename to modules/home/nix/nixvim/lualine.nix diff --git a/modules/home/nix/nvim/neotree.nix b/modules/home/nix/nixvim/neotree.nix similarity index 100% rename from modules/home/nix/nvim/neotree.nix rename to modules/home/nix/nixvim/neotree.nix diff --git a/modules/home/nix/nvim/nonels.nix b/modules/home/nix/nixvim/nonels.nix similarity index 100% rename from modules/home/nix/nvim/nonels.nix rename to modules/home/nix/nixvim/nonels.nix diff --git a/modules/home/nix/nvim/opts.nix b/modules/home/nix/nixvim/opts.nix similarity index 100% rename from modules/home/nix/nvim/opts.nix rename to modules/home/nix/nixvim/opts.nix diff --git a/modules/home/nix/nvim/treesitter.nix b/modules/home/nix/nixvim/treesitter.nix similarity index 100% rename from modules/home/nix/nvim/treesitter.nix rename to modules/home/nix/nixvim/treesitter.nix