add config for work.nix
This commit is contained in:
38
hosts/work-nix/default.nix
Normal file
38
hosts/work-nix/default.nix
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
hostname,
|
||||
modulesPath,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
system.stateVersion = "25.11";
|
||||
|
||||
imports = builtins.trace "${inputs.mysecrets}" [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
./network.nix
|
||||
./hardware-configuration.nix
|
||||
../../modules/core
|
||||
../../modules/optionnals/hosts/${hostname}.nix
|
||||
];
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
time.timeZone = "Europe/Paris";
|
||||
|
||||
nix = {
|
||||
settings = {
|
||||
## Enable flakes
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
## Users trusted to use flake command
|
||||
trusted-users = [
|
||||
"root"
|
||||
"${username}"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
37
hosts/work-nix/hardware-configuration.nix
Normal file
37
hosts/work-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 =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/mapper/rootfs";
|
||||
fsType = "btrfs";
|
||||
options = [ "discard=async" "compress=zstd" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."rootfs" = {
|
||||
device = "/dev/disk/by-uuid/6b1c7ee5-6489-4c47-bb8b-2e663e493aed";
|
||||
allowDiscards = true;
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/B210-971B";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
11
hosts/work-nix/network.nix
Normal file
11
hosts/work-nix/network.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
hostname,
|
||||
...
|
||||
}:
|
||||
{
|
||||
networking = {
|
||||
hostName = "${hostname}";
|
||||
networkmanager.enable = true;
|
||||
firewall.enable = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user