mirror of
https://github.com/sstent/vmimages.git
synced 2026-01-25 14:41:44 +00:00
Working Config With Libs!
This commit is contained in:
59
hosts/common.nix
Normal file
59
hosts/common.nix
Normal file
@@ -0,0 +1,59 @@
|
||||
# This file (and the global directory) holds config that i use on all hosts
|
||||
{ lib, inputs, outputs, pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
./sops.nix
|
||||
]++ (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 = "22.11";
|
||||
|
||||
home-manager = {
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = { inherit inputs outputs; };
|
||||
sharedModules = [
|
||||
inputs.sops-nix.homeManagerModules.sops
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs = {
|
||||
#overlays = builtins.attrValues outputs.overlays;
|
||||
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
|
||||
'';
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user