diff --git a/flake.lock b/flake.lock index edf479f..5e69110 100644 --- a/flake.lock +++ b/flake.lock @@ -171,22 +171,6 @@ "type": "github" } }, - "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1696426674, - "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, "flake-parts": { "inputs": { "nixpkgs-lib": [ @@ -212,24 +196,6 @@ "inputs": { "systems": "systems" }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, "locked": { "lastModified": 1726560853, "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", @@ -244,9 +210,9 @@ "type": "github" } }, - "flake-utils_3": { + "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -262,7 +228,7 @@ "type": "github" } }, - "flake-utils_4": { + "flake-utils_3": { "inputs": { "systems": [ "stylix", @@ -299,24 +265,34 @@ "type": "github" } }, - "ghostty": { + "git-hooks": { "inputs": { - "flake-compat": "flake-compat", - "nixpkgs-stable": "nixpkgs-stable", - "nixpkgs-unstable": "nixpkgs-unstable", - "zig": "zig" + "flake-compat": [ + "stylix", + "flake-compat" + ], + "gitignore": "gitignore_2", + "nixpkgs": [ + "stylix", + "nixpkgs" + ], + "nixpkgs-stable": [ + "stylix", + "git-hooks", + "nixpkgs" + ] }, "locked": { - "lastModified": 1735623628, - "narHash": "sha256-NPB955CKnj/25LEPuZ6HsIIRiZnJAg3b6JrxyT8UuWo=", - "owner": "ghostty-org", - "repo": "ghostty", - "rev": "ecfca17ad6406a82388cc88ac3542e651c7a3988", + "lastModified": 1731363552, + "narHash": "sha256-vFta1uHnD29VUY4HJOO/D6p6rxyObnf+InnSMT4jlMU=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "cd1af27aa85026ac759d5d3fccf650abe7e1bbf0", "type": "github" }, "original": { - "owner": "ghostty-org", - "repo": "ghostty", + "owner": "cachix", + "repo": "git-hooks.nix", "type": "github" } }, @@ -342,6 +318,28 @@ "type": "github" } }, + "gitignore_2": { + "inputs": { + "nixpkgs": [ + "stylix", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "gnome-shell": { "flake": false, "locked": { @@ -362,16 +360,16 @@ "helix": { "inputs": { "crane": "crane", - "flake-utils": "flake-utils_2", + "flake-utils": "flake-utils", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1735592296, - "narHash": "sha256-V6K/zWckSCSdXDhE3yvsp/m8olG7a8VwBL2gFzwax9M=", + "lastModified": 1736096311, + "narHash": "sha256-Sei0cW8oVVV1zjbtd9N8h3n+XB07TtrwTvz+n5VCs1U=", "owner": "helix-editor", "repo": "helix", - "rev": "bbeb99dc406b6ee822dfa2bbff9a0b8918ee5a90", + "rev": "377e36908a15a4fee46a42ecd6cc8f76e171c23b", "type": "github" }, "original": { @@ -426,9 +424,9 @@ "lanzaboote": { "inputs": { "crane": "crane_2", - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat", "flake-parts": "flake-parts", - "flake-utils": "flake-utils_3", + "flake-utils": "flake-utils_2", "nixpkgs": [ "nixpkgs-unstable" ], @@ -457,11 +455,11 @@ ] }, "locked": { - "lastModified": 1735547435, - "narHash": "sha256-Gf6EuiKaxINuVYfDH4NQ8+WJWHovz2SUTa3WaKS0GlI=", + "lastModified": 1735774660, + "narHash": "sha256-g/9+jzWvu73YPHw9AB/yVCDSld7GdovliAUkfVP7YU0=", "owner": "Mic92", "repo": "nix-ld", - "rev": "2cfdb1f527f060d215ba284348e46c8678512b71", + "rev": "5f12c696cae384350f95f2af9dffe39ee0e445e5", "type": "github" }, "original": { @@ -517,22 +515,6 @@ } }, "nixpkgs-stable": { - "locked": { - "lastModified": 1733423277, - "narHash": "sha256-TxabjxEgkNbCGFRHgM/b9yZWlBj60gUOUnRT/wbVQR8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "e36963a147267afc055f7cf65225958633e536bf", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "release-24.11", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-stable_2": { "locked": { "lastModified": 1710695816, "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", @@ -550,27 +532,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1733229606, - "narHash": "sha256-FLYY5M0rpa5C2QAE3CKLYAM6TwbKicdRK6qNrSHlNrE=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "566e53c2ad750c84f6d31f9ccb9d00f823165550", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs-unstable_2": { - "locked": { - "lastModified": 1735471104, - "narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=", + "lastModified": 1735834308, + "narHash": "sha256-dklw3AXr3OGO4/XT1Tu3Xz9n/we8GctZZ75ZWVqAVhk=", "owner": "nixos", "repo": "nixpkgs", - "rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4", + "rev": "6df24922a1400241dae323af55f30e4318a6ca65", "type": "github" }, "original": { @@ -582,11 +548,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1735531152, - "narHash": "sha256-As8I+ebItDKtboWgDXYZSIjGlKeqiLBvjxsQHUmAf1Q=", + "lastModified": 1735922141, + "narHash": "sha256-vk0xwGZSlvZ/596yxOtsk4gxsIx2VemzdjiU8zhjgWw=", "owner": "nixos", "repo": "nixpkgs", - "rev": "3ffbbdbac0566a0977da3d2657b89cbcfe9a173b", + "rev": "d29ab98cd4a70a387b8ceea3e930b3340d41ac5a", "type": "github" }, "original": { @@ -607,7 +573,7 @@ "lanzaboote", "nixpkgs" ], - "nixpkgs-stable": "nixpkgs-stable_2" + "nixpkgs-stable": "nixpkgs-stable" }, "locked": { "lastModified": 1717664902, @@ -626,7 +592,6 @@ "root": { "inputs": { "disko": "disko", - "ghostty": "ghostty", "helix": "helix", "home-manager": "home-manager", "lanzaboote": "lanzaboote", @@ -634,7 +599,7 @@ "nixos-facter-modules": "nixos-facter-modules", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", - "nixpkgs-unstable": "nixpkgs-unstable_2", + "nixpkgs-unstable": "nixpkgs-unstable", "secrets": "secrets", "sops-nix": "sops-nix", "stylix": "stylix", @@ -714,11 +679,11 @@ ] }, "locked": { - "lastModified": 1735468296, - "narHash": "sha256-ZjUjbvS06jf4fElOF4ve8EHjbpbRVHHypStoY8HGzk8=", + "lastModified": 1736064798, + "narHash": "sha256-xJRN0FmX9QJ6+w8eIIIxzBU1AyQcLKJ1M/Gp6lnSD20=", "owner": "Mic92", "repo": "sops-nix", - "rev": "bcb8b65aa596866eb7e5c3e1a6cccbf5d1560b27", + "rev": "5dc08f9cc77f03b43aacffdfbc8316807773c930", "type": "github" }, "original": { @@ -733,24 +698,25 @@ "base16-fish": "base16-fish", "base16-helix": "base16-helix", "base16-vim": "base16-vim", - "flake-compat": "flake-compat_3", - "flake-utils": "flake-utils_4", + "flake-compat": "flake-compat_2", + "flake-utils": "flake-utils_3", + "git-hooks": "git-hooks", "gnome-shell": "gnome-shell", "home-manager": "home-manager_2", "nixpkgs": [ "nixpkgs" ], - "systems": "systems_4", + "systems": "systems_3", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", "tinted-tmux": "tinted-tmux" }, "locked": { - "lastModified": 1734110444, - "narHash": "sha256-fp1iV2JldCSvz+7ODzXYUkQ+H7zyiWw5E0MQ4ILC4vw=", + "lastModified": 1736019457, + "narHash": "sha256-MWe3RXEV9dov1wFZraWagVAxynPo/VceStIYfNRgqG4=", "owner": "danth", "repo": "stylix", - "rev": "9015d5d0d5d100f849129c43d257b827d300b089", + "rev": "5204b085385c0bfaa1eb1bb0f8dc81922012128d", "type": "github" }, "original": { @@ -805,21 +771,6 @@ "type": "github" } }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, "tinted-foot": { "flake": false, "locked": { @@ -913,11 +864,11 @@ ] }, "locked": { - "lastModified": 1735617939, - "narHash": "sha256-5kaPvKkWx5okEePzI3KvDpBYn9CGJ/1QUhIX44R5Ny0=", + "lastModified": 1735963510, + "narHash": "sha256-88Pl16zxKqGEFbw6U04R9AXU0j12EVvYHFRgPQ/4o3g=", "owner": "youwen5", "repo": "zen-browser-flake", - "rev": "48130c8dd35a0f65c6b2eac5b54889ebf58cb9eb", + "rev": "4e8e40a78eb6532d30690d975805be5dbba98255", "type": "github" }, "original": { @@ -925,31 +876,6 @@ "repo": "zen-browser-flake", "type": "github" } - }, - "zig": { - "inputs": { - "flake-compat": [ - "ghostty" - ], - "flake-utils": "flake-utils", - "nixpkgs": [ - "ghostty", - "nixpkgs-stable" - ] - }, - "locked": { - "lastModified": 1717848532, - "narHash": "sha256-d+xIUvSTreHl8pAmU1fnmkfDTGQYCn2Rb/zOwByxS2M=", - "owner": "mitchellh", - "repo": "zig-overlay", - "rev": "02fc5cc555fc14fda40c42d7c3250efa43812b43", - "type": "github" - }, - "original": { - "owner": "mitchellh", - "repo": "zig-overlay", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 8981dbf..414eb9f 100644 --- a/flake.nix +++ b/flake.nix @@ -51,7 +51,6 @@ url = "github:youwen5/zen-browser-flake"; inputs.nixpkgs.follows = "nixpkgs"; }; - ghostty.url = "github:ghostty-org/ghostty"; # nixvim-flake.url = "github:arunoruto/nvim.nix"; # Styling stylix = { @@ -121,30 +120,61 @@ # image = "anime/dan-da-dan/op/jiji1.png"; # image = "anime/dan-da-dan/op/turbogranny1.png"; - hostname-users = { + machines = { # Personal - "isshin" = "mirza"; # Framework Laptop AMD 7040 - "zangetsu" = "mirza"; # Framework Case Intel 11th - "yhwach" = "mirza"; # Tower PC - # "kuchiki" = "mirza"; # New NAS Server - "yoruichi" = "mirza"; # Crappy AMD Mini PC - "shinji" = "mirza"; # M720q Mini PC - "kenpachi" = "mirza"; # S740 Mini PC - # "narouter" = "mirza"; # Firewall - "aizen" = "mirza"; + isshin = { + usernames = [ "mirza" ]; + }; # Framework Laptop AMD 7040 + zangetsu = { + usernames = [ "mirza" ]; + }; # Framework Case Intel 11th + yhwach = { + usernames = [ "mirza" ]; + }; # Tower PC + # kuchiki = { + # usernames = [ "mirza" ]; + # }; # New NAS Server + yoruichi = { + usernames = [ "mirza" ]; + }; # Crappy AMD Mini PC + shinji = { + usernames = [ "mirza" ]; + }; # M720q Mini PC + kenpachi = { + usernames = [ "mirza" ]; + }; # S740 Mini PC + # narouter = { + # usernames = [ "mirza" ]; + # }; # Firewall + aizen = { + usernames = [ "mirza" ]; + }; # Work - "kyuubi" = "mar"; # Crappy Work PC - "madara" = "mar"; # Nice Work PC + kyuubi = { + usernames = [ "mar" ]; + }; # Crappy Work PC + madara = { + usernames = [ "mar" ]; + }; # Nice Work PC }; + + unique-users = lib.lists.unique ( + lib.lists.concatMap (x: x.usernames) (builtins.attrValues machines) + ); in { - nixosConfigurations = lib.genAttrs (builtins.attrNames hostname-users) ( + nixosConfigurations = lib.genAttrs (builtins.attrNames machines) ( hostname: + let + # TODO: enable support for multiple users in the future + # Could be relevant for setting up a kodi or github-runner user + username = lib.lists.elemAt machines.${hostname}.usernames 0; + in lib.nixosSystem { inherit system; specialArgs = { - inherit inputs; - username = hostname-users."${hostname}"; + inherit inputs username; + # username = machines."${hostname}"; }; modules = [ # inputs.nur.nixosModules.nur @@ -176,7 +206,8 @@ } ); - homeConfigurations = lib.genAttrs (lib.lists.unique (builtins.attrValues hostname-users)) ( + # homeConfigurations = lib.genAttrs (lib.lists.unique (builtins.attrValues machines)) ( + homeConfigurations = lib.genAttrs unique-users ( user: home-manager.lib.homeManagerConfiguration { inherit pkgs; @@ -204,6 +235,7 @@ packages.${system} = import ./pkgs pkgs; # devShells.${system} = import ./shells nixpkgs.legacyPackages.${system}; # packages.${system} = import ./pkgs nixpkgs.legacyPackages.${system}; + }; nixConfig = {