Restructure
- Restructure - Add sops+age
This commit is contained in:
@@ -0,0 +1 @@
|
||||
System config that is required for any host.
|
||||
@@ -0,0 +1,10 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
imports = [
|
||||
./disko.nix
|
||||
./locale.nix
|
||||
./nix.nix
|
||||
./packages.nix
|
||||
./sops.nix
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
{
|
||||
config,
|
||||
disko,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.disko.cfg;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
inputs.disko.nixosModules.disko
|
||||
];
|
||||
|
||||
options.disko.cfg = {
|
||||
mainDevice = mkOption {
|
||||
type = types.str;
|
||||
description = "Main disk name";
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
disko.devices.disk.ssd = {
|
||||
device = cfg.mainDevice;
|
||||
type = "disk";
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
name = "ESP";
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
};
|
||||
};
|
||||
root = {
|
||||
name = "root";
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [
|
||||
"-f"
|
||||
"-L"
|
||||
"root"
|
||||
];
|
||||
mountpoint = "/";
|
||||
mountOptions = [
|
||||
"compress=zstd"
|
||||
"noatime"
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
time.timeZone = "Europe/Moscow";
|
||||
|
||||
i18n = {
|
||||
defaultLocale = "en_US.UTF-8";
|
||||
extraLocaleSettings = {
|
||||
LC_TIME = "en_GB.UTF-8";
|
||||
};
|
||||
};
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "us,ru";
|
||||
options = "eurosign:e,caps:escape";
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "daily";
|
||||
options = "--delete-older-than +5";
|
||||
};
|
||||
nix.settings.auto-optimise-store = true;
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{ congif, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
git
|
||||
neovim
|
||||
tmux
|
||||
];
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{ config, inputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
];
|
||||
|
||||
sops = {
|
||||
defaultSopsFile = "/etc/sops/secrets.yaml";
|
||||
age.keyFile = "/etc/age/key.txt";
|
||||
validateSopsFiles = false;
|
||||
secrets = {
|
||||
benq-password = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user