diff --git a/configs/common.nix b/configs/common.nix index 6a31ac2..c8938f9 100644 --- a/configs/common.nix +++ b/configs/common.nix @@ -4,9 +4,7 @@ pkgs, inputs, ... -}: - -{ +}: { imports = [ /etc/nixos/hardware-configuration.nix ]; @@ -50,6 +48,9 @@ }; }; + # Set correctly + nix.nixPath = ["nixpkgs=${inputs.nixpkgs}"]; + ## Optimise Nix store on rebuild and collect garbage as a service nix.optimise.automatic = true; nix.gc = { @@ -154,110 +155,105 @@ "docker" "wheel" ]; - packages = - with pkgs; - let - input = - { - package, - output ? "default", - }: - inputs.${package}.packages.${pkgs.stdenv.hostPlatform.system}.${output}; - wrap = - { - name, - pkg, - modules, - }: - pkgs.symlinkJoin { - inherit name; - paths = [ pkg ]; - nativeBuildInputs = [ pkgs.makeWrapper ]; - postBuild = '' - wrapProgram $out/bin/${name} \ - --prefix PATH : ${pkgs.lib.makeBinPath modules} - ''; - }; - in - [ - # Ricing - ## Desktop - bibata-cursors - catppuccin-gtk - unstable.waybar - hyprlock - dunst - wlogout - wpaperd - quickshell + packages = with pkgs; let + input = { + package, + output ? "default", + }: + inputs.${package}.packages.${pkgs.stdenv.hostPlatform.system}.${output}; + wrap = { + name, + pkg, + modules, + }: + pkgs.symlinkJoin { + inherit name; + paths = [pkg]; + nativeBuildInputs = [pkgs.makeWrapper]; + postBuild = '' + wrapProgram $out/bin/${name} \ + --prefix PATH : ${pkgs.lib.makeBinPath modules} + ''; + }; + in [ + # Ricing + ## Desktop + bibata-cursors + catppuccin-gtk + unstable.waybar + hyprlock + dunst + wlogout + wpaperd + quickshell - ## Desktop Utilities - grimblast - gsettings-desktop-schemas - wl-clipboard - (wrap { - name = "otter-launcher"; - pkg = ( - input { - package = "otter-launcher"; - } - ); - modules = [ - chafa - jq - ]; - }) - (input { package = "fsel"; }) + ## Desktop Utilities + grimblast + gsettings-desktop-schemas + wl-clipboard + (wrap { + name = "otter-launcher"; + pkg = ( + input { + package = "otter-launcher"; + } + ); + modules = [ + chafa + jq + ]; + }) + (input {package = "fsel";}) - # Terminal - ## Styling / Functionality - oh-my-posh - carapace - zsh-autocomplete - bat + # Terminal + ## Styling / Functionality + oh-my-posh + carapace + zsh-autocomplete + bat - ## Tools - lazygit - p7zip-rar - any-nix-shell - bluetui - fzf - ripgrep - wget - htop - playerctl - git - lsd - (input { - package = "doot"; - }) + ## Tools + lazygit + p7zip-rar + any-nix-shell + bluetui + fzf + ripgrep + wget + htop + playerctl + git + lsd + (input { + package = "doot"; + }) - ## Other CLI Apps - nodejs - fastfetch - opencode - tailscale - syncthing - jellyfin-tui - devenv - nix-output-monitor + ## Other CLI Apps + nodejs + fastfetch + opencode + tailscale + syncthing + jellyfin-tui + devenv + nix-output-monitor - # Apps - ## Actual Useful Stuff - nemo - kitty - firefox - gotify-desktop - pavucontrol - mpv - input-remapper + # Apps + ## Actual Useful Stuff + nemo + kitty + firefox + gotify-desktop + pavucontrol + mpv + input-remapper - ## Other Nonsense - tor-browser - techmino - prismlauncher - delfin - ]; + ## Other Nonsense + tor-browser + techmino + prismlauncher + delfin + ]; }; ## Zsh @@ -283,7 +279,7 @@ programs = { dconf.enable = true; xfconf.enable = true; - gdk-pixbuf.modulePackages = [ pkgs.librsvg ]; # For wlogout svgs + gdk-pixbuf.modulePackages = [pkgs.librsvg]; # For wlogout svgs }; ## User Services @@ -301,11 +297,10 @@ fonts.packages = with pkgs; [ nerd-fonts.fira-mono ]; - fonts.fontconfig.defaultFonts.serif = [ "Fira Mono Nerd Font" ]; + fonts.fontconfig.defaultFonts.serif = ["Fira Mono Nerd Font"]; # System Packages environment.systemPackages = with pkgs; [ - # Utilities inputs.nvim-wrapped.packages.${stdenv.hostPlatform.system}.default vim @@ -334,5 +329,4 @@ # The comment system.stateVersion = "25.05"; # Did you read the comment? - } diff --git a/configs/configuration-laptop.nix b/configs/configuration-laptop.nix index e6942a6..72fe0c3 100644 --- a/configs/configuration-laptop.nix +++ b/configs/configuration-laptop.nix @@ -4,9 +4,7 @@ pkgs, inputs, ... -}: - -{ +}: { networking.hostName = "mobile02"; # Define your hostname. # Opengl and vulkan @@ -36,7 +34,7 @@ # Local User users.users.user01 = { - extraGroups = [ ]; + extraGroups = []; packages = with pkgs; [ # Ricing inputs.way-edges.packages.${stdenv.hostPlatform.system}.way-edges @@ -48,5 +46,4 @@ }; programs.steam.enable = true; - } diff --git a/configs/configuration-pc.nix b/configs/configuration-pc.nix index acdceff..299886f 100644 --- a/configs/configuration-pc.nix +++ b/configs/configuration-pc.nix @@ -4,9 +4,7 @@ pkgs, inputs, ... -}: - -{ +}: { networking.hostName = "HACKSTATION"; # Enable nix-ld to run unpatched binaries diff --git a/flake.lock b/flake.lock index 0805d19..7f2a3b7 100644 --- a/flake.lock +++ b/flake.lock @@ -798,11 +798,11 @@ }, "nixpkgs_6": { "locked": { - "lastModified": 1781074563, - "narHash": "sha256-md8WlXOlfnIeHeOScMTTHFyf2d6iaTwPl2apR5EQ3P4=", + "lastModified": 1782467914, + "narHash": "sha256-pGvFkM8N0xEkIIXDe5YYfbEAvHrk4IxBrjB/x8OomhE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9ae611a455b90cf061d8f332b977e387bda8e1ca", + "rev": "e73de5be04e0eff4190a1432b946d469c794e7b4", "type": "github" }, "original": { @@ -854,11 +854,11 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1781453653, - "narHash": "sha256-5XhbIAdcoVblquSRVbg5HUnRni96ksMqzGNTEGSb3Cg=", + "lastModified": 1782650144, + "narHash": "sha256-E6SKjvY6Vz2mRok6ml8Dm4lMgUyfgtwHgwLlo93SLpI=", "ref": "refs/heads/main", - "rev": "e46d931775275918876fcde65d03e4dcffa45efa", - "revCount": 83, + "rev": "45739fc4cf0ba3cdefab6593a0d629b637bb341a", + "revCount": 88, "type": "git", "url": "file:///home/user01/.dotfiles/.config/nvim" }, diff --git a/flake.nix b/flake.nix index d6b2f23..46aaa7e 100644 --- a/flake.nix +++ b/flake.nix @@ -51,42 +51,39 @@ }; }; - outputs = - { - self, - nixpkgs, - ... - }@inputs: - let - system = "x86_64-linux"; + outputs = { + self, + nixpkgs, + ... + } @ inputs: let + system = "x86_64-linux"; - hardwareConfig = import /etc/nixos/hardware-configuration.nix; - common = import ./configs/common.nix; + hardwareConfig = import /etc/nixos/hardware-configuration.nix; + common = import ./configs/common.nix; - mkSystem = - extraModules: - nixpkgs.lib.nixosSystem { - inherit system; - specialArgs = { inherit inputs; }; - modules = [ + mkSystem = extraModules: + nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = {inherit inputs;}; + modules = + [ common hardwareConfig ] ++ extraModules; - }; - in - { - nixosConfigurations = { - mobile02 = mkSystem [ ./configs/configuration-laptop.nix ]; - hackstation = mkSystem [ - ./configs/configuration-pc.nix - # ./modules/davinci/davinci.nix - ./modules/i3/i3.nix - inputs.omnisearch.nixosModules.default - { - services.omnisearch.enable = true; - } - ]; }; + in { + nixosConfigurations = { + mobile02 = mkSystem [./configs/configuration-laptop.nix]; + hackstation = mkSystem [ + ./configs/configuration-pc.nix + # ./modules/davinci/davinci.nix + ./modules/i3/i3.nix + inputs.omnisearch.nixosModules.default + { + services.omnisearch.enable = true; + } + ]; }; + }; } diff --git a/modules/chataigne/flake.nix b/modules/chataigne/flake.nix index ecb8b72..d8c5d2e 100644 --- a/modules/chataigne/flake.nix +++ b/modules/chataigne/flake.nix @@ -5,78 +5,78 @@ nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11"; }; - outputs = - { self, nixpkgs }: - let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; + outputs = { + self, + nixpkgs, + }: let + system = "x86_64-linux"; + pkgs = import nixpkgs {inherit system;}; - # The libraries you requested - deps = with pkgs; [ - curlFull - gnutls - libxrandr - alsa-lib - freetype - avahi - libglvnd - curl - SDL2 - hidapi - libpulseaudio - lz4 - openssl - libcap - libxcrypt - libgcrypt - libbsd - zlib - glib + # The libraries you requested + deps = with pkgs; [ + curlFull + gnutls + libxrandr + alsa-lib + freetype + avahi + libglvnd + curl + SDL2 + hidapi + libpulseaudio + lz4 + openssl + libcap + libxcrypt + libgcrypt + libbsd + zlib + glib + ]; + + # Wrap the local AppImage file + chataigne-bin = pkgs.appimageTools.wrapType2 { + pname = "chataigne"; + version = "1.10.3"; + # This points to the file in the same directory as flake.nix + src = ./Chataigne-linux-x64-1.10.3.AppImage; + extraPkgs = pkgs: deps; + }; + + # Create the Desktop Entry + chataigne-desktop = pkgs.makeDesktopItem { + name = "chataigne"; + exec = "chataigne"; + icon = "chataigne"; + comment = "Modular machine for art and technology"; + desktopName = "Chataigne"; + categories = [ + "AudioVideo" + "Development" + ]; + }; + in { + # packages.${system}.default = chataigne-bin; + + devShells.${system}.default = pkgs.mkShell { + # Packages you want available in your shell + buildInputs = [ + chataigne-bin ]; - # Wrap the local AppImage file - chataigne-bin = pkgs.appimageTools.wrapType2 { - pname = "chataigne"; - version = "1.10.3"; - # This points to the file in the same directory as flake.nix - src = ./Chataigne-linux-x64-1.10.3.AppImage; - extraPkgs = pkgs: deps; - }; - - # Create the Desktop Entry - chataigne-desktop = pkgs.makeDesktopItem { - name = "chataigne"; - exec = "chataigne"; - icon = "chataigne"; - comment = "Modular machine for art and technology"; - desktopName = "Chataigne"; - categories = [ - "AudioVideo" - "Development" - ]; - }; - in - { - # packages.${system}.default = chataigne-bin; - - devShells.${system}.default = pkgs.mkShell { - # Packages you want available in your shell - buildInputs = [ - chataigne-bin - ]; - - # Environmental variables or shell hooks - shellHook = '' - echo "something" - ''; - }; - # This allows you to run 'nix run' or install it via system config - packages.${system}.default = pkgs.symlinkJoin { - name = "chataigne"; - paths = [ - chataigne-bin - chataigne-desktop - ]; - }; + # Environmental variables or shell hooks + shellHook = '' + echo "something" + ''; }; + # This allows you to run 'nix run' or install it via system config + packages.${system}.default = pkgs.symlinkJoin { + name = "chataigne"; + paths = [ + chataigne-bin + chataigne-desktop + ]; + }; + }; } diff --git a/modules/i3/i3.nix b/modules/i3/i3.nix index dc2b8b3..01e1d0d 100644 --- a/modules/i3/i3.nix +++ b/modules/i3/i3.nix @@ -4,8 +4,7 @@ pkgs, inputs, ... -}: -{ +}: { services.libinput.enable = true; services.displayManager.defaultSession = "hyprland";