From 43e1f62a797a078ce1c590a8cfb4a0703fb34d6f Mon Sep 17 00:00:00 2001 From: Aner Zakobar Date: Fri, 8 Aug 2025 00:53:45 +0300 Subject: [PATCH] Fixing up --- azos-core | 2 +- flake.lock | 19 ++--- flake.nix | 60 ++------------ home-manager/home.nix | 26 +++--- modules/home-manager/reaper.nix | 6 +- nixos/configuration.backup.nix | 83 ------------------- nixos/configuration.nix | 38 +-------- ...ix => lauretta-hardware-configuration.nix} | 0 overlays/default.nix | 10 +-- 9 files changed, 35 insertions(+), 209 deletions(-) delete mode 100755 nixos/configuration.backup.nix rename nixos/{hardware-configuration.nix => lauretta-hardware-configuration.nix} (100%) diff --git a/azos-core b/azos-core index 69d3dec..b0dc530 160000 --- a/azos-core +++ b/azos-core @@ -1 +1 @@ -Subproject commit 69d3dec18405dc350a81039ce657f4435b38b1f8 +Subproject commit b0dc530c108e38980daea9e93764cc255d8c18fb diff --git a/flake.lock b/flake.lock index eeae7a7..f141d37 100644 --- a/flake.lock +++ b/flake.lock @@ -6,11 +6,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1754597893, - "narHash": "sha256-D/wBAxdIvMTKpFQaLo39n0X8PAFIqFCeuJboxUpAyHA=", + "lastModified": 1754603518, + "narHash": "sha256-RXSbgFRmMqfjsCSxKI7nWJm+doxGckTQE8aaStHLy5I=", "ref": "refs/heads/master", - "rev": "69d3dec18405dc350a81039ce657f4435b38b1f8", - "revCount": 55, + "rev": "b0dc530c108e38980daea9e93764cc255d8c18fb", + "revCount": 56, "type": "git", "url": "file:./azos-core" }, @@ -46,16 +46,13 @@ "locked": { "lastModified": 1726989464, "narHash": "sha256-Vl+WVTJwutXkimwGprnEtXc/s/s8sMuXzqXaspIGlwM=", - "owner": "nix-community", - "repo": "home-manager", + "path": "/nix/store/q1ss75nhmjiydyqw8lbzwbx7cqk8z0qq-source", "rev": "2f23fa308a7c067e52dfcc30a0758f47043ec176", - "type": "github" + "type": "path" }, "original": { - "owner": "nix-community", - "ref": "release-24.05", - "repo": "home-manager", - "type": "github" + "id": "home-manager", + "type": "indirect" } }, "musnix": { diff --git a/flake.nix b/flake.nix index 2c380ff..86e02e1 100755 --- a/flake.nix +++ b/flake.nix @@ -1,27 +1,15 @@ { - description = "Your new nix config"; + description = "Aner's NIX config for his systems!"; inputs = { # Nixpkgs nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; - # You can access packages and modules from different nixpkgs revs - # at the same time. Here's an working example: nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; - # Also see the 'unstable-packages' overlay at 'overlays/default.nix'. - # Home manager - home-manager.url = "github:nix-community/home-manager/release-24.05"; home-manager.inputs.nixpkgs.follows = "nixpkgs"; nixos-hardware.url = "github:NixOS/nixos-hardware/master"; - # TODO: Add any other flake you might need - # hardware.url = "github:nixos/nixos-hardware"; - - # Shameless plug: looking for a way to nixify your themes and make - # everything match nicely? Try nix-colors! - # nix-colors.url = "github:misterio77/nix-colors"; - #Music production nix musnix = { url = "github:musnix/musnix"; }; @@ -38,78 +26,42 @@ ... } @ inputs: let inherit (self) outputs; - # Supported systems for your flake packages, shell, etc. systems = [ "aarch64-linux" "x86_64-linux" "aarch64-darwin" "x86_64-darwin" ]; - # This is a function that generates an attribute by calling a function you - # pass to it, with each system as an argument forAllSystems = nixpkgs.lib.genAttrs systems; in { - # Your custom packages - # Accessible through 'nix build', 'nix shell', etc - - #OLD CODE - # packages = forAllSystems (system: ((import ./pkgs) {pkgs= nixpkgs.legacyPackages.${system};})); - #NEW CODE - # azos-packages = forAllSystems (system: (inputs.azos-core.azos-packages.${system})); - # Formatter for your nix files, available through 'nix fmt' - # Other options beside 'alejandra' include 'nixpkgs-fmt' formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra); - # Your custom packages and modifications, exported as overlays overlays = import ./overlays {inherit inputs;}; - # Reusable nixos modules you might want to export - # These are usually stuff you would upstream into nixpkgs azos-core.nixosModules = inputs.azos-core.nixosModules.nixosModules; nixosModules = import ./modules/nixos; - # Reusable home-manager modules you might want to export - # These are usually stuff you would upstream into home-manager azos-core.homeManagerModules = inputs.azos-core.nixosModules.homeManagerModules; homeManagerModules = import ./modules/home-manager; - #OLD CODE - # homeManagerModules = import ./modules/home-manager; - - # NixOS configuration entrypoint - # Available through 'nixos-rebuild --flake .#your-hostname' + #Systems configured nixosConfigurations = { - # FIXME replace with your hostname + #Lauretta - laptop lauretta = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - # > Our main nixos configuration file < - #We need to musnix here ./nixos/configuration.nix ]; }; + + #Test VM vm = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs outputs;}; modules = [ - # > Our main nixos configuration file < - ./nixos/configuration-vm.nix ]; }; }; - # Standalone home-manager configuration entrypoint - # Available through 'home-manager --flake .#your-username@your-hostname' - # homeConfigurations = { - # # FIXME replace with your username@hostname - # "aner@lauretta" = home-manager.lib.homeManagerConfiguration { - # pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance - # extraSpecialArgs = {inherit inputs outputs;}; - # modules = [ - # # > Our main home-manager configuration file < - # ./home-manager/home.nix - # ]; - # }; - # }; - + #TODO this is probably unsupported shells = forAllSystems (system: ((import ./shells) { pkgs= nixpkgs.legacyPackages.${system} // outputs.packages.${system} // outputs.azos-packages.${system};})); }; } diff --git a/home-manager/home.nix b/home-manager/home.nix index 33b76f4..ce81752 100755 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -15,19 +15,19 @@ ./lauretta-emacs.nix ]; - nixpkgs = { - overlays = [ - inputs.azos-core.overlays.addpkgs - outputs.overlays.additions - outputs.overlays.modifications - outputs.overlays.unstable-packages - ]; - config = { - allowUnfree = true; - # Workaround for https://github.com/nix-community/home-manager/issues/2942 - allowUnfreePredicate = _: true; - }; - }; + # nixpkgs = { + # overlays = [ + # inputs.azos-core.overlays.addpkgs + # outputs.overlays.additions + # outputs.overlays.modifications + # outputs.overlays.unstable-packages + # ]; + # config = { + # allowUnfree = true; + # # Workaround for https://github.com/nix-community/home-manager/issues/2942 + # allowUnfreePredicate = _: true; + # }; + # }; programs.home-manager.enable = true; diff --git a/modules/home-manager/reaper.nix b/modules/home-manager/reaper.nix index 6a32c48..41efb10 100755 --- a/modules/home-manager/reaper.nix +++ b/modules/home-manager/reaper.nix @@ -12,11 +12,7 @@ in { config = lib.mkIf isEnabled { home.packages = with pkgs; [ reaper - # helm #TODO this synth had better work - #TODO collision, would like to make this work. - #TODO we can overlay by simply removing the direct bin - #TODO which we don't need - #TODO but not urgent now + helm #TODO this synth had better work surge lsp-plugins vital diff --git a/nixos/configuration.backup.nix b/nixos/configuration.backup.nix deleted file mode 100755 index 5d84f81..0000000 --- a/nixos/configuration.backup.nix +++ /dev/null @@ -1,83 +0,0 @@ -{ - inputs, - outputs, - lib, - config, - pkgs, - ... -}: { - imports = [ - ./hardware-configuration.nix - ]; - - nixpkgs = { - overlays = [ - # outputs.overlays.additions - outputs.overlays.modifications - outputs.overlays.unstable-packages - ]; - - # Configure your nixpkgs instance - config = { - # Disable if you don't want unfree packages - allowUnfree = true; - }; - }; - - # This will add each flake input as a registry - # To make nix3 commands consistent with your flake - nix.registry = (lib.mapAttrs (_: flake: {inherit flake;})) ((lib.filterAttrs (_: lib.isType "flake")) inputs); - - # This will additionally add your inputs to the system's legacy channels - # Making legacy nix commands consistent as well, awesome! - nix.nixPath = ["/etc/nix/path"]; - environment.etc = - lib.mapAttrs' - (name: value: { - name = "nix/path/${name}"; - value.source = value.flake; - }) - config.nix.registry; - - nix.settings = { - experimental-features = "nix-command flakes"; - auto-optimise-store = true; - }; - - # TODO: Set your hostname - networking.hostName = "your-hostname"; - - # TODO: This is just an example, be sure to use whatever bootloader you prefer - boot.loader.systemd-boot.enable = true; - - users.users = { - # FIXME: Replace with your username - your-username = { - # TODO: You can set an initial password for your user. - # If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install. - # Be sure to change it (using passwd) after rebooting! - initialPassword = "correcthorsebatterystaple"; - isNormalUser = true; - openssh.authorizedKeys.keys = [ - # TODO: Add your SSH public key(s) here, if you plan on using SSH to connect - ]; - # TODO: Be sure to add any other groups you need (such as networkmanager, audio, docker, etc) - extraGroups = ["wheel"]; - }; - }; - - # This setups a SSH server. Very important if you're setting up a headless system. - # Feel free to remove if you don't need it. - services.openssh = { - enable = true; - settings = { - # Forbid root login through SSH. - PermitRootLogin = "no"; - # Use keys only. Remove if you want to SSH using password (not recommended) - PasswordAuthentication = false; - }; - }; - - # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion - system.stateVersion = "23.05"; -} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 5a800f5..3eecdd2 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,13 +1,9 @@ -# 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’). - { inputs, outputs, lib, config, pkgs, ... }: { imports = [ - ./hardware-configuration.nix + ./lauretta-hardware-configuration.nix inputs.nixos-hardware.nixosModules.lenovo-thinkpad-t480 inputs.musnix.nixosModules.musnix inputs.home-manager.nixosModules.home-manager @@ -22,11 +18,10 @@ nixpkgs = { overlays = [ inputs.azos-core.overlays.addpkgs - outputs.overlays.additions + outputs.overlays.addpkgs inputs.azos-core.overlays.qutebrowserdrm - # outputs.overlays.modifications - # outputs.overlays.unstable-packages - # outputs.overlays.addpkgs + outputs.overlays.modifications + outputs.overlays.unstable-packages ]; config = { allowUnfree = true; @@ -107,31 +102,6 @@ services.upower.enable = true; programs.light.enable = true; - # Some programs need SUID wrappers, can be configured further or are - # started in user sessions. - # programs.mtr.enable = true; - # programs.gnupg.agent = { - # enable = true; - # enableSSHSupport = true; - # }; - - # List services that you want to enable: - - # Enable the OpenSSH daemon. - # services.openssh.enable = true; - - # Open ports in the firewall. - # networking.firewall.allowedTCPPorts = [ ... ]; - # networking.firewall.allowedUDPPorts = [ ... ]; - # Or disable the firewall altogether. - # networking.firewall.enable = false; - - # This value determines the NixOS release from which the default - # settings for stateful data, like file locations and database versions - # on your system were taken. It‘s perfectly fine and recommended to leave - # this value at the release version of the first install of this system. - # 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 = "24.11"; # Did you read the comment? } diff --git a/nixos/hardware-configuration.nix b/nixos/lauretta-hardware-configuration.nix similarity index 100% rename from nixos/hardware-configuration.nix rename to nixos/lauretta-hardware-configuration.nix diff --git a/overlays/default.nix b/overlays/default.nix index 2923119..f784983 100755 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -1,15 +1,9 @@ # This file defines overlays {inputs, ...}: { - # This one brings our custom packages from the 'pkgs' directory - # additions = final: _prev: import ../pkgs {pkgs = - # import ../azos-core/pkgs {pkgs = _prev; }; }; - # additions = final: _prev: import inputs.azos-core.azos-pkgs {pkgs = final; }; - additions = final: _prev: (import ../pkgs {pkgs = final.pkgs; }); + addpkgs = final: _prev: (import ../pkgs {pkgs = final.pkgs; }); - # This one contains whatever you want to overlay - # You can change versions, add patches, set compilation flags, anything really. - # https://nixos.wiki/wiki/Overlays + #Current overlay is for helm, to disable binary, so no conflict modifications = final: prev: { helm = prev.helm.overrideAttrs (oldAttrs: rec { patches = oldAttrs.patches or [] ++ [