trying to get cube off the ground again

This commit is contained in:
Anish Lakhwara 2022-12-07 15:52:37 +10:00
parent 6019c6a30f
commit a242b28158
6 changed files with 58 additions and 72 deletions

View file

@ -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 | | **DM:** | lightdm + lightdm-mini-greeter |
| **WM:** | bspwm + polybar | | **WM:** | bspwm + polybar |
| **Editor:** | nvim | | **Editor:** | nvim |
@ -36,25 +36,18 @@ From there you can either install the host you want with `sudo nixos-rebuild swi
----- -----
### Status: Beta ### Status: Tectonic
The volcanic rock still shifts below this structure. It has not solidified and cannot yet be considered `home` 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.
You should not expect landmarks here.
Learn to adopt Chaos.
## Shoulders ## Shoulders
Summoning is powerful magic, and cannot be created in isolation. It stands on the [shoulders of the Summoning is powerful magic, and cannot be created in isolation. It stands on the [shoulders of the
following giants][giants]: following giants][giants]:
### :onion: — like the layers of an onion ### :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] - [`serokell/deploy-rs`][deploy]
- [`berberman/nvfetcher`][nvfetcher]
- [`NixOS/nixpkgs`][nixpkgs] - [`NixOS/nixpkgs`][nixpkgs]
- Agenix - [`ryantm/agenix`][agenix]
- direnv - [`direnv/direnv`][direnv]
:heart: :heart:
@ -73,21 +66,14 @@ https://github.com/hlissner/dotfiles
DevOS is licensed under the [MIT License][mit]. DevOS is licensed under the [MIT License][mit].
[community]: https://github.com/divnix/devos/tree/community [community]: https://github.com/divnix/devos/tree/community
[core]: https://github.com/divnix/devos
[deploy]: https://github.com/serokell/deploy-rs [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 [dotfiles]: https://github.com/hlissner/dotfiles
[flake-doc]: https://github.com/NixOS/nix/blob/master/src/nix/flake.md [flake-doc]: https://github.com/NixOS/nix/blob/master/src/nix/flake.md
[flakes]: https://nixos.wiki/wiki/Flakes [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 [giants]: https://en.wikipedia.org/wiki/Standing_on_the_shoulders_of_giants
[home-manager]: https://nix-community.github.io/home-manager [home-manager]: https://nix-community.github.io/home-manager
[mit]: https://mit-license.org [mit]: https://mit-license.org
[mk-flake]: https://github.com/divnix/digga/tree/master/src/mkFlake
[nix]: https://nixos.org/manual/nix/stable [nix]: https://nixos.org/manual/nix/stable
[nixos]: https://nixos.org/manual/nixos/stable [nixos]: https://nixos.org/manual/nixos/stable
[nixpkgs]: https://github.com/NixOS/nixpkgs [nixpkgs]: https://github.com/NixOS/nixpkgs
[nvfetcher]: https://github.com/berberman/nvfetcher

View file

@ -74,6 +74,7 @@
unstable = unstable.legacyPackages.${prev.system}; unstable = unstable.legacyPackages.${prev.system};
deploy = deploy-rs.packages.${prev.system}.deploy-rs; deploy = deploy-rs.packages.${prev.system}.deploy-rs;
}; };
nixpkgsFor = forAllSystems (system: import nixpkgs { nixpkgsFor = forAllSystems (system: import nixpkgs {
inherit system; inherit system;
config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [ config.allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) [
@ -91,6 +92,16 @@
self.overlays.additions 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 in
{ {
# Your custom packages # Your custom packages
@ -134,6 +145,7 @@
} }
]; ];
}; };
helix = nixpkgs.lib.nixosSystem rec { helix = nixpkgs.lib.nixosSystem rec {
specialArgs = { inherit inputs self; }; specialArgs = { inherit inputs self; };
system = "x86_64-linux"; system = "x86_64-linux";
@ -151,6 +163,7 @@
} }
]; ];
}; };
lituus = nixpkgs.lib.nixosSystem rec { lituus = nixpkgs.lib.nixosSystem rec {
specialArgs = { inherit inputs self; }; specialArgs = { inherit inputs self; };
system = "x86_64-linux"; system = "x86_64-linux";
@ -168,24 +181,20 @@
} }
]; ];
}; };
cube = nixpkgs.lib.nixosSystem rec { cube = nixpkgs.lib.nixosSystem rec {
specialArgs = { inherit inputs self; }; specialArgs = { inherit inputs self; };
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = nixpkgsFor.${system}; pkgs = litePkgsFor.${system};
modules = [ modules = [
./hosts/cube ./hosts/cube
agenix.nixosModules.age agenix.nixosModules.age
self.nixosModules.backup self.nixosModules.backup
self.nixosModules.wireguard self.nixosModules.wireguard
basant.nixosModule 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 { box = nixpkgs.lib.nixosSystem rec {
specialArgs = { inherit inputs self; }; specialArgs = { inherit inputs self; };
system = "x86_64-linux"; system = "x86_64-linux";

View file

@ -143,10 +143,9 @@ let
tasklib tasklib
pynvim pynvim
six six
python-lsp-server
python-lsp-black
pylsp-mypy pylsp-mypy
black black
isort
# other python packages you want # other python packages you want
]; ];
python-with-my-packages = pkgs.python3.withPackages my-python-packages; python-with-my-packages = pkgs.python3.withPackages my-python-packages;
@ -539,23 +538,15 @@ in
-- null-ls -- null-ls
local null_ls = require "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 = { local sources = {
pyright,
null_ls.builtins.code_actions.statix, null_ls.builtins.code_actions.statix,
null_ls.builtins.diagnostics.shellcheck, null_ls.builtins.diagnostics.shellcheck,
-- null_ls.builtins.diagnostics.clj_kondo, -- 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.code_actions.proselint,
-- null_ls.builtins.diagnostics.mypy,
} }
null_ls.setup({sources})
-- Setup lspconfig -- Setup lspconfig
require("lsp-format").setup {} require("lsp-format").setup {}
@ -567,7 +558,7 @@ in
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)
local lspconfig = require('lspconfig') 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 for _, lsp in ipairs(servers) do
lspconfig[lsp].setup { lspconfig[lsp].setup {
on_attach = function(client, bufnr) on_attach = function(client, bufnr)
@ -584,29 +575,30 @@ in
end, end,
capabilities = capabilities, capabilities = capabilities,
} }
require('lspconfig').pylsp.setup { -- deprecated pylsp
on_attach = function(client, bufnr) -- require('lspconfig').pylsp.setup {
format.on_attach(client) -- on_attach = function(client, bufnr)
navic.attach(client, bufnr) -- format.on_attach(client)
end, -- navic.attach(client, bufnr)
capabilities = capabilities, -- end,
settings = { -- capabilities = capabilities,
pylsp = { -- settings = {
configurationSources = { "flake8", "mypy", "black" }, -- pylsp = {
plugins = { -- configurationSources = { "flake8", "mypy", "black" },
black = {enabled = true}, -- plugins = {
jedi_signature_help = {enabled = true}, -- black = {enabled = true},
jedi_completion = { include_params = true }, -- jedi_signature_help = {enabled = true},
pylsp_mypy={ enabled = true }, -- jedi_completion = { include_params = true },
pycodestyle={ -- pylsp_mypy={ enabled = true },
enabled=true, -- pycodestyle={
ignore={'E501', 'E231'}, -- enabled=true,
maxLineLength=120, -- ignore={'E501', 'E231'},
}, -- maxLineLength=120,
}, -- },
}, -- },
}, -- },
} -- },
-- }
require('gitsigns').setup { sign_priority=80 } require('gitsigns').setup { sign_priority=80 }
@ -738,16 +730,14 @@ in
clojure-lsp clojure-lsp
rnix-lsp rnix-lsp
terraform-lsp terraform-lsp
rust-analyzer
clj-kondo clj-kondo
zls zls
gcc gcc
nodePackages.pyright nodePackages_latest.pyright
shellcheck shellcheck
proselint proselint
statix 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
nodePackages.typescript-language-server nodePackages.typescript-language-server
]; ];

View file

@ -36,16 +36,14 @@ in
cached-nix-shell cached-nix-shell
]; ];
services.devmon.enable = true;
# For rage encryption, all hosts need a ssh key pair # For rage encryption, all hosts need a ssh key pair
services.openssh = { services.openssh = {
enable = true; enable = true;
openFirewall = lib.mkDefault false; openFirewall = lib.mkDefault false;
}; };
programs.gnupg.agent.enable = true; # programs.gnupg.agent.enable = true;
#programs.gnupg.agent.pinentryFlavor = "curses"; # programs.gnupg.agent.pinentryFlavor = "curses";
services.earlyoom.enable = true; services.earlyoom.enable = true;
} }

View file

@ -25,6 +25,9 @@ in
age.secrets.mossnet.file = "${self}/secrets/mossnet.age"; age.secrets.mossnet.file = "${self}/secrets/mossnet.age";
age.secrets.mossnet.owner = "anish"; age.secrets.mossnet.owner = "anish";
# We don't plug USBs into servers
services.devmon.enable = true;
services = { services = {
gnome.gnome-keyring.enable = true; gnome.gnome-keyring.enable = true;
upower.enable = true; upower.enable = true;

View file

@ -1,5 +1,5 @@
{ self, pkgs, ... }: { self, pkgs, ... }:
{ {
services."anish.lakhwara.com".enable = true; services."anish.lakhwara.com".enable = true;
services."anish.lakhwara.com".enableSSL = true; services."anish.lakhwara.com".enableSSL = false;
} }