feat: working nixos

This commit is contained in:
Philipp Hochkamp 2022-03-25 13:32:05 +01:00
parent fff61d5fd7
commit 7a85f7cec6
7 changed files with 13 additions and 12 deletions

View file

@ -56,8 +56,8 @@
];
};
hmConfig = { pkgs, inputs, config, ...}: {
imports = lib.my.mapModulesRec' ./hm-imports (x: x);
hmConfig = { hm, pkgs, inputs, config, ...}: {
imports = (lib.my.mapModulesRec' ./hm-imports (x: x)) ++ ["${impermanence}/home-manager.nix"];
};
rev = if (lib.hasAttrByPath [ "rev" ] self.sourceInfo) then self.sourceInfo.rev else "Dirty Build";
@ -79,10 +79,10 @@
"<<< Welcome to ${config.system.nixos.label} @ ${rev} - Please leave\\l >>>";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = { inherit inputs lib; };
home-manager.extraSpecialArgs = { inherit inputs ; };
}
(lib.mkIf (config.users.extraUsers.ragon != null) { # import hm stuff if enabled
(lib.mkIf config.ragon.user.enable { # import hm stuff if enabled
home-manager.users.ragon = hmConfig;
})
])

View file

@ -3,7 +3,9 @@
# and in the NixOS manual (accessible by running nixos-help).
{ config, inputs, pkgs, lib, ... }:
let
pubkeys = import ../../data/pubkeys.nix;
in
{
imports =
[
@ -35,7 +37,7 @@
"/persistent/etc/nixos/secrets/initrd/ssh_host_rsa_key"
"/persistent/etc/nixos/secrets/initrd/ssh_host_ed25519_key"
];
authorizedKeys = pkgs.pubkeys.ragon.computers;
authorizedKeys = pubkeys.ragon.computers;
};

View file

@ -8,7 +8,7 @@
boot.initrd.availableKernelModules = [ "r8169" "ahci" "vfio-pci" "xhci_pci" "ehci_pci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
boot.kernelModules = [ "kvm-amd" ];
nix.maxJobs = lib.mkDefault 12;
nix.settings.max-jobs = lib.mkDefault 12;
powerManagement.cpuFreqGovernor = "performance";
services.zfs.autoScrub.enable = true;

View file

@ -2,7 +2,7 @@
with lib;
with lib.my;
let
pubkeys = import ./data/pubkeys.nix {};
pubkeys = import ./data/pubkeys.nix;
in
{
# Set your time zone.
@ -41,8 +41,6 @@ in
};
extraOptions = "experimental-features = nix-command flakes";
nixPath = nixPathInputs ++ [
"nixpkgs-overlays=${config.conf.dir}/overlays"
"conf=${config.conf.dir}"
];
registry = registryInputs // { conf.flake = inputs.self; };
};

View file

@ -13,6 +13,7 @@ in
config = lib.mkIf cfg.enable {
services.unifi = {
enable = true;
openFirewall = true;
};
services.nginx.virtualHosts."${cfg.domainPrefix}.${domain}" = {
forceSSL = true;

View file

@ -17,7 +17,7 @@ in
};
};
config = mkIf cfg.enable {
environment.systemPackages = [ agenix.defaultPackage.${pkgs.system} ];
environment.systemPackages = [ inputs.agenix.defaultPackage.${pkgs.system} ];
# Set passwords
users.users.root.passwordFile = config.age.secrets.rootPasswd.path;
age.identityPaths =

View file

@ -5,7 +5,7 @@ let
username = cfg.username;
extraGroups = cfg.extraGroups;
extraAuthorizedKeys = cfg.extraAuthorizedKeys;
pubkeys = import ../../data/pubkeys.nix {};
pubkeys = import ../../data/pubkeys.nix;
in
{