thelio76: factor out system conf
This commit is contained in:
parent
7fa61945ef
commit
b2cb274c0d
|
@ -0,0 +1 @@
|
||||||
|
result
|
|
@ -1,8 +1,6 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# This file merged the original configuration.nix and hardware-configuration.nix files, refactoring common system config out
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
|
||||||
# and in the NixOS manual (accessible by running `nixos-help`).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
|
|
|
@ -1,37 +1,61 @@
|
||||||
# Edit this configuration file to define what should be installed on
|
# This file merged the original configuration.nix and hardware-configuration.nix files, refactoring common system config out
|
||||||
# your system. Help is available in the configuration.nix(5) man page
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
|
||||||
|
|
||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
# Include the results of the hardware scan.
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
./hardware-configuration.nix
|
|
||||||
../../modules/system76-pc.nix
|
../../modules/system76-pc.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.hostName = "thelio76"; # Define your hostname.
|
networking.hostName = "thelio76"; # Define your hostname.
|
||||||
|
|
||||||
# Some programs need SUID wrappers, can be configured further or are
|
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
||||||
# started in user sessions.
|
boot.initrd.kernelModules = [ ];
|
||||||
# programs.mtr.enable = true;
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
# programs.gnupg.agent = {
|
boot.extraModulePackages = [ ];
|
||||||
# enable = true;
|
|
||||||
# enableSSHSupport = true;
|
|
||||||
# };
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
boot.initrd.luks.devices."luks-b748a776-5e2c-4809-927e-1f4c051b9460".device = "/dev/disk/by-uuid/b748a776-5e2c-4809-927e-1f4c051b9460";
|
||||||
|
boot.initrd.luks.devices."luks-7d758c82-9079-46a6-8bb2-05d5016ed623".device = "/dev/disk/by-uuid/7d758c82-9079-46a6-8bb2-05d5016ed623";
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
environment.etc.crypttab.text = ''
|
||||||
# services.openssh.enable = true;
|
luks-9870176e-53f3-493e-94d8-560994fa8f35 UUID=9870176e-53f3-493e-94d8-560994fa8f35 /luks-9870176e-53f3-493e-94d8-560994fa8f35 nofail
|
||||||
|
'';
|
||||||
|
|
||||||
# Open ports in the firewall.
|
|
||||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
fileSystems = {
|
||||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
"/" = {
|
||||||
# Or disable the firewall altogether.
|
device = "/dev/disk/by-uuid/5b17c208-6c1b-4317-b59c-6596b1857f1f";
|
||||||
# networking.firewall.enable = false;
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/EB52-074B";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/run/media/alex/External" = {
|
||||||
|
device = "/dev/disk/by-uuid/5057a0e6-649f-487f-a17c-11e379f9af19";
|
||||||
|
fsType = "auto";
|
||||||
|
};
|
||||||
|
|
||||||
|
"/home/alex/Documents" = {
|
||||||
|
device = "/run/media/alex/External/Documents";
|
||||||
|
options = [ "bind" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[{ device = "/dev/disk/by-uuid/19de8142-e695-4425-a8cc-27e062204882"; }];
|
||||||
|
|
||||||
|
# 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;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
@ -40,5 +64,4 @@
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "24.05"; # Did you read the comment?
|
system.stateVersion = "24.05"; # Did you read the comment?
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
# 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" "ahci" "usbhid" "usb_storage" "sd_mod" ];
|
|
||||||
boot.initrd.kernelModules = [ ];
|
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
|
||||||
boot.extraModulePackages = [ ];
|
|
||||||
|
|
||||||
fileSystems."/" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/5b17c208-6c1b-4317-b59c-6596b1857f1f";
|
|
||||||
fsType = "ext4";
|
|
||||||
};
|
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-b748a776-5e2c-4809-927e-1f4c051b9460".device = "/dev/disk/by-uuid/b748a776-5e2c-4809-927e-1f4c051b9460";
|
|
||||||
|
|
||||||
fileSystems."/boot" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/EB52-074B";
|
|
||||||
fsType = "vfat";
|
|
||||||
};
|
|
||||||
|
|
||||||
swapDevices =
|
|
||||||
[{ device = "/dev/disk/by-uuid/19de8142-e695-4425-a8cc-27e062204882"; }];
|
|
||||||
|
|
||||||
fileSystems."/run/media/alex/External" =
|
|
||||||
{
|
|
||||||
device = "/dev/disk/by-uuid/5057a0e6-649f-487f-a17c-11e379f9af19";
|
|
||||||
fsType = "auto";
|
|
||||||
};
|
|
||||||
# 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.enp9s0.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
||||||
}
|
|
|
@ -19,19 +19,6 @@
|
||||||
boot.plymouth.enable = true;
|
boot.plymouth.enable = true;
|
||||||
boot.plymouth.theme = "fade-in";
|
boot.plymouth.theme = "fade-in";
|
||||||
|
|
||||||
boot.initrd.luks.devices."luks-7d758c82-9079-46a6-8bb2-05d5016ed623".device = "/dev/disk/by-uuid/7d758c82-9079-46a6-8bb2-05d5016ed623";
|
|
||||||
environment.etc.crypttab.text = ''
|
|
||||||
luks-9870176e-53f3-493e-94d8-560994fa8f35 UUID=9870176e-53f3-493e-94d8-560994fa8f35 /luks-9870176e-53f3-493e-94d8-560994fa8f35 nofail
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
fileSystems."/home/alex/Documents" = {
|
|
||||||
device = "/run/media/alex/External/Documents";
|
|
||||||
options = [ "bind" ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# networking.hostName = "thelio76"; # Define your hostname.
|
|
||||||
|
|
||||||
# Enable networking
|
# Enable networking
|
||||||
networking.networkmanager.enable = true;
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue