From 6b348b22de70ee045cebc9ba5259dd68fa34bcc7 Mon Sep 17 00:00:00 2001 From: Erik Reinert <4638629+erikreinert@users.noreply.github.com> Date: Wed, 12 Feb 2025 11:47:55 -0800 Subject: [PATCH] Remove go-pkg template (#80) * feat: remove go-pkg template that is now deprecated * chore: remove go-pkg template from flake-language.yml and update README - Removed the `go-pkg` template from the `.github/workflows/flake-language.yml` file. - Updated the README to remove the reference to `go-pkg` for building legacy Go apps. * chore: remove go-pkg from flake-language.yml configuration * chore: update home-manager and nixpkgs to release-24.11 Updated the URLs for home-manager and nixpkgs in the flake.nix files for darwin, nixos-desktop, and nixos-minimal templates to point to the release-24.11 versions. This ensures the templates use the latest versions of these dependencies. * chore(configuration): remove redundant sound.enable setting The sound.enable setting has been removed as it is redundant with the current configuration. Pulseaudio is disabled and Pipewire is being used for sound management. * chore: update home-manager and nixpkgs to release-25.05 Updated the home-manager and nixpkgs URLs in the flake.nix file to point to the release-25.05 versions. This ensures compatibility with the latest features and improvements in the new release. * chore: update flake.nix to use latest home-manager and nixpkgs Updated the home-manager URL to point to the latest version instead of a specific release. Changed the nixpkgs URL to use the nixos-unstable branch for more up-to-date packages. * chore: update stateVersion to 24.11 - Updated `system.stateVersion` and `home.stateVersion` across various modules to "24.11". - Ensures consistency in versioning for system and home-manager configurations. - Affects darwin, nixos-desktop, and nixos-minimal templates. * feat(nix): enable automatic optimization - Added `optimise.automatic = true;` to the Nix configuration in darwin, nixos-desktop, and nixos-minimal templates. - Removed `auto-optimise-store = true;` from the Nix settings as it is now replaced by the new automatic optimization setting. * refactor(darwin): remove nix-daemon service enablement The nix-daemon service enablement has been removed from the darwin.nix configuration. This change simplifies the module configuration by eliminating the explicit setting of services.nix-daemon.enable to true. --- .github/renovate.json | 29 ++++++----- .github/workflows/flake-language.yml | 2 - README.md | 14 +----- flake.lock | 30 +++++------- flake.nix | 6 --- template/darwin/flake.nix | 4 +- template/darwin/module/configuration.nix | 5 +- template/darwin/module/home-manager.nix | 2 +- template/darwin/system/darwin.nix | 5 +- template/go-pkg/.envrc | 1 - template/go-pkg/cmd/example/main.go | 5 -- template/go-pkg/deps.nix | 1 - template/go-pkg/flake.nix | 49 ------------------- template/home-manager/module/home-manager.nix | 2 +- template/nixos-desktop/flake.nix | 4 +- .../nixos-desktop/module/configuration.nix | 6 +-- .../nixos-desktop/module/home-manager.nix | 2 +- template/nixos-minimal/flake.nix | 4 +- .../nixos-minimal/module/configuration.nix | 4 +- .../nixos-minimal/module/home-manager.nix | 2 +- template/nixos-minimal/system/nixos.nix | 2 +- 21 files changed, 51 insertions(+), 128 deletions(-) delete mode 100644 template/go-pkg/.envrc delete mode 100644 template/go-pkg/cmd/example/main.go delete mode 100644 template/go-pkg/deps.nix delete mode 100644 template/go-pkg/flake.nix diff --git a/.github/renovate.json b/.github/renovate.json index 77c8c6d..fa8e6d0 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,16 +1,19 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base", - ":semanticCommitTypeAll(chore)" - ], - "lockFileMaintenance": { - "enabled": true, + "$schema": "https://docs.renovatebot.com/renovate-schema.json", "extends": [ - "schedule:weekly" - ] - }, - "nix": { - "enabled": true - } + "config:base", + ":semanticCommitTypeAll(chore)" + ], + "lockFileMaintenance": { + "enabled": true, + "extends": [ + "schedule:weekly" + ] + }, + "nix": { + "enabled": true + }, + "node": { + "enabled": false + } } diff --git a/.github/workflows/flake-language.yml b/.github/workflows/flake-language.yml index 4b6751f..8cc82d0 100644 --- a/.github/workflows/flake-language.yml +++ b/.github/workflows/flake-language.yml @@ -19,7 +19,6 @@ jobs: - cpp-cmake - dart - go-mod - - go-pkg - haskell - lua-app - nodejs-backend @@ -54,7 +53,6 @@ jobs: - cpp-cmake - dart - go-mod - - go-pkg - haskell - nodejs-backend - nestjs diff --git a/README.md b/README.md index 9c4f033..756cb37 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,6 @@ Kickstart your Nix environments. - [C++ (cmake)](#cpp-cmake) - [Dart](#dart) - [Go (module)](#go-module) - - [Go (package)](#go-package) - [Haskell](#haskell) - [Lua (application)](#lua-application) - [NestJS](#nestjs) @@ -312,7 +311,7 @@ nix flake init -t github:ALT-F4-LLC/kickstart.nix#dart #### Go (module) -Used for modern Go apps setup with `go.mod` system. To build legacy Go apps, use `go-pkg` template. +Used for modern Go apps setup with `go.mod` system. > [!IMPORTANT] > Be sure to update `go.mod` with proper repository after running `init` command. @@ -321,17 +320,6 @@ Used for modern Go apps setup with `go.mod` system. To build legacy Go apps, use nix flake init -t github:ALT-F4-LLC/kickstart.nix#go-mod ``` -#### Go (package) - -Used for legacy Go apps **not** setup with `go.mod` system. To build modern Go apps, use `go-mod` template. - -> [!IMPORTANT] -> Be sure to update `deps.nix` with vendor dependencies after running `init` command [(read more)](https://nixos.wiki/wiki/Go#buildGoPackage). - -```bash -nix flake init -t github:ALT-F4-LLC/kickstart.nix#go-pkg -``` - #### Haskell Used for Haskell applications. diff --git a/flake.lock b/flake.lock index 1313294..a52014a 100644 --- a/flake.lock +++ b/flake.lock @@ -5,11 +5,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", + "lastModified": 1738453229, + "narHash": "sha256-7H9XgNiGLKN1G1CgRh0vUL4AheZSYzPm+zmZ7vxbJdo=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", + "rev": "32ea77a06711b758da0ad9bd6a844c5740a87abd", "type": "github" }, "original": { @@ -19,11 +19,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1712963716, - "narHash": "sha256-WKm9CvgCldeIVvRz87iOMi8CFVB1apJlkUT4GGvA0iM=", + "lastModified": 1739214665, + "narHash": "sha256-26L8VAu3/1YRxS8MHgBOyOM8xALdo6N0I04PgorE7UM=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "cfd6b5fc90b15709b780a5a1619695a88505a176", + "rev": "64e75cd44acf21c7933d61d7721e812eac1b5a0a", "type": "github" }, "original": { @@ -35,20 +35,14 @@ }, "nixpkgs-lib": { "locked": { - "dir": "lib", - "lastModified": 1711703276, - "narHash": "sha256-iMUFArF0WCatKK6RzfUJknjem0H9m4KgorO/p3Dopkk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "d8fe5e6c92d0d190646fb9f1056741a229980089", - "type": "github" + "lastModified": 1738452942, + "narHash": "sha256-vJzFZGaCpnmo7I6i416HaBLpC+hvcURh/BQwROcGIp8=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" }, "original": { - "dir": "lib", - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/072a6db25e947df2f31aab9eccd0ab75d5b2da11.tar.gz" } }, "root": { diff --git a/flake.nix b/flake.nix index 2ee3467..9e1daff 100644 --- a/flake.nix +++ b/flake.nix @@ -38,11 +38,6 @@ path = ./template/go-mod; }; - go-pkg = { - description = "Kickstart Go language package flake."; - path = ./template/go-pkg; - }; - haskell = { description = "Kickstart Haskell package flake."; path = ./template/haskell; @@ -157,7 +152,6 @@ example-dart = mkLanguage {name = "dart";}; example-darwin = mkDarwin {}; example-go-mod = mkLanguage {name = "go-mod";}; - example-go-pkg = mkLanguage {name = "go-pkg";}; example-haskell = mkLanguage {name = "haskell";}; example-home-manager = mkHomeManager {}; example-lua-app = mkLanguage {name = "lua-app";}; diff --git a/template/darwin/flake.nix b/template/darwin/flake.nix index e80ac59..a63c50c 100644 --- a/template/darwin/flake.nix +++ b/template/darwin/flake.nix @@ -5,8 +5,8 @@ darwin.inputs.nixpkgs.follows = "nixpkgs"; darwin.url = "github:lnl7/nix-darwin"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.url = "github:nix-community/home-manager/release-23.11"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + home-manager.url = "github:nix-community/home-manager"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; }; outputs = inputs @ { diff --git a/template/darwin/module/configuration.nix b/template/darwin/module/configuration.nix index c331930..3a048e7 100644 --- a/template/darwin/module/configuration.nix +++ b/template/darwin/module/configuration.nix @@ -1,8 +1,9 @@ { # add more system settings here nix = { + optimise.automatic = true; + settings = { - auto-optimise-store = true; builders-use-substitutes = true; experimental-features = ["flakes" "nix-command"]; substituters = ["https://nix-community.cachix.org"]; @@ -13,5 +14,7 @@ warn-dirty = false; }; }; + programs.zsh.enable = true; + system.stateVersion = 6; } diff --git a/template/darwin/module/home-manager.nix b/template/darwin/module/home-manager.nix index fa10f73..12385fc 100644 --- a/template/darwin/module/home-manager.nix +++ b/template/darwin/module/home-manager.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { # add home-manager user settings here home.packages = with pkgs; [git neovim]; - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; } diff --git a/template/darwin/system/darwin.nix b/template/darwin/system/darwin.nix index ebb9598..833d714 100644 --- a/template/darwin/system/darwin.nix +++ b/template/darwin/system/darwin.nix @@ -9,10 +9,7 @@ in inherit system; # modules: allows for reusable code modules = [ - { - services.nix-daemon.enable = true; - users.users.${username}.home = "/Users/${username}"; - } + {users.users.${username}.home = "/Users/${username}";} system-config inputs.home-manager.darwinModules.home-manager diff --git a/template/go-pkg/.envrc b/template/go-pkg/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/template/go-pkg/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/template/go-pkg/cmd/example/main.go b/template/go-pkg/cmd/example/main.go deleted file mode 100644 index 16e2b22..0000000 --- a/template/go-pkg/cmd/example/main.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - println("Hello, World!") -} diff --git a/template/go-pkg/deps.nix b/template/go-pkg/deps.nix deleted file mode 100644 index fe51488..0000000 --- a/template/go-pkg/deps.nix +++ /dev/null @@ -1 +0,0 @@ -[] diff --git a/template/go-pkg/flake.nix b/template/go-pkg/flake.nix deleted file mode 100644 index 93c49c6..0000000 --- a/template/go-pkg/flake.nix +++ /dev/null @@ -1,49 +0,0 @@ -{ - description = "Example kickstart Go package project."; - - inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; - - outputs = inputs @ {flake-parts, ...}: - flake-parts.lib.mkFlake {inherit inputs;} { - systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"]; - - perSystem = { - config, - self', - inputs', - pkgs, - system, - ... - }: let - name = "example"; - version = "latest"; - in { - devShells = { - default = pkgs.mkShell { - inputsFrom = [self'.packages.default]; - }; - }; - - packages = { - default = pkgs.buildGoPackage { - inherit name; - goDeps = ./deps.nix; - goPackagePath = "github.com/example/${name}"; - src = ./.; - subPackages = ["cmd/example"]; - }; - - docker = pkgs.dockerTools.buildImage { - inherit name; - tag = version; - config = { - Cmd = ["${self'.packages.default}/bin/${name}"]; - Env = [ - "SSL_CERT_FILE=${pkgs.cacert}/etc/ssl/certs/ca-bundle.crt" - ]; - }; - }; - }; - }; - }; -} diff --git a/template/home-manager/module/home-manager.nix b/template/home-manager/module/home-manager.nix index 7393049..cd03261 100644 --- a/template/home-manager/module/home-manager.nix +++ b/template/home-manager/module/home-manager.nix @@ -6,5 +6,5 @@ home.homeDirectory = homeDirectory; home.username = username; home.packages = with pkgs; [git neovim]; - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; } diff --git a/template/nixos-desktop/flake.nix b/template/nixos-desktop/flake.nix index 9e4d705..7d52a61 100644 --- a/template/nixos-desktop/flake.nix +++ b/template/nixos-desktop/flake.nix @@ -3,8 +3,8 @@ inputs = { home-manager.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.url = "github:nix-community/home-manager/release-23.11"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = inputs @ { diff --git a/template/nixos-desktop/module/configuration.nix b/template/nixos-desktop/module/configuration.nix index 57a582b..074f203 100644 --- a/template/nixos-desktop/module/configuration.nix +++ b/template/nixos-desktop/module/configuration.nix @@ -17,8 +17,9 @@ }; nix = { + optimise.automatic = true; + settings = { - auto-optimise-store = true; builders-use-substitutes = true; experimental-features = ["nix-command" "flakes"]; substituters = [ @@ -65,7 +66,6 @@ time.timeZone = "America/Los_Angeles"; ## Sound settings ## - sound.enable = true; hardware.pulseaudio.enable = false; security.rtkit.enable = true; services.pipewire = { @@ -90,5 +90,5 @@ users.mutableUsers = false; - system.stateVersion = "23.11"; + system.stateVersion = "24.11"; } diff --git a/template/nixos-desktop/module/home-manager.nix b/template/nixos-desktop/module/home-manager.nix index fa10f73..12385fc 100644 --- a/template/nixos-desktop/module/home-manager.nix +++ b/template/nixos-desktop/module/home-manager.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { # add home-manager user settings here home.packages = with pkgs; [git neovim]; - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; } diff --git a/template/nixos-minimal/flake.nix b/template/nixos-minimal/flake.nix index ce50217..beae0ec 100644 --- a/template/nixos-minimal/flake.nix +++ b/template/nixos-minimal/flake.nix @@ -3,8 +3,8 @@ inputs = { home-manager.inputs.nixpkgs.follows = "nixpkgs"; - home-manager.url = "github:nix-community/home-manager/release-23.11"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11"; + home-manager.url = "github:nix-community/home-manager/release-24.11"; + nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11"; }; outputs = inputs @ { diff --git a/template/nixos-minimal/module/configuration.nix b/template/nixos-minimal/module/configuration.nix index 3850a82..e497868 100644 --- a/template/nixos-minimal/module/configuration.nix +++ b/template/nixos-minimal/module/configuration.nix @@ -1,8 +1,9 @@ { # add more system settings here nix = { + optimise.automatic = true; + settings = { - auto-optimise-store = true; builders-use-substitutes = true; experimental-features = ["nix-command" "flakes"]; substituters = [ @@ -15,5 +16,6 @@ warn-dirty = false; }; }; + programs.zsh.enable = true; } diff --git a/template/nixos-minimal/module/home-manager.nix b/template/nixos-minimal/module/home-manager.nix index fa10f73..12385fc 100644 --- a/template/nixos-minimal/module/home-manager.nix +++ b/template/nixos-minimal/module/home-manager.nix @@ -1,5 +1,5 @@ {pkgs, ...}: { # add home-manager user settings here home.packages = with pkgs; [git neovim]; - home.stateVersion = "23.11"; + home.stateVersion = "24.11"; } diff --git a/template/nixos-minimal/system/nixos.nix b/template/nixos-minimal/system/nixos.nix index d983670..2b04ae8 100644 --- a/template/nixos-minimal/system/nixos.nix +++ b/template/nixos-minimal/system/nixos.nix @@ -27,7 +27,7 @@ in isNormalUser = true; password = password; }; - system.stateVersion = "23.11"; + system.stateVersion = "24.11"; } hardware-configuration configuration