hosts and modules restructuring

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-12-06 19:30:28 +05:30
parent d654ab9463
commit 42843126e3
19 changed files with 137 additions and 100 deletions

View File

@@ -1,26 +0,0 @@
{config, pkgs, ...}:
{
time.timeZone = "Asia/Kolkata";
environment = {
sessionVariables = {
EDITOR = "vim";
};
};
security = {
sudo.enable = false;
doas = {
enable = true;
extraRules = [
{
users = [ ];
keepEnv = true;
persist = true;
}
];
};
};
documentation.enable = false;
users.extraUsers.root = {
shell = pkgs.zsh;
};
}

16
modules/minpkgs.nix Normal file
View File

@@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
environment.systemPackages = with pkgs; [
git
htop
vim
wireguard-tools
vault
tree-sitter
rnix-lsp
nmap
gcc
fly
postgresql #for the client cli
];
}

23
modules/min-pkgs.nix → modules/minzsh.nix Executable file → Normal file
View File

@@ -1,19 +1,5 @@
{ lib, config, pkgs, ... }:
{ config }:
{
environment.systemPackages = with pkgs; [
git
htop
vim
wireguard-tools
vault
tree-sitter
rnix-lsp
nmap
gcc
fly
postgresql #for the client cli
];
programs = {
zsh = {
enable = true;
@@ -34,11 +20,4 @@
};
};
};
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes
'';
settings.trusted-users = [ "root" ];
};
}

View File

@@ -88,7 +88,7 @@ function _G.CompileRun()
['c'] = 'gcc ' .. file .. ' -o ' .. noext .. ' -Wno-unused-result ' .. ' && ' .. noext .. ' && rm ' .. noext,
['rust'] = 'rustc ' .. file .. ' -o ' .. noext .. ' && ' .. noext .. ' && rm ' .. noext,
['cpp'] = 'g++ -std=c++17 ' .. file .. ' -o ' .. noext .. ' -Wno-unused-result ' .. ' && ' .. noext .. ' && rm ' .. noext,
['haskell'] = 'ghc -dynamic ' .. file .. ' && ' .. noext .. ' && rm ' .. noext .. ' ' .. noext .. '.o ' .. noext .. '.hi',
['haskell'] = 'runhaskell ' .. file,
['sh'] = 'sh ' .. file,
['javascript']= 'node ' .. file,
['typescript']= 'tsc ' .. file .. ' && node ' .. noext .. '.js && rm ' .. noext .. '.js'