From 9be7885aa63c865bb57b36f65884e5d336a09abc Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Mon, 8 Jan 2024 22:34:38 +0530 Subject: common: clean up --- common.nix | 49 ++++++++++++++++--------------------------------- 1 file changed, 16 insertions(+), 33 deletions(-) (limited to 'common.nix') diff --git a/common.nix b/common.nix index 8ab8e95..b8b69cd 100644 --- a/common.nix +++ b/common.nix @@ -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" -- cgit v1.2.3