diff options
-rw-r--r-- | common.nix | 49 | ||||
-rw-r--r-- | modules/dev.nix | 1 | ||||
-rw-r--r-- | modules/userdata.nix | 5 |
3 files changed, 22 insertions, 33 deletions
@@ -1,4 +1,4 @@ -{ config, pkgs, ... }: +{ config, pkgs, lib, ... }: let host = config.networking.hostName; @@ -15,7 +15,13 @@ in ./modules/network-interfaces-scripted.nix ]; - # boot + sops = { + defaultSopsFile = ./hosts/${host}/secrets.yaml; + age.keyFile = "/var/secrets/sops.key"; + }; + system.stateVersion = "23.11"; + nix.settings.experimental-features = [ "flakes" "nix-command" ]; + boot = { tmp.useTmpfs = true; loader = { @@ -25,9 +31,15 @@ in }; }; - # system + time.timeZone = "Asia/Kolkata"; environment = { - binsh = "${pkgs.dash}/bin/dash"; + binsh = "${lib.getExe pkgs.dash}"; + systemPackages = with pkgs; [ + dash + luajit + neovim + sops + ]; variables = { EDITOR = "nvim"; VISUAL = "nvim"; @@ -36,36 +48,7 @@ in ls = "ls --color=auto --group-directories-first"; grep = "grep --color=auto"; }; - systemPackages = with pkgs; [ - dash - luajit - unzip - bc - file - git - htop - curl - neovim - age - sops - ]; - }; - system.stateVersion = "23.11"; - time.timeZone = "Asia/Kolkata"; - - # nix - nix.settings.experimental-features = [ - "flakes" - "nix-command" - ]; - - # sops - sops = { - defaultSopsFile = ./hosts/${host}/secrets.yaml; - age.keyFile = "/var/secrets/sops.key"; }; - - # programs programs.bash.promptInit = '' if [ "$UID" -ne 0 ]; then PROMPT_COLOR="1;32m" diff --git a/modules/dev.nix b/modules/dev.nix index 7ce7845..398c6ba 100644 --- a/modules/dev.nix +++ b/modules/dev.nix @@ -3,6 +3,7 @@ { environment.systemPackages = with pkgs; [ shellcheck + git gnumake gcc nodePackages.bash-language-server diff --git a/modules/userdata.nix b/modules/userdata.nix index 9cd8139..136d807 100644 --- a/modules/userdata.nix +++ b/modules/userdata.nix @@ -5,6 +5,11 @@ let cfg = config.userdata; defaultPackages = with pkgs; [ + bc + unzip + htop + curl + file dig mtr nnn |