mirror of
https://github.com/ItsDrike/nixdots
synced 2024-11-14 16:17:17 +00:00
Compare commits
No commits in common. "4d3a6b64999ed779212c06795ba510879887a532" and "ccf9ececa26e492223fb19bb9c7f757c1c31163f" have entirely different histories.
4d3a6b6499
...
ccf9ececa2
70
hosts/vbox_nix/default.nix
Normal file
70
hosts/vbox_nix/default.nix
Normal file
|
@ -0,0 +1,70 @@
|
|||
{ lib, pkgs, ... }:
|
||||
{
|
||||
imports = [ ./hardware-configuration.nix ];
|
||||
|
||||
nix.settings = {
|
||||
max-jobs = 6;
|
||||
cores = 6;
|
||||
};
|
||||
|
||||
security.sudo.package = pkgs.sudo.override { withInsults = true; };
|
||||
security.polkit.enable = true;
|
||||
services = {
|
||||
udisks2.enable = true;
|
||||
};
|
||||
|
||||
# NixOS release from which this machine was first installed.
|
||||
# (for stateful data, like file locations and db versions)
|
||||
# Leave this alone!
|
||||
system.stateVersion = lib.mkForce "23.11";
|
||||
|
||||
myOptions = {
|
||||
system = {
|
||||
hostname = "vboxnix";
|
||||
username = "itsdrike";
|
||||
|
||||
impermanence = {
|
||||
root.enable = false;
|
||||
autoWipeBtrfs.enable = false;
|
||||
};
|
||||
|
||||
boot = {
|
||||
secure-boot.enable = false;
|
||||
tmpOnTmpfs = false;
|
||||
};
|
||||
};
|
||||
|
||||
device = {
|
||||
roles = {
|
||||
type = "desktop";
|
||||
virtual-machine = true;
|
||||
};
|
||||
cpu.type = "amd";
|
||||
hasTPM = false;
|
||||
};
|
||||
|
||||
security = {
|
||||
auditd = {
|
||||
enable = true;
|
||||
autoPrune.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
workstation = {
|
||||
printing.enable = false;
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
enable = true;
|
||||
stateVersion = "23.11";
|
||||
git = {
|
||||
userName = "ItsDrike";
|
||||
userEmail = "itsdrike@protonmail.com";
|
||||
signing = {
|
||||
enable = true;
|
||||
key = "FA2745890B7048C0";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
37
hosts/vbox_nix/hardware-configuration.nix
Normal file
37
hosts/vbox_nix/hardware-configuration.nix
Normal file
|
@ -0,0 +1,37 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "ohci_pci" "ehci_pci" "ahci" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/86d578b1-fd70-4f72-918d-44d921fe8a73";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=@" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/7636-1642";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp0s3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
virtualisation.virtualbox.guest.enable = true;
|
||||
}
|
||||
|
|
@ -1,3 +1,6 @@
|
|||
# This sets up power management using auto-cpufreq,
|
||||
# alongside with upower and power-profiles-daemon.
|
||||
# Together, this provides a complete alternative to TLP
|
||||
{ pkgs, lib, config, ...}: let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.modules) mkForce;
|
||||
|
@ -24,7 +27,7 @@ in {
|
|||
in {
|
||||
description = "Power Monitoring Service";
|
||||
environment.PATH = mkForce "/run/wrappers/bin:${makeBinPath dependencies}";
|
||||
script = builtins.readFile ./power_monitor.sh;
|
||||
script = builtins.readFile ./scripts/power_monitor.sh;
|
||||
|
||||
serviceConfig = {
|
||||
Type = "simple";
|
||||
|
|
Loading…
Reference in a new issue