diff --git a/.gitignore b/.gitignore index 577b0a0..e1935b5 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ hardware-configuration.nix +*.log diff --git a/flake.lock b/flake.lock index e36e0d3..b7f0f58 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1768564909, - "narHash": "sha256-Kell/SpJYVkHWMvnhqJz/8DqQg2b6PguxVWOuadbHCc=", + "lastModified": 1769170682, + "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "e4bae1bd10c9c57b2cf517953ab70060a828ee6f", + "rev": "c5296fdd05cfa2c187990dd909864da9658df755", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 930468d..51027a5 100644 --- a/flake.nix +++ b/flake.nix @@ -20,18 +20,40 @@ nixpkgs-stable, zen-browser, ... - } @ inputs: { - nixosConfigurations.ArcticFox = nixpkgs.lib.nixosSystem { - specialArgs = let - system = "x86_64-linux"; - in { - inherit inputs; - pkgs-stable = import nixpkgs-stable { - inherit system; - config.allowUnfree = true; + } @ inputs: let + system = "x86_64-linux"; + + hosts = [ + {hostname = "ArcticFox";} + ]; + + makeSystem = {hostname}: + nixpkgs.lib.nixosSystem { + system = system; + + specialArgs = { + inherit inputs hostname; + pkgs-stable = import nixpkgs-stable { + inherit system; + config.allowUnfree = true; + }; }; + + modules = [ + ./hosts/${hostname}/configuration.nix + ]; }; - modules = [./configuration.nix]; - }; + in { + nixosConfigurations = + nixpkgs.lib.foldl' ( + configs: host: + configs + // { + "${host.hostname}" = makeSystem { + inherit (host) hostname; + }; + } + ) {} + hosts; }; } diff --git a/configuration.nix b/hosts/ArcticFox/configuration.nix similarity index 85% rename from configuration.nix rename to hosts/ArcticFox/configuration.nix index 930a6a6..22ee800 100644 --- a/configuration.nix +++ b/hosts/ArcticFox/configuration.nix @@ -10,7 +10,8 @@ imports = [ # Include the results of the hardware scan. /etc/nixos/hardware-configuration.nix - ./packet-tracer.nix + ../../packet-tracer.nix + ./local-packages.nix ]; # Bootloader. @@ -83,6 +84,7 @@ # Enable the KDE Plasma Desktop Environment. services.displayManager.sddm.enable = true; services.displayManager.sddm.wayland.enable = true; + services.displayManager.defaultSession = "hyprland"; services.desktopManager.plasma6.enable = true; #hyprland @@ -150,81 +152,6 @@ ################### # List packages installed in system profile. To search, run: $ nix search wget - environment.systemPackages = with pkgs; [ - # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget steam alacritty - libva-utils - pkgs-stable.vesktop - git - tealdeer - bat - hyfetch - neofetch - fastfetch - macchina - kitty - hyprpaper - hyprpanel - btop - lm_sensors - liquidctl - polychromatic - openrazer-daemon - vscode-fhs - jetbrains.rust-rover - rustup - rustc - cargo - gcc - vulkan-headers - lld - mold - vulkan-loader - vulkan-headers - alacritty - hyprpanel - krita - fish - wofi - yadm - variety - inputs.zen-browser.packages."${system}".default - kdePackages.kdenlive - obsidian - fish - fishPlugins.done - fishPlugins.fzf-fish - fishPlugins.forgit - fishPlugins.hydro - fzf - fishPlugins.grc - grc - oh-my-posh - pyenv - swww - ags - chromium - gcc - gamescope-wsi - mesa - grimblast - godot - yt-dlp - strawberry - gamemode - thunar - alejandra - wineWowPackages.stagingFull - winetricks - python3 - protonup-qt - zig - jq - python313Packages.ipython - geogebra - ciscoPacketTracer8 - thunderbird - protonvpn-gui - ]; fonts.enableDefaultPackages = true; fonts.packages = with pkgs; [ diff --git a/hosts/ArcticFox/local-packages.nix b/hosts/ArcticFox/local-packages.nix new file mode 100644 index 0000000..7d916ea --- /dev/null +++ b/hosts/ArcticFox/local-packages.nix @@ -0,0 +1,83 @@ +{ + config, + pkgs, + pkgs-stable, + inputs, + ... +}: { + environment.systemPackages = with pkgs; [ + # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default. wget steam alacritty + libva-utils + pkgs-stable.vesktop + git + tealdeer + bat + hyfetch + neofetch + fastfetch + macchina + kitty + hyprpaper + hyprpanel + btop + lm_sensors + liquidctl + polychromatic + openrazer-daemon + vscode-fhs + jetbrains.rust-rover + rustup + rustc + cargo + gcc + vulkan-headers + lld + mold + vulkan-loader + vulkan-headers + alacritty + hyprpanel + krita + fish + wofi + yadm + variety + inputs.zen-browser.packages."${system}".default + pkgs-stable.kdePackages.kdenlive + obsidian + fish + fishPlugins.done + fishPlugins.fzf-fish + fishPlugins.forgit + fishPlugins.hydro + fzf + fishPlugins.grc + grc + oh-my-posh + pyenv + swww + ags + chromium + gcc + gamescope-wsi + mesa + grimblast + godot + yt-dlp + strawberry + gamemode + thunar + alejandra + wineWowPackages.stagingFull + winetricks + python3 + protonup-qt + zig + jq + python313Packages.ipython + geogebra + ciscoPacketTracer8 + thunderbird + protonvpn-gui + ]; +} diff --git a/rebuild.sh b/rebuild.sh index 9fc4097..5c99215 100755 --- a/rebuild.sh +++ b/rebuild.sh @@ -23,4 +23,4 @@ current=$(nixos-rebuild list-generations --json | jq '.[] | select (.current == git commit -am "$current" -notify-send -e "NixOS Rebuilt OK!" --icon=software-update-available +echo "OK" diff --git a/vscodium-project/flake.lock b/vscodium-project/flake.lock new file mode 100644 index 0000000..01b7849 --- /dev/null +++ b/vscodium-project/flake.lock @@ -0,0 +1,83 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nix-vscode-extensions": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1764727178, + "narHash": "sha256-6MSTBqaqY2nVMmklAS3giy4hRKzYdbOr0/KEawIvK2w=", + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "rev": "a4198d233544cfe0ca8001cc7f1f055d2961f756", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nix-vscode-extensions", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1759770925, + "narHash": "sha256-CZwkCtzTNclqlhuwDsVtGoRumTpqCUK0xSnFIMgd8ls=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "674c2b09c59a220204350ced584cadaacee30038", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "rev": "674c2b09c59a220204350ced584cadaacee30038", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nix-vscode-extensions": "nix-vscode-extensions", + "nixpkgs": [ + "nix-vscode-extensions", + "nixpkgs" + ] + } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/vscodium-project/flake.nix b/vscodium-project/flake.nix new file mode 100644 index 0000000..f037072 --- /dev/null +++ b/vscodium-project/flake.nix @@ -0,0 +1,53 @@ +{ + inputs = { + nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions"; + flake-utils.url = "github:numtide/flake-utils"; + nixpkgs.follows = "nix-vscode-extensions/nixpkgs"; + }; + + outputs = inputs: + inputs.flake-utils.lib.eachDefaultSystem ( + system: let + pkgs = import inputs.nixpkgs { + inherit system; + config.allowUnfree = true; + overlays = [inputs.nix-vscode-extensions.overlays.default]; + }; + + inherit (pkgs) vscode-with-extensions vscodium; + + packages.default = vscode-with-extensions.override { + vscode = vscodium; + vscodeExtensions = [ + pkgs.vscode-marketplace.golang.go + pkgs.open-vsx-release.rust-lang.rust-analyzer + # unfree + pkgs.vscode-marketplace.ms-python.vscode-pylance + ]; + }; + + devShells.default = pkgs.mkShell { + shellHook = '' + printf "Run VSCodium using one of the following commands:\n\n" + printf "nix run .# .\n\n" + printf "nix develop .#vscodium -c codium .\n\n" + ''; + }; + + # In some projects, people may use the same default devShell, + # but different code editors. + # + # Then, it's better to provide `VSCodium` + # not in the default devShell. + devShells.vscodium = pkgs.mkShell { + buildInputs = [packages.default]; + shellHook = '' + printf "VSCodium with extensions:\n" + codium --list-extensions + ''; + }; + in { + inherit packages devShells; + } + ); +}