diff --git a/flake.lock b/flake.lock index 3c76c3f..0839826 100644 --- a/flake.lock +++ b/flake.lock @@ -70,63 +70,11 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1743095683, - "narHash": "sha256-gWd4urRoLRe8GLVC/3rYRae1h+xfQzt09xOfb0PaHSk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "5e5402ecbcb27af32284d4a62553c019a3a49ea6", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "home-manager": "home-manager", "kutu": "kutu", - "nixpkgs": "nixpkgs_2", - "spicetify-nix": "spicetify-nix" - } - }, - "spicetify-nix": { - "inputs": { - "nixpkgs": "nixpkgs_3", - "systems": "systems" - }, - "locked": { - "lastModified": 1743595372, - "narHash": "sha256-e3x1mhpPpYgyyin9j/VbrBpOT5PFpEfx2hkxVZuJZhg=", - "owner": "Gerg-L", - "repo": "spicetify-nix", - "rev": "543f12dd14c62ddee79ab79fbfd8726f312b89ff", - "type": "github" - }, - "original": { - "owner": "Gerg-L", - "ref": "24.11", - "repo": "spicetify-nix", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index ffa038e..486c895 100644 --- a/flake.nix +++ b/flake.nix @@ -4,58 +4,61 @@ kutu.url = "git+https://git.syedm.dev/syedm/kutu.rb.git"; - spicetify-nix.url = "github:Gerg-L/spicetify-nix/24.11"; - home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = inputs@{ nixpkgs, kutu, home-manager, spicetify-nix, ... }: - let - system = "x86_64-linux"; - commonModules = [ - ./hosts/common.nix - home-manager.nixosModules.home-manager - { - home-manager.users.me = import ./home/common.nix; - home-manager.extraSpecialArgs = { inherit inputs; }; - home-manager.users.root = import ./home/root.nix; - } - ]; - pkgs = import nixpkgs { - inherit system; - }; - in { - nixosConfigurations = { - syedm = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = commonModules ++ [ - ./hosts/syedm - ]; - }; - - tardis = nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = commonModules ++ [ - ./hosts/tardis - { home-manager.users.me = import ./home/tardis.nix; } - ]; - }; - }; - - # For development - devShells.${system}.default = pkgs.mkShell { - packages = with pkgs; [ - nil - nixfmt - - lua-language-server - stylua + outputs = + { + kutu, + nixpkgs, + home-manager, + ... + }: + let + system = "x86_64-linux"; + commonModules = [ + ./hosts/common.nix + home-manager.nixosModules.home-manager + { + home-manager.users.me = import ./home/common.nix; + home-manager.users.root = import ./home/root.nix; + } ]; + pkgs = import nixpkgs { + inherit system; + }; + in + { + nixosConfigurations = { + syedm = nixpkgs.lib.nixosSystem { + inherit system; + modules = commonModules ++ [ + ./hosts/syedm + ]; + }; + + tardis = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit kutu; }; + modules = commonModules ++ [ + ./hosts/tardis + { home-manager.users.me = import ./home/tardis.nix; } + ]; + }; + }; + + # For development + devShells.${system}.default = pkgs.mkShell { + packages = with pkgs; [ + nixd + nixfmt + + lua-language-server + stylua + ]; + }; }; - }; } diff --git a/home/nvim/lua/lsp.lua b/home/nvim/lua/lsp.lua index 4385cef..24eb212 100644 --- a/home/nvim/lua/lsp.lua +++ b/home/nvim/lua/lsp.lua @@ -12,7 +12,7 @@ vim.lsp.config("lua_ls", { }, }) -local servers = { "clangd", "nil", "solargraph", "hls" } +local servers = { "clangd", "solargraph", "hls", "nixd" } for _, server in ipairs(servers) do vim.lsp.config(server, { capabilities = capabilities }) diff --git a/home/root.nix b/home/root.nix index 4db7c56..34413ee 100644 --- a/home/root.nix +++ b/home/root.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ ... }: { imports = [ diff --git a/home/tardis.nix b/home/tardis.nix index f7c460c..1b0170b 100644 --- a/home/tardis.nix +++ b/home/tardis.nix @@ -1,11 +1,7 @@ -{ inputs, pkgs, ... }: +{ ... }: -let - spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system}; -in { imports = [ - inputs.spicetify-nix.homeManagerModules.spicetify ./battery ./dunst ./kitty diff --git a/hosts/syedm/hardware-configuration.nix b/hosts/syedm/hardware-configuration.nix index efc3834..57c1dc0 100644 --- a/hosts/syedm/hardware-configuration.nix +++ b/hosts/syedm/hardware-configuration.nix @@ -1,29 +1,44 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "nvme" + "usb_storage" + "sd_mod" + "sdhci_pci" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/c5fedde6-79d4-4a44-92e4-2aa764553875"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/c5fedde6-79d4-4a44-92e4-2aa764553875"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/510C-E000"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/712d25ef-146d-4c66-b6d4-1b64491a974e"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/510C-E000"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/712d25ef-146d-4c66-b6d4-1b64491a974e"; } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/hosts/tardis/default.nix b/hosts/tardis/default.nix index 0379a88..729165d 100644 --- a/hosts/tardis/default.nix +++ b/hosts/tardis/default.nix @@ -1,7 +1,7 @@ { + kutu, lib, pkgs, - inputs, ... }: @@ -30,7 +30,7 @@ prismlauncher spotify - inputs.kutu.packages.${stdenv.hostPlatform.system}.default + kutu.packages.${stdenv.hostPlatform.system}.default ] ); diff --git a/hosts/tardis/hardware-configuration.nix b/hosts/tardis/hardware-configuration.nix index a388c48..eacb03a 100644 --- a/hosts/tardis/hardware-configuration.nix +++ b/hosts/tardis/hardware-configuration.nix @@ -1,29 +1,41 @@ -{ config, lib, pkgs, modulesPath, ... }: +{ + config, + lib, + modulesPath, + ... +}: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; - boot.initrd.availableKernelModules = [ "xhci_pci" "vmd" "nvme" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "vmd" + "nvme" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/29a53eeb-befc-4512-9255-e1c5f1cf55ae"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/29a53eeb-befc-4512-9255-e1c5f1cf55ae"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/0951-B8D1"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = - [ { device = "/dev/disk/by-uuid/659310da-4655-461e-a992-6e62d7a0362d"; } + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/0951-B8D1"; + fsType = "vfat"; + options = [ + "fmask=0077" + "dmask=0077" ]; + }; + + swapDevices = [ + { device = "/dev/disk/by-uuid/659310da-4655-461e-a992-6e62d7a0362d"; } + ]; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;