From d31cb14b88e5c1f9f3d5e8cb331ffd6add274a98 Mon Sep 17 00:00:00 2001 From: js0ny Date: Sat, 11 Oct 2025 18:13:54 +0100 Subject: [PATCH] minor refractor --- nixcfgs/flake.lock | 34 ++++++++++++++++++++++++ nixcfgs/flake.nix | 29 +++++++++++--------- nixcfgs/hosts/zephyrus/default.nix | 1 + nixcfgs/hosts/{zp.nix => zp/default.nix} | 0 nixcfgs/users/js0ny/default.nix | 1 + nixcfgs/users/js0ny/programs/shell.nix | 2 +- nixcfgs/users/js0ny/zephyrus/default.nix | 2 ++ 7 files changed, 55 insertions(+), 14 deletions(-) rename nixcfgs/hosts/{zp.nix => zp/default.nix} (100%) create mode 100644 nixcfgs/users/js0ny/zephyrus/default.nix diff --git a/nixcfgs/flake.lock b/nixcfgs/flake.lock index d64fa84..a4df938 100644 --- a/nixcfgs/flake.lock +++ b/nixcfgs/flake.lock @@ -1,5 +1,23 @@ { "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" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -97,12 +115,28 @@ }, "root": { "inputs": { + "flake-utils": "flake-utils", "home-manager": "home-manager", "nix-darwin": "nix-darwin", "nix-flatpak": "nix-flatpak", "nixpkgs": "nixpkgs", "plasma-manager": "plasma-manager" } + }, + "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", diff --git a/nixcfgs/flake.nix b/nixcfgs/flake.nix index dc1a7f3..d8adb53 100644 --- a/nixcfgs/flake.nix +++ b/nixcfgs/flake.nix @@ -1,9 +1,11 @@ +# ~/.dotfiles/nixcfgs/flake.nix { description = "A simple NixOS flake"; inputs = { nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nix-flatpak.url = "github:gmodena/nix-flatpak"; + flake-utils.url = "github:numtide/flake-utils"; nix-darwin = { url = "github:nix-darwin/nix-darwin/master"; inputs.nixpkgs.follows = "nixpkgs"; @@ -28,39 +30,40 @@ plasma-manager, ... } @ inputs: let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; + specialArgs = {inherit inputs;}; in { nixosConfigurations.zp = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + inherit specialArgs; modules = [ nix-flatpak.nixosModules.nix-flatpak - ./hosts/zp.nix - ./hardware-configuration.nix + ./hosts/zp ]; }; nixosConfigurations.zephyrus = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; + inherit specialArgs; modules = [ ./hosts/zephyrus - home-manager.nixosModules.home-manager - { - # nix-flatpak.homeManagerModules.nix-flatpak - home-manager.sharedModules = [plasma-manager.homeModules.plasma-manager nix-flatpak.homeManagerModules.nix-flatpak]; - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.js0ny = import ./users/js0ny; - nixpkgs.config.allowUnfree = true; - } ]; }; darwinConfigurations."zen" = nix-darwin.lib.darwinSystem { system = "aarch64-darwin"; + inherit specialArgs; modules = [ ./hosts/zen ]; }; + homeConfigurations.js0ny = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages."x86_64-linux"; + extraSpecialArgs = specialArgs; + modules = [ + ./users/js0ny + plasma-manager.homeModules.plasma-manager + nix-flatpak.homeManagerModules.nix-flatpak + ]; + }; }; } diff --git a/nixcfgs/hosts/zephyrus/default.nix b/nixcfgs/hosts/zephyrus/default.nix index 1ab74b8..3956cab 100644 --- a/nixcfgs/hosts/zephyrus/default.nix +++ b/nixcfgs/hosts/zephyrus/default.nix @@ -22,6 +22,7 @@ ./packages.nix ]; + nixpkgs.config.allowUnfree = true; networking.hostName = "zephyrus"; system.stateVersion = "25.05"; } diff --git a/nixcfgs/hosts/zp.nix b/nixcfgs/hosts/zp/default.nix similarity index 100% rename from nixcfgs/hosts/zp.nix rename to nixcfgs/hosts/zp/default.nix diff --git a/nixcfgs/users/js0ny/default.nix b/nixcfgs/users/js0ny/default.nix index 05932d6..b3522eb 100644 --- a/nixcfgs/users/js0ny/default.nix +++ b/nixcfgs/users/js0ny/default.nix @@ -28,6 +28,7 @@ ../../modules/home/programs/zoxide.nix # ./flatpak.nix ]; + nixpkgs.config.allowUnfree = true; home.username = "js0ny"; home.homeDirectory = "/home/js0ny"; diff --git a/nixcfgs/users/js0ny/programs/shell.nix b/nixcfgs/users/js0ny/programs/shell.nix index 3914109..608f965 100644 --- a/nixcfgs/users/js0ny/programs/shell.nix +++ b/nixcfgs/users/js0ny/programs/shell.nix @@ -5,7 +5,7 @@ ni = "touch"; cls = "clear"; ii = "open"; - c = "codium"; + c = "code"; aic = "aichat -s"; }; in { diff --git a/nixcfgs/users/js0ny/zephyrus/default.nix b/nixcfgs/users/js0ny/zephyrus/default.nix new file mode 100644 index 0000000..93bcb0b --- /dev/null +++ b/nixcfgs/users/js0ny/zephyrus/default.nix @@ -0,0 +1,2 @@ +aaa +d: \ No newline at end of file