mirror of
https://github.com/Ahwxorg/nixos-config.git
synced 2026-03-19 15:50:30 +01:00
Compare commits
6 commits
273d6e9207
...
3ada42a65c
| Author | SHA1 | Date | |
|---|---|---|---|
| 3ada42a65c | |||
| 96c6e26a22 | |||
| b7d9320a6e | |||
| 64e80b7f72 | |||
| 0fc96115c9 | |||
| b874c45a2e |
7 changed files with 144 additions and 3 deletions
2
flake.lock
generated
2
flake.lock
generated
|
|
@ -913,7 +913,7 @@
|
||||||
"oisd": {
|
"oisd": {
|
||||||
"flake": false,
|
"flake": false,
|
||||||
"locked": {
|
"locked": {
|
||||||
"narHash": "sha256-fgfgm5GHDqq/RIRF8M1j6H3OZ/r1DVPgwMvwikdauNI=",
|
"narHash": "sha256-Yro3cUgQ8VxmcsQwbvdYdGAxsfZDGEl3tyr7ILhzK7s=",
|
||||||
"type": "file",
|
"type": "file",
|
||||||
"url": "https://big.oisd.nl/domainswild"
|
"url": "https://big.oisd.nl/domainswild"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
10
flake.nix
10
flake.nix
|
|
@ -173,6 +173,16 @@
|
||||||
inherit self inputs username;
|
inherit self inputs username;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
april = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
|
modules = [
|
||||||
|
(import ./hosts/april)
|
||||||
|
];
|
||||||
|
specialArgs = {
|
||||||
|
host = "april";
|
||||||
|
inherit self inputs username;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
58
hosts/april/default.nix
Normal file
58
hosts/april/default.nix
Normal file
|
|
@ -0,0 +1,58 @@
|
||||||
|
{
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./hardware-configuration.nix
|
||||||
|
./../../modules/core
|
||||||
|
./../../modules/services/tailscale.nix
|
||||||
|
./../../modules/services/mpd.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
liv = {
|
||||||
|
laptop.enable = true;
|
||||||
|
gui.enable = true;
|
||||||
|
desktop.enable = false;
|
||||||
|
creative.enable = false;
|
||||||
|
amdgpu.enable = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
vnstat.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "april";
|
||||||
|
|
||||||
|
powerManagement = {
|
||||||
|
enable = true;
|
||||||
|
powertop.enable = true;
|
||||||
|
cpuFreqGovernor = lib.mkDefault "ondemand";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot = {
|
||||||
|
kernelParams = [
|
||||||
|
"mem_sleep_default=deep"
|
||||||
|
];
|
||||||
|
kernelModules = [ "acpi_call" ];
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
systemd-boot.configurationLimit = 10;
|
||||||
|
};
|
||||||
|
extraModulePackages =
|
||||||
|
with config.boot.kernelPackages;
|
||||||
|
[
|
||||||
|
acpi_call
|
||||||
|
cpupower
|
||||||
|
]
|
||||||
|
++ [ pkgs.cpupower-gui ];
|
||||||
|
};
|
||||||
|
|
||||||
|
time.timeZone = "Europe/Amsterdam";
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
}
|
||||||
64
hosts/april/hardware-configuration.nix
Normal file
64
hosts/april/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
# 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 = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"xhci_pci"
|
||||||
|
"nvme"
|
||||||
|
"usb_storage"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ "kvm-intel" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-c4154cca-9246-40e7-9f92-f67cf412f718".device =
|
||||||
|
"/dev/disk/by-uuid/c4154cca-9246-40e7-9f92-f67cf412f718";
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/28283b70-d1ab-4c1e-9e9e-4efdcb051553";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
boot.initrd.luks.devices."luks-577b813a-bbe2-479c-b439-b91964e9b36c".device =
|
||||||
|
"/dev/disk/by-uuid/577b813a-bbe2-479c-b439-b91964e9b36c";
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/44F1-737B";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0077"
|
||||||
|
"dmask=0077"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/41da47c8-b3ba-4773-941e-a35dfd73aaef"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# 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.enp0s31f6.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|
@ -24,6 +24,15 @@
|
||||||
position = "0,0";
|
position = "0,0";
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
else if (host == "april") then
|
||||||
|
[
|
||||||
|
{
|
||||||
|
criteria = "eDP-1";
|
||||||
|
scale = 1.0;
|
||||||
|
status = "enable";
|
||||||
|
position = "0,0";
|
||||||
|
}
|
||||||
|
]
|
||||||
else if (host == "imilia") then
|
else if (host == "imilia") then
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ in
|
||||||
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
"https://raw.githubusercontent.com/DNSCrypt/dnscrypt-resolvers/master/v3/public-resolvers.md"
|
||||||
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
"https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md"
|
||||||
];
|
];
|
||||||
minisign_key = "sha256-fgfgm5GHDqq/RIRF8M1j6H3OZ/r1DVPgwMvwikdauNI="; # See https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
minisign_key = "sha256-Yro3cUgQ8VxmcsQwbvdYdGAxsfZDGEl3tyr7ILhzK7s="; # See https://github.com/DNSCrypt/dnscrypt-resolvers/blob/master/v3/public-resolvers.md
|
||||||
cache_file = "/var/lib/dnscrypt/public-resolvers.md";
|
cache_file = "/var/lib/dnscrypt/public-resolvers.md";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,6 @@ in
|
||||||
criticalPowerAction = "Hibernate";
|
criticalPowerAction = "Hibernate";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
powerManagement.powertop.enable = false; # somehow figure out how to let this not apply to specific USB devices, as they will auto suspend and that is annoying.
|
# powerManagement.powertop.enable = false; # somehow figure out how to let this not apply to specific USB devices, as they will auto suspend and that is annoying.
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue