Configuration for my NixOS based systems and Home Manager
fork

Configure Feed

Select the types of activity you want to include in your feed.

ADD: direnv + flake for pre-commit check

+199 -2
+1 -1
.envrc
··· 1 - use_nix 1 + use flake
+2 -1
.gitignore
··· 1 - hardware-configuration.nix 1 + #hardware-configuration.nix 2 2 noah-password 3 3 .direnv/ 4 + .pre-commit-config.yaml
+140
flake.lock
··· 1 + { 2 + "nodes": { 3 + "flake-compat": { 4 + "flake": false, 5 + "locked": { 6 + "lastModified": 1696426674, 7 + "narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=", 8 + "owner": "edolstra", 9 + "repo": "flake-compat", 10 + "rev": "0f9255e01c2351cc7d116c072cb317785dd33b33", 11 + "type": "github" 12 + }, 13 + "original": { 14 + "owner": "edolstra", 15 + "repo": "flake-compat", 16 + "type": "github" 17 + } 18 + }, 19 + "gitignore": { 20 + "inputs": { 21 + "nixpkgs": [ 22 + "pre-commit-hooks", 23 + "nixpkgs" 24 + ] 25 + }, 26 + "locked": { 27 + "lastModified": 1709087332, 28 + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", 29 + "owner": "hercules-ci", 30 + "repo": "gitignore.nix", 31 + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", 32 + "type": "github" 33 + }, 34 + "original": { 35 + "owner": "hercules-ci", 36 + "repo": "gitignore.nix", 37 + "type": "github" 38 + } 39 + }, 40 + "home-manager": { 41 + "inputs": { 42 + "nixpkgs": [ 43 + "nixpkgs" 44 + ] 45 + }, 46 + "locked": { 47 + "lastModified": 1744743431, 48 + "narHash": "sha256-iyn/WBYDc7OtjSawbegINDe/gIkok888kQxk3aVnkgg=", 49 + "owner": "nix-community", 50 + "repo": "home-manager", 51 + "rev": "c61bfe3ae692f42ce688b5865fac9e0de58e1387", 52 + "type": "github" 53 + }, 54 + "original": { 55 + "owner": "nix-community", 56 + "ref": "release-24.11", 57 + "repo": "home-manager", 58 + "type": "github" 59 + } 60 + }, 61 + "nixpkgs": { 62 + "locked": { 63 + "lastModified": 1744440957, 64 + "narHash": "sha256-FHlSkNqFmPxPJvy+6fNLaNeWnF1lZSgqVCl/eWaJRc4=", 65 + "owner": "nixos", 66 + "repo": "nixpkgs", 67 + "rev": "26d499fc9f1d567283d5d56fcf367edd815dba1d", 68 + "type": "github" 69 + }, 70 + "original": { 71 + "owner": "nixos", 72 + "ref": "nixos-24.11", 73 + "repo": "nixpkgs", 74 + "type": "github" 75 + } 76 + }, 77 + "nixpkgs-unstable": { 78 + "locked": { 79 + "lastModified": 1744463964, 80 + "narHash": "sha256-LWqduOgLHCFxiTNYi3Uj5Lgz0SR+Xhw3kr/3Xd0GPTM=", 81 + "owner": "nixos", 82 + "repo": "nixpkgs", 83 + "rev": "2631b0b7abcea6e640ce31cd78ea58910d31e650", 84 + "type": "github" 85 + }, 86 + "original": { 87 + "owner": "nixos", 88 + "ref": "nixos-unstable", 89 + "repo": "nixpkgs", 90 + "type": "github" 91 + } 92 + }, 93 + "nixpkgs_2": { 94 + "locked": { 95 + "lastModified": 1730768919, 96 + "narHash": "sha256-8AKquNnnSaJRXZxc5YmF/WfmxiHX6MMZZasRP6RRQkE=", 97 + "owner": "NixOS", 98 + "repo": "nixpkgs", 99 + "rev": "a04d33c0c3f1a59a2c1cb0c6e34cd24500e5a1dc", 100 + "type": "github" 101 + }, 102 + "original": { 103 + "owner": "NixOS", 104 + "ref": "nixpkgs-unstable", 105 + "repo": "nixpkgs", 106 + "type": "github" 107 + } 108 + }, 109 + "pre-commit-hooks": { 110 + "inputs": { 111 + "flake-compat": "flake-compat", 112 + "gitignore": "gitignore", 113 + "nixpkgs": "nixpkgs_2" 114 + }, 115 + "locked": { 116 + "lastModified": 1742649964, 117 + "narHash": "sha256-DwOTp7nvfi8mRfuL1escHDXabVXFGT1VlPD1JHrtrco=", 118 + "owner": "cachix", 119 + "repo": "git-hooks.nix", 120 + "rev": "dcf5072734cb576d2b0c59b2ac44f5050b5eac82", 121 + "type": "github" 122 + }, 123 + "original": { 124 + "owner": "cachix", 125 + "repo": "git-hooks.nix", 126 + "type": "github" 127 + } 128 + }, 129 + "root": { 130 + "inputs": { 131 + "home-manager": "home-manager", 132 + "nixpkgs": "nixpkgs", 133 + "nixpkgs-unstable": "nixpkgs-unstable", 134 + "pre-commit-hooks": "pre-commit-hooks" 135 + } 136 + } 137 + }, 138 + "root": "root", 139 + "version": 7 140 + }
+56
flake.nix
··· 1 + { 2 + description = "Home Manager configuration of noah"; 3 + 4 + inputs = { 5 + # Specify the source of Home Manager and Nixpkgs. 6 + nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11"; 7 + nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable"; 8 + home-manager = { 9 + url = "github:nix-community/home-manager/release-24.11"; 10 + inputs.nixpkgs.follows = "nixpkgs"; 11 + }; 12 + pre-commit-hooks.url = "github:cachix/git-hooks.nix"; 13 + }; 14 + 15 + outputs = { self, nixpkgs, nixpkgs-unstable, home-manager, pre-commit-hooks, ... }@inputs: 16 + let 17 + system = "aarch64-darwin"; 18 + pkgs = nixpkgs.legacyPackages.${system}; 19 + unstable-pkgs = nixpkgs-unstable.legacyPackages.${system}; 20 + supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ]; 21 + forAllSystems = nixpkgs.lib.genAttrs supportedSystems; 22 + in 23 + { 24 + homeConfigurations."noah" = home-manager.lib.homeManagerConfiguration { 25 + inherit pkgs; 26 + 27 + # Specify your home configuration modules here, for example, 28 + # the path to your home.nix. 29 + modules = [ ./noah-home.nix ]; 30 + 31 + # Optionally use extraSpecialArgs 32 + # to pass through arguments to home.nix 33 + extraSpecialArgs = { 34 + unstable = unstable-pkgs; 35 + }; 36 + }; 37 + checks = forAllSystems (system: { 38 + pre-commit-check = inputs.pre-commit-hooks.lib.${system}.run { 39 + src = ./.; 40 + # If your hooks are intrusive, avoid running on each commit with a default_states like this: 41 + # default_stages = ["manual" "push"]; 42 + hooks = { 43 + nixpkgs-fmt.enable = true; 44 + nil.enable = true; 45 + luacheck.enable = true; 46 + }; 47 + }; 48 + }); 49 + devShells = forAllSystems (system: { 50 + default = nixpkgs.legacyPackages.${system}.mkShell { 51 + inherit (self.checks.${system}.pre-commit-check) shellHook; 52 + buildInputs = self.checks.${system}.pre-commit-check.enabledPackages; 53 + }; 54 + }); 55 + }; 56 + }