feat: working nixos
This commit is contained in:
parent
fff61d5fd7
commit
7a85f7cec6
7 changed files with 13 additions and 12 deletions
|
|
@ -56,8 +56,8 @@
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
hmConfig = { pkgs, inputs, config, ...}: {
|
hmConfig = { hm, pkgs, inputs, config, ...}: {
|
||||||
imports = lib.my.mapModulesRec' ./hm-imports (x: x);
|
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";
|
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 >>>";
|
"<<< Welcome to ${config.system.nixos.label} @ ${rev} - Please leave\\l >>>";
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.useUserPackages = 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;
|
home-manager.users.ragon = hmConfig;
|
||||||
})
|
})
|
||||||
])
|
])
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||||
|
|
||||||
{ config, inputs, pkgs, lib, ... }:
|
{ config, inputs, pkgs, lib, ... }:
|
||||||
|
let
|
||||||
|
pubkeys = import ../../data/pubkeys.nix;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
|
|
@ -35,7 +37,7 @@
|
||||||
"/persistent/etc/nixos/secrets/initrd/ssh_host_rsa_key"
|
"/persistent/etc/nixos/secrets/initrd/ssh_host_rsa_key"
|
||||||
"/persistent/etc/nixos/secrets/initrd/ssh_host_ed25519_key"
|
"/persistent/etc/nixos/secrets/initrd/ssh_host_ed25519_key"
|
||||||
];
|
];
|
||||||
authorizedKeys = pkgs.pubkeys.ragon.computers;
|
authorizedKeys = pubkeys.ragon.computers;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "r8169" "ahci" "vfio-pci" "xhci_pci" "ehci_pci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "r8169" "ahci" "vfio-pci" "xhci_pci" "ehci_pci" "nvme" "usbhid" "sd_mod" "sr_mod" ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
nix.maxJobs = lib.mkDefault 12;
|
nix.settings.max-jobs = lib.mkDefault 12;
|
||||||
powerManagement.cpuFreqGovernor = "performance";
|
powerManagement.cpuFreqGovernor = "performance";
|
||||||
|
|
||||||
services.zfs.autoScrub.enable = true;
|
services.zfs.autoScrub.enable = true;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
with lib;
|
with lib;
|
||||||
with lib.my;
|
with lib.my;
|
||||||
let
|
let
|
||||||
pubkeys = import ./data/pubkeys.nix {};
|
pubkeys = import ./data/pubkeys.nix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
|
|
@ -41,8 +41,6 @@ in
|
||||||
};
|
};
|
||||||
extraOptions = "experimental-features = nix-command flakes";
|
extraOptions = "experimental-features = nix-command flakes";
|
||||||
nixPath = nixPathInputs ++ [
|
nixPath = nixPathInputs ++ [
|
||||||
"nixpkgs-overlays=${config.conf.dir}/overlays"
|
|
||||||
"conf=${config.conf.dir}"
|
|
||||||
];
|
];
|
||||||
registry = registryInputs // { conf.flake = inputs.self; };
|
registry = registryInputs // { conf.flake = inputs.self; };
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
services.unifi = {
|
services.unifi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
services.nginx.virtualHosts."${cfg.domainPrefix}.${domain}" = {
|
services.nginx.virtualHosts."${cfg.domainPrefix}.${domain}" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ agenix.defaultPackage.${pkgs.system} ];
|
environment.systemPackages = [ inputs.agenix.defaultPackage.${pkgs.system} ];
|
||||||
# Set passwords
|
# Set passwords
|
||||||
users.users.root.passwordFile = config.age.secrets.rootPasswd.path;
|
users.users.root.passwordFile = config.age.secrets.rootPasswd.path;
|
||||||
age.identityPaths =
|
age.identityPaths =
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ let
|
||||||
username = cfg.username;
|
username = cfg.username;
|
||||||
extraGroups = cfg.extraGroups;
|
extraGroups = cfg.extraGroups;
|
||||||
extraAuthorizedKeys = cfg.extraAuthorizedKeys;
|
extraAuthorizedKeys = cfg.extraAuthorizedKeys;
|
||||||
pubkeys = import ../../data/pubkeys.nix {};
|
pubkeys = import ../../data/pubkeys.nix;
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue