Compare commits

..

2 commits

Author SHA1 Message Date
Gabe Venberg 4127c28ed6 added powersaving role. 2024-06-03 16:38:50 -05:00
Gabe Venberg 3cddd823c1 added secrets to both vms. 2024-06-03 16:38:29 -05:00
7 changed files with 50 additions and 13 deletions

17
configs/nixos/secrets.nix Normal file
View file

@ -0,0 +1,17 @@
{
inputs,
config,
lib,
pkgs,
...
}: let
secretsDirectory = builtins.toString inputs.nix-secrets;
in {
imports = [
inputs.sops-nix.nixosModules.sops
];
sops = {
defaultSopsFile = "${secretsDirectory}/common.yaml";
validateSopsFiles = false;
};
}

View file

@ -15,7 +15,7 @@ inputs.nixpkgs.lib.nixosSystem {
../../configs/nixos/common.nix
../../configs/nixos/printing.nix
../../configs/nixos/sound.nix
../../configs/nixos/networking.nix
../../configs/nixos/interactive-networking.nix
../../configs/nixos/i3
({
config,
@ -46,8 +46,10 @@ inputs.nixpkgs.lib.nixosSystem {
programs.zsh.enable = true;
environment.shells = with pkgs; [zsh];
users.mutableUsers=false;
# Define a user account. Don't forget to set a password with passwd.
users.users.${config.host.user} = {
hashedPasswordFile=config.sops.secrets.gv-password.path;
isNormalUser = true;
description = "Gabe Venberg";
shell = pkgs.zsh;

View file

@ -0,0 +1,14 @@
{
inputs,
config,
lib,
pkgs,
...
}: {
imports=[
../../configs/nixos/secrets.nix
];
sops.secrets.gv-password = {
neededForUsers = true;
};
}

View file

@ -17,7 +17,7 @@ inputs.nixpkgs.lib.nixosSystem {
../../roles/nixos/graphical-vm.nix
../../configs/nixos/printing.nix
../../configs/nixos/sound.nix
../../configs/nixos/networking.nix
../../configs/nixos/interactive-networking.nix
../../configs/nixos/nfsv2.nix
../../configs/nixos/i3
../../configs/nixos/common.nix

View file

@ -4,17 +4,11 @@
lib,
pkgs,
...
}: let
secretsDirectory = builtins.toString inputs.nix-secrets;
in {
imports = [
inputs.sops-nix.nixosModules.sops
}: {
imports=[
../../configs/nixos/secrets.nix
];
sops = {
defaultSopsFile = "${secretsDirectory}/common.yaml";
validateSopsFiles = false;
secrets.gv-password={
neededForUsers=true;
};
sops.secrets.gv-password = {
neededForUsers = true;
};
}

View file

@ -0,0 +1,10 @@
{
config,
pkgs,
lib,
...
}: {
powerManagement.powertop.enable = true;
powerManagement.enable = true;
powerManaagement.cpuFreqGovernor = "ondemand";
}