diff --git a/README.md b/README.md index e5edc638..dcb738d0 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ From there you can either install the host you want with `sudo nixos-rebuild swi | | | |----------------|----------------------------------------------------------| -| **Shell:** | bash / elvish | +| **Shell:** | bash / zsh | | **DM:** | lightdm + lightdm-mini-greeter | | **WM:** | bspwm + polybar | | **Editor:** | nvim | @@ -36,25 +36,18 @@ From there you can either install the host you want with `sudo nixos-rebuild swi ----- -### Status: Beta -The volcanic rock still shifts below this structure. It has not solidified and cannot yet be considered `home` -You should not expect landmarks here. -Learn to adopt Chaos. +### Status: Tectonic +The planet is cooling down, and approaching stability. It is well understood, and the continents are not expected to change much more. One should expect some more localized changes, and further development. ## Shoulders Summoning is powerful magic, and cannot be created in isolation. It stands on the [shoulders of the following giants][giants]: ### :onion: — like the layers of an onion -- [`divnix/digga`][digga] -- [`gytis-ivaskevicius/flake-utils-plus`][fup] -- [`numtide/flake-utils`][fu] -- [`numtide/devshell`][devshell] - [`serokell/deploy-rs`][deploy] -- [`berberman/nvfetcher`][nvfetcher] - [`NixOS/nixpkgs`][nixpkgs] -- Agenix -- direnv +- [`ryantm/agenix`][agenix] +- [`direnv/direnv`][direnv] :heart: @@ -73,21 +66,14 @@ https://github.com/hlissner/dotfiles DevOS is licensed under the [MIT License][mit]. [community]: https://github.com/divnix/devos/tree/community -[core]: https://github.com/divnix/devos [deploy]: https://github.com/serokell/deploy-rs -[devshell]: https://github.com/numtide/devshell -[digga]: https://github.com/divnix/digga [dotfiles]: https://github.com/hlissner/dotfiles [flake-doc]: https://github.com/NixOS/nix/blob/master/src/nix/flake.md [flakes]: https://nixos.wiki/wiki/Flakes -[fu]: https://github.com/numtide/flake-utils -[fup]: https://github.com/gytis-ivaskevicius/flake-utils-plus [giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants [home-manager]: https://nix-community.github.io/home-manager [mit]: https://mit-license.org -[mk-flake]: https://github.com/divnix/digga/tree/master/src/mkFlake [nix]: https://nixos.org/manual/nix/stable [nixos]: https://nixos.org/manual/nixos/stable [nixpkgs]: https://github.com/NixOS/nixpkgs -[nvfetcher]: https://github.com/berberman/nvfetcher diff --git a/flake.nix b/flake.nix index c417572e..93668cc2 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,7 @@ unstable = unstable.legacyPackages.${prev.system}; deploy = deploy-rs.packages.${prev.system}.deploy-rs; }; + nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ @@ -91,6 +92,16 @@ self.overlays.additions ]; }); + + # for when space matters + litePkgsFor = forAllSystems (system: import nixpkgs { + inherit system; + overlays = [ + agenix.overlay + tidalcycles.overlays.default # needed for nvim which comes pre-installed lol + self.overlays.additions + ]; + }); in { # Your custom packages @@ -134,6 +145,7 @@ } ]; }; + helix = nixpkgs.lib.nixosSystem rec { specialArgs = { inherit inputs self; }; system = "x86_64-linux"; @@ -151,6 +163,7 @@ } ]; }; + lituus = nixpkgs.lib.nixosSystem rec { specialArgs = { inherit inputs self; }; system = "x86_64-linux"; @@ -168,24 +181,20 @@ } ]; }; + cube = nixpkgs.lib.nixosSystem rec { specialArgs = { inherit inputs self; }; system = "x86_64-linux"; - pkgs = nixpkgsFor.${system}; + pkgs = litePkgsFor.${system}; modules = [ ./hosts/cube agenix.nixosModules.age self.nixosModules.backup self.nixosModules.wireguard basant.nixosModule - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.users.anish = import ./home/core; - } ]; }; + box = nixpkgs.lib.nixosSystem rec { specialArgs = { inherit inputs self; }; system = "x86_64-linux"; diff --git a/home/profiles/nvim/default.nix b/home/profiles/nvim/default.nix index bc2b066e..e719969d 100644 --- a/home/profiles/nvim/default.nix +++ b/home/profiles/nvim/default.nix @@ -143,10 +143,9 @@ let tasklib pynvim six - python-lsp-server - python-lsp-black pylsp-mypy black + isort # other python packages you want ]; python-with-my-packages = pkgs.python3.withPackages my-python-packages; @@ -539,23 +538,15 @@ in -- null-ls local null_ls = require "null-ls" - local pyright = { - cmd = { "pyright" }, - filetypes = { "python", }, - debounce = 250, - debug = false, - default_timeout = 5000, - args = { "-p", "$FILENAME", "--skipunannotated" } - } local sources = { - pyright, null_ls.builtins.code_actions.statix, null_ls.builtins.diagnostics.shellcheck, -- null_ls.builtins.diagnostics.clj_kondo, - -- null_ls.builtins.formatting.black, + null_ls.builtins.formatting.isort, + null_ls.builtins.formatting.black, null_ls.builtins.code_actions.proselint, - -- null_ls.builtins.diagnostics.mypy, } + null_ls.setup({sources}) -- Setup lspconfig require("lsp-format").setup {} @@ -567,7 +558,7 @@ in capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) local lspconfig = require('lspconfig') - local servers = { 'clojure_lsp', 'terraform_lsp', 'zls' } + local servers = { 'clojure_lsp', 'terraform_lsp', 'zls', 'pyright', 'rust_analyzer', 'tsserver' } for _, lsp in ipairs(servers) do lspconfig[lsp].setup { on_attach = function(client, bufnr) @@ -584,29 +575,30 @@ in end, capabilities = capabilities, } - require('lspconfig').pylsp.setup { - on_attach = function(client, bufnr) - format.on_attach(client) - navic.attach(client, bufnr) - end, - capabilities = capabilities, - settings = { - pylsp = { - configurationSources = { "flake8", "mypy", "black" }, - plugins = { - black = {enabled = true}, - jedi_signature_help = {enabled = true}, - jedi_completion = { include_params = true }, - pylsp_mypy={ enabled = true }, - pycodestyle={ - enabled=true, - ignore={'E501', 'E231'}, - maxLineLength=120, - }, - }, - }, - }, - } + -- deprecated pylsp + -- require('lspconfig').pylsp.setup { + -- on_attach = function(client, bufnr) + -- format.on_attach(client) + -- navic.attach(client, bufnr) + -- end, + -- capabilities = capabilities, + -- settings = { + -- pylsp = { + -- configurationSources = { "flake8", "mypy", "black" }, + -- plugins = { + -- black = {enabled = true}, + -- jedi_signature_help = {enabled = true}, + -- jedi_completion = { include_params = true }, + -- pylsp_mypy={ enabled = true }, + -- pycodestyle={ + -- enabled=true, + -- ignore={'E501', 'E231'}, + -- maxLineLength=120, + -- }, + -- }, + -- }, + -- }, + -- } require('gitsigns').setup { sign_priority=80 } @@ -738,16 +730,14 @@ in clojure-lsp rnix-lsp terraform-lsp + rust-analyzer clj-kondo zls gcc - nodePackages.pyright + nodePackages_latest.pyright shellcheck proselint statix - # installs different langauge servers for neovim-lsp - # have a look on the link below to figure out the ones for your languages - # https://github.com/neovim/nvim-lspconfig/blob/master/CONFIG.md nodePackages.typescript nodePackages.typescript-language-server ]; diff --git a/hosts/profiles/core/default.nix b/hosts/profiles/core/default.nix index b33cca67..d9ce3acf 100644 --- a/hosts/profiles/core/default.nix +++ b/hosts/profiles/core/default.nix @@ -36,16 +36,14 @@ in cached-nix-shell ]; - services.devmon.enable = true; - # For rage encryption, all hosts need a ssh key pair services.openssh = { enable = true; openFirewall = lib.mkDefault false; }; - programs.gnupg.agent.enable = true; - #programs.gnupg.agent.pinentryFlavor = "curses"; + # programs.gnupg.agent.enable = true; + # programs.gnupg.agent.pinentryFlavor = "curses"; services.earlyoom.enable = true; } diff --git a/hosts/profiles/desktop/default.nix b/hosts/profiles/desktop/default.nix index d382facb..5614b22b 100644 --- a/hosts/profiles/desktop/default.nix +++ b/hosts/profiles/desktop/default.nix @@ -25,6 +25,9 @@ in age.secrets.mossnet.file = "${self}/secrets/mossnet.age"; age.secrets.mossnet.owner = "anish"; + # We don't plug USBs into servers + services.devmon.enable = true; + services = { gnome.gnome-keyring.enable = true; upower.enable = true; diff --git a/hosts/profiles/site/default.nix b/hosts/profiles/site/default.nix index 50a6aad5..874cf595 100644 --- a/hosts/profiles/site/default.nix +++ b/hosts/profiles/site/default.nix @@ -1,5 +1,5 @@ { self, pkgs, ... }: { services."anish.lakhwara.com".enable = true; - services."anish.lakhwara.com".enableSSL = true; + services."anish.lakhwara.com".enableSSL = false; }