diff --git a/flake.lock b/flake.lock index b43e6e1..eab5ec0 100644 --- a/flake.lock +++ b/flake.lock @@ -6,14 +6,15 @@ "home-manager": "home-manager", "nixpkgs": [ "nixpkgs" - ] + ], + "systems": "systems" }, "locked": { - "lastModified": 1701216516, - "narHash": "sha256-jKSeJn+7hZ1dZdiH1L+NWUGT2i/BGomKAJ54B9kT06Q=", + "lastModified": 1712079060, + "narHash": "sha256-/JdiT9t+zzjChc5qQiF+jhrVhRt8figYH29rZO7pFe4=", "owner": "ryantm", "repo": "agenix", - "rev": "13ac9ac6d68b9a0896e3d43a082947233189e247", + "rev": "1381a759b205dff7a6818733118d02253340fd5e", "type": "github" }, "original": { @@ -46,11 +47,11 @@ ] }, "locked": { - "lastModified": 1673295039, - "narHash": "sha256-AsdYgE8/GPwcelGgrntlijMg4t3hLFJFCRF3tL5WVjA=", + "lastModified": 1700795494, + "narHash": "sha256-gzGLZSiOhf155FW7262kdHo2YDeugp3VuIFb4/GGng0=", "owner": "lnl7", "repo": "nix-darwin", - "rev": "87b9d090ad39b25b2400029c64825fc2a8868943", + "rev": "4b9b83d5a92e8c1fbfd8eb27eda375908c11ec4d", "type": "github" }, "original": { @@ -67,11 +68,11 @@ ] }, "locked": { - "lastModified": 1706302763, - "narHash": "sha256-Le1wk75qlzOSfzDk8vqYxSdoEyr/ORIbMhziltVNGYw=", + "lastModified": 1713406758, + "narHash": "sha256-kwZvhmx+hSZvjzemKxsAqzEqWmXZS47VVwQhNrINORQ=", "owner": "nix-community", "repo": "disko", - "rev": "f7424625dc1f2e4eceac3009cbd1203d566feebc", + "rev": "1efd500e9805a9efbce401ed5999006d397b9f11", "type": "github" }, "original": { @@ -89,11 +90,11 @@ "nixpkgs-stable": "nixpkgs-stable" }, "locked": { - "lastModified": 1710867991, - "narHash": "sha256-DXDC0u2Nrde3687uRiuwLy3lCCRRiymYluOCgj3tAvQ=", + "lastModified": 1713517520, + "narHash": "sha256-t59lpRo7EulX9J0/bc5/8cUEo7hl6z9YOYukzg54cyU=", "owner": "nix-community", "repo": "emacs-overlay", - "rev": "78da5146ec2bbffc5a31fe08be4bcaf2fd6eeea3", + "rev": "a8692d4e570e93061d2bbe10af4a1590afe82e15", "type": "github" }, "original": { @@ -136,7 +137,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems" + "systems": "systems_2" }, "locked": { "lastModified": 1710146030, @@ -154,14 +155,14 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_2" + "systems": "systems_3" }, "locked": { - "lastModified": 1701680307, - "narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=", + "lastModified": 1710146030, + "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", "owner": "numtide", "repo": "flake-utils", - "rev": "4022d587cbbfd70fe950c1e2083a02621806a725", + "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", "type": "github" }, "original": { @@ -178,11 +179,11 @@ ] }, "locked": { - "lastModified": 1703887061, - "narHash": "sha256-gGPa9qWNc6eCXT/+Z5/zMkyYOuRZqeFZBDbopNZQkuY=", + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", "owner": "hercules-ci", "repo": "gitignore.nix", - "rev": "43e1aa1308018f37118e34d3a9cb4f5e75dc11d5", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", "type": "github" }, "original": { @@ -199,11 +200,11 @@ ] }, "locked": { - "lastModified": 1682203081, - "narHash": "sha256-kRL4ejWDhi0zph/FpebFYhzqlOBrk0Pl3dzGEKSAlEw=", + "lastModified": 1703113217, + "narHash": "sha256-7ulcXOk63TIT2lVDSExj7XzFx09LpdSAPtvgtM7yQPE=", "owner": "nix-community", "repo": "home-manager", - "rev": "32d3e39c491e2f91152c84f8ad8b003420eab0a1", + "rev": "3bfaacf46133c037bb356193bd2f1765d9dc82c1", "type": "github" }, "original": { @@ -219,11 +220,11 @@ ] }, "locked": { - "lastModified": 1710974515, - "narHash": "sha256-jZpdsypecYTOO9l12Vy77otGmh9uz8tGzcguifA30Vs=", + "lastModified": 1713527814, + "narHash": "sha256-0NJLgMKvv+HluzeHei/m8vDhX3xovNLkMw/idwIJ218=", "owner": "nix-community", "repo": "home-manager", - "rev": "1c2acec99933f9835cc7ad47e35303de92d923a4", + "rev": "0184c8180f5cbb8e3a54a239b874fe849d3073cb", "type": "github" }, "original": { @@ -304,11 +305,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1710806803, - "narHash": "sha256-qrxvLS888pNJFwJdK+hf1wpRCSQcqA6W5+Ox202NDa0=", + "lastModified": 1713297878, + "narHash": "sha256-hOkzkhLT59wR8VaMbh1ESjtZLbGi+XNaBN6h49SPqEc=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "b06025f1533a1e07b6db3e75151caa155d1c7eb3", + "rev": "66adc1e47f8784803f2deb6cacd5e07264ec2d5c", "type": "github" }, "original": { @@ -320,11 +321,11 @@ }, "nixpkgs-droid": { "locked": { - "lastModified": 1702350026, - "narHash": "sha256-A+GNZFZdfl4JdDphYKBJ5Ef1HOiFsP18vQe9mqjmUis=", + "lastModified": 1704290814, + "narHash": "sha256-LWvKHp7kGxk/GEtlrGYV68qIvPHkU9iToomNFGagixU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9463103069725474698139ab10f17a9d125da859", + "rev": "70bdadeb94ffc8806c0570eb5c2695ad29f0e421", "type": "github" }, "original": { @@ -352,11 +353,11 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1710695816, - "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", + "lastModified": 1713344939, + "narHash": "sha256-jpHkAt0sG2/J7ueKnG7VvLLkBYUMQbXQ2L8OBpVG53s=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "614b4613980a522ba49f0d194531beddbb7220d3", + "rev": "e402c3eb6d88384ca6c52ef1c53e61bdc9b84ddd", "type": "github" }, "original": { @@ -368,11 +369,11 @@ }, "nixpkgs-stable_2": { "locked": { - "lastModified": 1704874635, - "narHash": "sha256-YWuCrtsty5vVZvu+7BchAxmcYzTMfolSPP5io8+WYCg=", + "lastModified": 1710695816, + "narHash": "sha256-3Eh7fhEID17pv9ZxrPwCLfqXnYP006RKzSs0JptsN84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3dc440faeee9e889fe2d1b4d25ad0f430d449356", + "rev": "614b4613980a522ba49f0d194531beddbb7220d3", "type": "github" }, "original": { @@ -456,11 +457,11 @@ "nixpkgs-stable": "nixpkgs-stable_2" }, "locked": { - "lastModified": 1708018599, - "narHash": "sha256-M+Ng6+SePmA8g06CmUZWi1AjG2tFBX9WCXElBHEKnyM=", + "lastModified": 1712897695, + "narHash": "sha256-nMirxrGteNAl9sWiOhoN5tIHyjBbVi5e2tgZUgZlK3Y=", "owner": "cachix", "repo": "pre-commit-hooks.nix", - "rev": "5df5a70ad7575f6601d91f0efec95dd9bc619431", + "rev": "40e6053ecb65fcbf12863338a6dcefb3f55f1bf8", "type": "github" }, "original": { @@ -490,11 +491,11 @@ "utils": "utils_2" }, "locked": { - "lastModified": 1710449465, - "narHash": "sha256-2orO8nfplp6uQJBFqKkj1iyNMC6TysmwbWwbb4osTag=", + "lastModified": 1713012165, + "narHash": "sha256-z/soXKDnz+w4Nw0LkRaM73YqolhSmIYy6cpg1F2ps8I=", "owner": "simple-nixos-mailserver", "repo": "nixos-mailserver", - "rev": "79c8cfcd5873a85559da6201b116fb38b490d030", + "rev": "9f6635a0351c190179dc6904545f950108a23dd8", "type": "gitlab" }, "original": { @@ -549,6 +550,21 @@ "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" + } + }, "utils": { "locked": { "lastModified": 1659877975, @@ -566,7 +582,7 @@ }, "utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_4" }, "locked": { "lastModified": 1709126324, diff --git a/flake.nix b/flake.nix index 0fe5078..c1eb2e6 100644 --- a/flake.nix +++ b/flake.nix @@ -42,88 +42,116 @@ disko.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = { self, home-manager, nixpkgs, pre-commit-hooks, ... }@inputs: { - checks."x86_64-linux" = let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - in { - pre-commit-check = pre-commit-hooks.lib.${system}.run { - src = ./.; - settings = { ormolu.defaultExtensions = [ "GHC2021" ]; }; - tools.fourmolu = pkgs.haskellPackages.fourmolu; - hooks = { - nixfmt.enable = true; - fourmolu.enable = true; - hpack.enable = true; - hlint.enable = true; - }; - }; - }; - - nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ({ inputs, lib, ... }: { - nixpkgs = { - config.allowUnfree = true; - overlays = with inputs; [ emacs.overlay ]; - }; - }) - ./hosts/thrall - home-manager.nixosModules.home-manager + outputs = + { + self, + home-manager, + nixpkgs, + pre-commit-hooks, + ... + }@inputs: + { + checks."x86_64-linux" = + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - } - { home-manager.users.alex = ./hosts/thrall/alex.nix; } - ]; - }; + pre-commit-check = pre-commit-hooks.lib.${system}.run { + src = ./.; + tools.fourmolu = pkgs.haskellPackages.fourmolu; + tools.nixfmt = pkgs.nixfmt-rfc-style; + hooks = { + nixfmt.enable = true; + fourmolu.enable = true; + hpack.enable = true; + hlint.enable = true; + ormolu = { + settings.defaultExtensions = [ "GHC2021" ]; + }; + }; + }; + }; - nixosConfigurations."dregil" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ ./hosts/dregil ]; - }; - - nixosConfigurations."igor" = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ ./hosts/igor ]; - }; - - nixOnDroidConfigurations.default = with inputs; - nix-on-droid.lib.nixOnDroidConfiguration { + nixosConfigurations."thrall" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit inputs; + }; modules = [ - ./hosts/redmi - { nix.registry.nixpkgs.flake = nixpkgs-droid; } - { nix.nixPath = [ "nixpkgs=${nixpkgs-droid}" ]; } + ( + { inputs, lib, ... }: + { + nixpkgs = { + config.allowUnfree = true; + overlays = with inputs; [ emacs.overlay ]; + }; + } + ) + ./hosts/thrall + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + } + { home-manager.users.alex = ./hosts/thrall/alex.nix; } ]; }; - devShells."x86_64-linux".default = let - system = "x86_64-linux"; - pkgs = import nixpkgs { inherit system; }; - in pkgs.haskellPackages.shellFor { - inherit (self.checks.${system}.pre-commit-check) shellHook; + nixosConfigurations."dregil" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit inputs; + }; + modules = [ ./hosts/dregil ]; + }; - packages = p: [ p.xmonad p.xmonad-contrib ]; + nixosConfigurations."igor" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + specialArgs = { + inherit inputs; + }; + modules = [ ./hosts/igor ]; + }; - withHoogle = true; + nixOnDroidConfigurations.default = + with inputs; + nix-on-droid.lib.nixOnDroidConfiguration { + modules = [ + ./hosts/redmi + { nix.registry.nixpkgs.flake = nixpkgs-droid; } + { nix.nixPath = [ "nixpkgs=${nixpkgs-droid}" ]; } + ]; + }; - nativeBuildInputs = with pkgs; [ - haskellPackages.haskell-language-server - haskellPackages.fourmolu - haskellPackages.hspec-discover - haskellPackages.doctest - haskellPackages.xmonad - haskellPackages.xmonad-contrib - cabal-install - ghcid - nixfmt - hpack - hlint - ]; + devShells."x86_64-linux".default = + let + system = "x86_64-linux"; + pkgs = import nixpkgs { inherit system; }; + in + pkgs.haskellPackages.shellFor { + inherit (self.checks.${system}.pre-commit-check) shellHook; + + packages = p: [ + p.xmonad + p.xmonad-contrib + ]; + + withHoogle = true; + + nativeBuildInputs = with pkgs; [ + haskellPackages.haskell-language-server + haskellPackages.fourmolu + haskellPackages.hspec-discover + haskellPackages.doctest + haskellPackages.xmonad + haskellPackages.xmonad-contrib + cabal-install + ghcid + nixfmt-rfc-style + hpack + hlint + ]; + }; }; - }; } diff --git a/home/alex/cli.nix b/home/alex/cli.nix index fa89cb4..9bde21f 100644 --- a/home/alex/cli.nix +++ b/home/alex/cli.nix @@ -9,7 +9,8 @@ let }; myEza = if builtins.hasAttr "eza" pkgs then "eza" else "exa"; -in { +in +{ imports = [ ./programs/neovim/default.nix ./programs/emacs/default.nix @@ -41,7 +42,7 @@ in { # nix tools nix-index - nixfmt + nixfmt-rfc-style # misc fd # better find file # info about files @@ -59,7 +60,14 @@ in { shellcheck editorconfig-core-c shfmt - (aspellWithDicts (dicts: with dicts; [ en en-computers en-science de ])) + (aspellWithDicts ( + dicts: with dicts; [ + en + en-computers + en-science + de + ] + )) # system tools htop-vim # htop with vim bindings @@ -83,7 +91,11 @@ in { nix-prefetch-git ]; - home.extraOutputsToInstall = [ "doc" "info" "devdoc" ]; + home.extraOutputsToInstall = [ + "doc" + "info" + "devdoc" + ]; xdg.enable = true; @@ -112,7 +124,9 @@ in { }; programs = { - bash = { enable = true; }; + bash = { + enable = true; + }; # better cat bat.enable = true; @@ -126,11 +140,15 @@ in { icons = true; }; - starship = { enable = true; }; + starship = { + enable = true; + }; direnv = { enable = true; - nix-direnv = { enable = true; }; + nix-direnv = { + enable = true; + }; enableZshIntegration = true; enableBashIntegration = true; }; @@ -142,7 +160,9 @@ in { gpg = { enable = true; - settings = { homedir = "~/.local/share/gnupg"; }; + settings = { + homedir = "~/.local/share/gnupg"; + }; }; helix = { @@ -153,7 +173,9 @@ in { password-store = { enable = true; package = pkgs.gopass; - settings = { PASSWORD_STORE_DIR = "$HOME/.local/share/password-store"; }; + settings = { + PASSWORD_STORE_DIR = "$HOME/.local/share/password-store"; + }; }; ssh.enable = true;