mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
73 lines
1.8 KiB
Nix
73 lines
1.8 KiB
Nix
# This file (and the global directory) holds config that i use on all hosts
|
|
{ lib, inputs, outputs, pkgs, config, ... }:
|
|
{
|
|
imports = [
|
|
inputs.home-manager.nixosModules.home-manager
|
|
inputs.sops-nix.nixosModules.sops
|
|
]++ (builtins.attrValues outputs.nixosModules);
|
|
|
|
###dotfiles path variable
|
|
options._dotfiles = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "${inputs.self}/home-manager/dotfiles";
|
|
description = "Path to the dotfiles in this repository";
|
|
};
|
|
|
|
###secrets path variable
|
|
options._secrets = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "/run/user/1000/secrets";
|
|
description = "Path to the Secrets runtime";
|
|
};
|
|
|
|
|
|
###secretstore path variable
|
|
options._secretstore = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "${inputs.self}/secrets";
|
|
description = "Path to the Secrets storage";
|
|
};
|
|
|
|
config = {
|
|
system.stateVersion = "23.05";
|
|
|
|
|
|
sops = {
|
|
defaultSopsFile = "${config._secretstore}/host-secrets.yaml";
|
|
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
|
};
|
|
|
|
|
|
home-manager = {
|
|
useUserPackages = true;
|
|
extraSpecialArgs = { inherit inputs outputs; };
|
|
sharedModules = [
|
|
inputs.sops-nix.homeManagerModules.sops
|
|
];
|
|
users.stent = ../home-manager/users/sstent
|
|
};
|
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
programs.fuse.userAllowOther = true;
|
|
security.sudo.wheelNeedsPassword = false;
|
|
|
|
# nixpkgs.overlays = overlays;
|
|
# Enable nix flakes
|
|
nix.package = pkgs.nixFlakes;
|
|
nix.extraOptions = ''
|
|
experimental-features = nix-command flakes
|
|
'';
|
|
nix.nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
|
|
# nix.nixPath = [ "nixpkgs=pkgs.outPath" ];
|
|
|
|
environment.systemPackages = [
|
|
pkgs.git
|
|
pkgs.home-manager
|
|
pkgs.sops
|
|
pkgs.ssh-to-age
|
|
pkgs.age
|
|
];
|
|
|
|
};
|
|
}
|