diff --git a/README.md b/README.md index c72aebd..ef47750 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # nix-config -My configs for both nixos and home manager only machines0 \ No newline at end of file +My configs for both nixos and home manager only machines diff --git a/flake.nix b/flake.nix index 42a20fd..50f1dda 100644 --- a/flake.nix +++ b/flake.nix @@ -32,23 +32,23 @@ formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; # NixOS configuration entrypoint # Available through 'nixos-rebuild --flake .#your-hostname' - nixosConfigurations = { - archlaptop = nixpkgs.lib.nixosSystem { -system="x86_64-linux"; - specialArgs = {inherit inputs outputs;}; - # > Our main nixos configuration file < - modules = [ - ./hosts/archlaptop/configuration.nix - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs=true; - home-manager.useUserPackages=true; - home-manager.users.gabe = import ./hosts/archlaptop/home.nix; - home-manager.extraSpecialArgs = {inherit inputs outputs;}; - } - ]; - }; - }; + nixosConfigurations = { + archlaptop = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = {inherit inputs outputs;}; + # > Our main nixos configuration file < + modules = [ + ./hosts/archlaptop/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.gabe = import ./hosts/archlaptop/home.nix; + home-manager.extraSpecialArgs = {inherit inputs outputs;}; + } + ]; + }; + }; # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' diff --git a/hosts/archlaptop/configuration.nix b/hosts/archlaptop/configuration.nix index 7058914..c8de21e 100644 --- a/hosts/archlaptop/configuration.nix +++ b/hosts/archlaptop/configuration.nix @@ -1,21 +1,21 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, pkgs, ... }: - { - imports = - [ # Include the results of the hardware scan. - ./hardware-configuration.nix - ]; + config, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; # Bootloader. - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/vda"; - boot.loader.grub.useOSProber = true; + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "nixos"; # Define your hostname. + networking.hostName = "archlaptop"; # Define your hostname. # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant. # Configure network proxy if necessary @@ -43,12 +43,12 @@ LC_TIME = "en_US.UTF-8"; }; -nix={ -package=pkgs.nixFlakes; -extraOptions='' -experimental-features = nix-command flakes -''; -}; + nix = { + package = pkgs.nixFlakes; + extraOptions = '' + experimental-features = nix-command flakes + ''; + }; # Enable the X11 windowing system. services.xserver.enable = true; @@ -90,10 +90,10 @@ experimental-features = nix-command flakes users.users.gabe = { isNormalUser = true; description = "Gabe Venberg"; - extraGroups = [ "networkmanager" "wheel" ]; + extraGroups = ["networkmanager" "wheel"]; packages = with pkgs; [ firefox - # thunderbird + # thunderbird ]; }; @@ -133,5 +133,4 @@ experimental-features = nix-command flakes # Before changing this value read the documentation for this option # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). system.stateVersion = "23.11"; # Did you read the comment? - } diff --git a/hosts/archlaptop/hardware-configuration.nix b/hosts/archlaptop/hardware-configuration.nix index 3a1997e..74b8333 100644 --- a/hosts/archlaptop/hardware-configuration.nix +++ b/hosts/archlaptop/hardware-configuration.nix @@ -1,26 +1,30 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + imports = [ + (modulesPath + "/profiles/qemu-guest.nix") + ]; - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk"]; + boot.initrd.kernelModules = []; + boot.kernelModules = ["kvm-amd"]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "/dev/disk/by-uuid/87ee53a2-077d-47df-9051-9abcc0fc1a89"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/87ee53a2-077d-47df-9051-9abcc0fc1a89"; + fsType = "ext4"; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/5aa8725e-fdd1-4825-9d2c-e2c2c165b726"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-uuid/5aa8725e-fdd1-4825-9d2c-e2c2c165b726";} + ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's diff --git a/hosts/archlaptop/home.nix b/hosts/archlaptop/home.nix index 59ed18e..f2f531a 100644 --- a/hosts/archlaptop/home.nix +++ b/hosts/archlaptop/home.nix @@ -1,5 +1,5 @@ { -inputs, + inputs, config, pkgs, lib, @@ -9,13 +9,13 @@ inputs, # manage. # machine specific options host.enable-speech = true; - #host.nvim.enable-lsp = true; - #host.nvim.enable-treesitter = true; + host.nvim.enable-lsp = true; + host.nvim.enable-treesitter = true; home.username = "gabe"; home.homeDirectory = "/home/gabe"; imports = [ - ../../terminal/home.nix -inputs.nixvim.homeManagerModules.nixvim + ../../terminal/terminal.nix + inputs.nixvim.homeManagerModules.nixvim ]; } diff --git a/hosts/gabe-archlaptop.nix b/hosts/gabe-archlaptop.nix index 12f5633..a6a8fab 100644 --- a/hosts/gabe-archlaptop.nix +++ b/hosts/gabe-archlaptop.nix @@ -15,6 +15,6 @@ home.username = "gabe"; home.homeDirectory = "/home/gabe"; imports = [ - ../terminal/home.nix + ../terminal/terminal.nix ]; } diff --git a/hosts/non-nixos-server.nix b/hosts/non-nixos-server.nix index 58fb1c9..ccada06 100644 --- a/hosts/non-nixos-server.nix +++ b/hosts/non-nixos-server.nix @@ -15,6 +15,6 @@ home.username = "gabe"; home.homeDirectory = "/home/gabe"; imports = [ - ../terminal/home.nix + ../terminal/terminal.nix ]; } diff --git a/terminal/git.nix b/modules/home-manager/terminal/git.nix similarity index 100% rename from terminal/git.nix rename to modules/home-manager/terminal/git.nix diff --git a/terminal/nushell/config.nu b/modules/home-manager/terminal/nushell/config.nu similarity index 100% rename from terminal/nushell/config.nu rename to modules/home-manager/terminal/nushell/config.nu diff --git a/terminal/nushell/env.nu b/modules/home-manager/terminal/nushell/env.nu similarity index 100% rename from terminal/nushell/env.nu rename to modules/home-manager/terminal/nushell/env.nu diff --git a/terminal/nushell/nushell.nix b/modules/home-manager/terminal/nushell/nushell.nix similarity index 100% rename from terminal/nushell/nushell.nix rename to modules/home-manager/terminal/nushell/nushell.nix diff --git a/terminal/nushell/scripts/cargo-completions.nu b/modules/home-manager/terminal/nushell/scripts/cargo-completions.nu similarity index 100% rename from terminal/nushell/scripts/cargo-completions.nu rename to modules/home-manager/terminal/nushell/scripts/cargo-completions.nu diff --git a/terminal/nushell/scripts/git-completions.nu b/modules/home-manager/terminal/nushell/scripts/git-completions.nu similarity index 100% rename from terminal/nushell/scripts/git-completions.nu rename to modules/home-manager/terminal/nushell/scripts/git-completions.nu diff --git a/terminal/nushell/scripts/just-completions.nu b/modules/home-manager/terminal/nushell/scripts/just-completions.nu similarity index 100% rename from terminal/nushell/scripts/just-completions.nu rename to modules/home-manager/terminal/nushell/scripts/just-completions.nu diff --git a/terminal/nushell/scripts/make-completions.nu b/modules/home-manager/terminal/nushell/scripts/make-completions.nu similarity index 100% rename from terminal/nushell/scripts/make-completions.nu rename to modules/home-manager/terminal/nushell/scripts/make-completions.nu diff --git a/terminal/nushell/scripts/ultimate_extractor.nu b/modules/home-manager/terminal/nushell/scripts/ultimate_extractor.nu similarity index 100% rename from terminal/nushell/scripts/ultimate_extractor.nu rename to modules/home-manager/terminal/nushell/scripts/ultimate_extractor.nu diff --git a/terminal/nvim/cmp/cmp.nix b/modules/home-manager/terminal/nvim/cmp/cmp.nix similarity index 100% rename from terminal/nvim/cmp/cmp.nix rename to modules/home-manager/terminal/nvim/cmp/cmp.nix diff --git a/terminal/nvim/gitsigns.nix b/modules/home-manager/terminal/nvim/gitsigns.nix similarity index 100% rename from terminal/nvim/gitsigns.nix rename to modules/home-manager/terminal/nvim/gitsigns.nix diff --git a/terminal/nvim/keybinds.nix b/modules/home-manager/terminal/nvim/keybinds.nix similarity index 100% rename from terminal/nvim/keybinds.nix rename to modules/home-manager/terminal/nvim/keybinds.nix diff --git a/terminal/nvim/lsp/lsp.nix b/modules/home-manager/terminal/nvim/lsp/lsp.nix similarity index 100% rename from terminal/nvim/lsp/lsp.nix rename to modules/home-manager/terminal/nvim/lsp/lsp.nix diff --git a/terminal/nvim/lsp/rust-tools.nix b/modules/home-manager/terminal/nvim/lsp/rust-tools.nix similarity index 100% rename from terminal/nvim/lsp/rust-tools.nix rename to modules/home-manager/terminal/nvim/lsp/rust-tools.nix diff --git a/terminal/nvim/lualine.nix b/modules/home-manager/terminal/nvim/lualine.nix similarity index 100% rename from terminal/nvim/lualine.nix rename to modules/home-manager/terminal/nvim/lualine.nix diff --git a/terminal/nvim/nvim-tree.nix b/modules/home-manager/terminal/nvim/nvim-tree.nix similarity index 100% rename from terminal/nvim/nvim-tree.nix rename to modules/home-manager/terminal/nvim/nvim-tree.nix diff --git a/terminal/nvim/nvim.nix b/modules/home-manager/terminal/nvim/nvim.nix similarity index 100% rename from terminal/nvim/nvim.nix rename to modules/home-manager/terminal/nvim/nvim.nix diff --git a/terminal/nvim/options.nix b/modules/home-manager/terminal/nvim/options.nix similarity index 100% rename from terminal/nvim/options.nix rename to modules/home-manager/terminal/nvim/options.nix diff --git a/terminal/nvim/simpleplugins.nix b/modules/home-manager/terminal/nvim/simpleplugins.nix similarity index 100% rename from terminal/nvim/simpleplugins.nix rename to modules/home-manager/terminal/nvim/simpleplugins.nix diff --git a/terminal/nvim/spell/en.utf-8.add b/modules/home-manager/terminal/nvim/spell/en.utf-8.add similarity index 100% rename from terminal/nvim/spell/en.utf-8.add rename to modules/home-manager/terminal/nvim/spell/en.utf-8.add diff --git a/terminal/nvim/telescope.nix b/modules/home-manager/terminal/nvim/telescope.nix similarity index 100% rename from terminal/nvim/telescope.nix rename to modules/home-manager/terminal/nvim/telescope.nix diff --git a/terminal/nvim/toggleterm.nix b/modules/home-manager/terminal/nvim/toggleterm.nix similarity index 100% rename from terminal/nvim/toggleterm.nix rename to modules/home-manager/terminal/nvim/toggleterm.nix diff --git a/terminal/nvim/treesitter/arial.nix b/modules/home-manager/terminal/nvim/treesitter/arial.nix similarity index 100% rename from terminal/nvim/treesitter/arial.nix rename to modules/home-manager/terminal/nvim/treesitter/arial.nix diff --git a/terminal/nvim/treesitter/rainbow-delimiters.nix b/modules/home-manager/terminal/nvim/treesitter/rainbow-delimiters.nix similarity index 100% rename from terminal/nvim/treesitter/rainbow-delimiters.nix rename to modules/home-manager/terminal/nvim/treesitter/rainbow-delimiters.nix diff --git a/terminal/nvim/treesitter/treesitter.nix b/modules/home-manager/terminal/nvim/treesitter/treesitter.nix similarity index 100% rename from terminal/nvim/treesitter/treesitter.nix rename to modules/home-manager/terminal/nvim/treesitter/treesitter.nix diff --git a/terminal/nvim/which-key.nix b/modules/home-manager/terminal/nvim/which-key.nix similarity index 100% rename from terminal/nvim/which-key.nix rename to modules/home-manager/terminal/nvim/which-key.nix diff --git a/terminal/starship.nix b/modules/home-manager/terminal/starship.nix similarity index 100% rename from terminal/starship.nix rename to modules/home-manager/terminal/starship.nix diff --git a/terminal/home.nix b/modules/home-manager/terminal/terminal.nix similarity index 100% rename from terminal/home.nix rename to modules/home-manager/terminal/terminal.nix diff --git a/terminal/voice.nix b/modules/home-manager/terminal/voice.nix similarity index 100% rename from terminal/voice.nix rename to modules/home-manager/terminal/voice.nix diff --git a/terminal/zellij/config.kdl b/modules/home-manager/terminal/zellij/config.kdl similarity index 100% rename from terminal/zellij/config.kdl rename to modules/home-manager/terminal/zellij/config.kdl diff --git a/terminal/zellij/zellij.nix b/modules/home-manager/terminal/zellij/zellij.nix similarity index 100% rename from terminal/zellij/zellij.nix rename to modules/home-manager/terminal/zellij/zellij.nix diff --git a/terminal/zsh.nix b/modules/home-manager/terminal/zsh.nix similarity index 94% rename from terminal/zsh.nix rename to modules/home-manager/terminal/zsh.nix index 366a12d..e13c2d1 100644 --- a/terminal/zsh.nix +++ b/modules/home-manager/terminal/zsh.nix @@ -8,7 +8,7 @@ programs.zoxide.enableZshIntegration = true; programs.yazi.enableZshIntegration = true; programs.carapace.enableZshIntegration = true; - programs.direnv.enableZshIntegration=true; + programs.direnv.enableZshIntegration = true; programs.zsh = { enable = true; enableCompletion = true;