summaryrefslogtreecommitdiff
path: root/common.nix
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-01-08 22:34:38 +0530
committersinanmohd <sinan@sinanmohd.com>2024-01-08 22:42:43 +0530
commit9be7885aa63c865bb57b36f65884e5d336a09abc (patch)
tree160654b2161c5cc45ca1fab51b4d1cf702329999 /common.nix
parentd91ce600ab53da44ee5919d038707e2690b1f6a9 (diff)
common: clean up
Diffstat (limited to 'common.nix')
-rw-r--r--common.nix49
1 files changed, 16 insertions, 33 deletions
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"