Switching to Framework 16
This commit is contained in:
parent
9b294fd648
commit
365845ea63
9 changed files with 153 additions and 115 deletions
|
|
@ -6,7 +6,10 @@
|
|||
];
|
||||
|
||||
# Networking
|
||||
networking.hostName = "lyes-pc";
|
||||
networking = {
|
||||
hostName = "lyes-pc";
|
||||
hostId = "ed183b8f";
|
||||
};
|
||||
|
||||
# Kernel
|
||||
# boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
|
@ -14,14 +17,8 @@
|
|||
# Boot
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.systemd-boot.configurationLimit = 10;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.extraEntries = {
|
||||
"fedora.conf" = ''
|
||||
title Fedora
|
||||
efi /EFI/fedora/grubx64.efi
|
||||
'';
|
||||
};
|
||||
boot.kernelParams = [ "quiet" ];
|
||||
# boot.loader.efi.canTouchEfiVariables = true;
|
||||
# boot.kernelParams = [ "quiet" ];
|
||||
|
||||
# Reboot Timeout
|
||||
systemd.extraConfig = ''
|
||||
|
|
@ -31,13 +28,6 @@
|
|||
# Swap
|
||||
zramSwap.enable = true;
|
||||
|
||||
# Filesystem
|
||||
fileSystems = {
|
||||
"/".options = [ "compress=zstd:1" ];
|
||||
"/home".options = [ "compress=zstd:1" ];
|
||||
"/nix".options = [ "compress=zstd:1" "noatime" ];
|
||||
};
|
||||
|
||||
# Optimisation
|
||||
|
||||
# nixpkgs.hostPlatform = {
|
||||
|
|
@ -81,28 +71,28 @@
|
|||
# };
|
||||
|
||||
# Disabling failing test
|
||||
nixpkgs.overlays = [ (final: prev: {
|
||||
# orc = prev.orc.overrideAttrs (_: { doCheck = false; });
|
||||
# gsl = prev.gsl.overrideAttrs (_: { doCheck = false; });
|
||||
fprintd = prev.fprintd.overrideAttrs (super: {
|
||||
# doCheck = false;
|
||||
# buildInputs = super.buildInputs or [ ] ++ (with pkgs; [ libpam-wrapper (pkgs.python3.withPackages (python-pkgs: [ python-pkgs.pycairo python-pkgs.dbus-python python-pkgs.python-dbusmock ])) ]);
|
||||
mesonCheckFlags = [
|
||||
# PAM related checks are timing out
|
||||
"--no-suite" "fprintd"
|
||||
];
|
||||
});
|
||||
libsrtp = prev.libsrtp.overrideAttrs (_: {
|
||||
mesonFlags = [
|
||||
"-Dcrypto-library=openssl"
|
||||
"-Dcrypto-library-kdf=disabled"
|
||||
"-Ddoc=disabled"
|
||||
"-Dtests=disabled"
|
||||
];
|
||||
});
|
||||
# # haskellPackages.crypton = pkgs.haskell.lib.overrideCabal prev.crypton (_: { doCheck = false; });
|
||||
# # haskellPackages.cryptonite = pkgs.haskell.lib.overrideCabal prev.cryptonite (_: { doCheck = false; });
|
||||
}) ];
|
||||
# nixpkgs.overlays = [ (final: prev: {
|
||||
# # orc = prev.orc.overrideAttrs (_: { doCheck = false; });
|
||||
# # gsl = prev.gsl.overrideAttrs (_: { doCheck = false; });
|
||||
# fprintd = prev.fprintd.overrideAttrs (super: {
|
||||
# # doCheck = false;
|
||||
# # buildInputs = super.buildInputs or [ ] ++ (with pkgs; [ libpam-wrapper (pkgs.python3.withPackages (python-pkgs: [ python-pkgs.pycairo python-pkgs.dbus-python python-pkgs.python-dbusmock ])) ]);
|
||||
# mesonCheckFlags = [
|
||||
# # PAM related checks are timing out
|
||||
# "--no-suite" "fprintd"
|
||||
# ];
|
||||
# });
|
||||
# libsrtp = prev.libsrtp.overrideAttrs (_: {
|
||||
# mesonFlags = [
|
||||
# "-Dcrypto-library=openssl"
|
||||
# "-Dcrypto-library-kdf=disabled"
|
||||
# "-Ddoc=disabled"
|
||||
# "-Dtests=disabled"
|
||||
# ];
|
||||
# });
|
||||
# # # haskellPackages.crypton = pkgs.haskell.lib.overrideCabal prev.crypton (_: { doCheck = false; });
|
||||
# # # haskellPackages.cryptonite = pkgs.haskell.lib.overrideCabal prev.cryptonite (_: { doCheck = false; });
|
||||
# }) ];
|
||||
|
||||
# nixpkgs.config.packageOverrides = pkgs: {
|
||||
# haskellPackages = pkgs.haskellPackages.override {
|
||||
|
|
|
|||
71
hosts/lyes-pc/disko-config.nix
Normal file
71
hosts/lyes-pc/disko-config.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ disks ? [ "/dev/nvme0n1" ], ... }: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
type = "disk";
|
||||
device = builtins.elemAt disks 0;
|
||||
content = {
|
||||
type = "gpt";
|
||||
partitions = {
|
||||
ESP = {
|
||||
size = "1G";
|
||||
type = "EF00";
|
||||
content = {
|
||||
type = "filesystem";
|
||||
format = "vfat";
|
||||
mountpoint = "/boot";
|
||||
mountOptions = [ "nofail" ];
|
||||
};
|
||||
};
|
||||
zfs = {
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "zfs";
|
||||
pool = "zroot";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
zpool = {
|
||||
zroot = {
|
||||
type = "zpool";
|
||||
rootFsOptions = {
|
||||
mountpoint = "none";
|
||||
compression = "zstd";
|
||||
acltype = "posixacl";
|
||||
xattr = "sa";
|
||||
"com.sun:auto-snapshot" = "false";
|
||||
};
|
||||
options.ashift = "12";
|
||||
datasets = {
|
||||
"root" = {
|
||||
type = "zfs_fs";
|
||||
options = {
|
||||
encryption = "aes-256-gcm";
|
||||
keyformat = "passphrase";
|
||||
keylocation = "prompt";
|
||||
};
|
||||
mountpoint = "/";
|
||||
|
||||
};
|
||||
"root/home" = {
|
||||
type = "zfs_fs";
|
||||
options."com.sun:auto-snapshot" = "true";
|
||||
mountpoint = "/home";
|
||||
};
|
||||
"root/var" = {
|
||||
type = "zfs_fs";
|
||||
mountpoint = "/var";
|
||||
};
|
||||
"root/nix" = {
|
||||
type = "zfs_fs";
|
||||
options.mountpoint = "/nix";
|
||||
mountpoint = "/nix";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -8,47 +8,18 @@
|
|||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" "usbhid" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/2a1aab81-a8df-4781-8946-f00ac1d48db7";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos_root" ];
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-8d74423e-0529-46e3-87b9-b948c568a6c3".device = "/dev/disk/by-uuid/8d74423e-0529-46e3-87b9-b948c568a6c3";
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "/dev/disk/by-uuid/2a1aab81-a8df-4781-8946-f00ac1d48db7";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "/dev/disk/by-uuid/2a1aab81-a8df-4781-8946-f00ac1d48db7";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos_nix" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/94CB-9035";
|
||||
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.wlp9s0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
# high-resolution display
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue