mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 11:23:40 +00:00
Add hermes config
This commit is contained in:
17
flake.lock
generated
17
flake.lock
generated
@@ -21,6 +21,22 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1611383797,
|
||||||
|
"narHash": "sha256-FIpG2f4+d9UsXCogBTswoPjD/aWZ3dvV5TZjqlL4gyM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "a0d8383c422f85f37fccee5af74b1cb4b52287d9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1611179033,
|
"lastModified": 1611179033,
|
||||||
@@ -71,6 +87,7 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-master": "nixpkgs-master",
|
"nixpkgs-master": "nixpkgs-master",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||||
|
11
flake.nix
11
flake.nix
@@ -7,9 +7,10 @@
|
|||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-20.09";
|
||||||
nixpkgs-master.url = "github:NixOS/nixpkgs";
|
nixpkgs-master.url = "github:NixOS/nixpkgs";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
|
nixos-hardware.url = github:NixOS/nixos-hardware/master;
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, home-manager, nixpkgs, nixpkgs-master, nixpkgs-unstable }: {
|
outputs = { self, home-manager, nixpkgs, nixpkgs-master, nixpkgs-unstable, nixos-hardware }: {
|
||||||
nixosConfigurations = let
|
nixosConfigurations = let
|
||||||
defaultModules = [
|
defaultModules = [
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
@@ -53,6 +54,14 @@
|
|||||||
./machines/hephaestus/hardware.nix
|
./machines/hephaestus/hardware.nix
|
||||||
] ++ defaultModules;
|
] ++ defaultModules;
|
||||||
};
|
};
|
||||||
|
hermes = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
nixos-hardware.nixosModules.lenovo-thinkpad-t480s
|
||||||
|
./machines/hermes/configuration.nix
|
||||||
|
./machines/hermes/hardware.nix
|
||||||
|
] ++ defaultModules;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
53
machines/hermes/configuration.nix
Normal file
53
machines/hermes/configuration.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ./hardware.nix ];
|
||||||
|
|
||||||
|
# Use the systemd-boot EFI boot loader.
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.loader.efi.canTouchEfiVariables = true;
|
||||||
|
|
||||||
|
networking.hostName = "hermes"; # Define your hostname.
|
||||||
|
|
||||||
|
# The global useDHCP flag is deprecated, therefore explicitly set to false here.
|
||||||
|
# Per-interface useDHCP will be mandatory in the future, so this generated config
|
||||||
|
# replicates the default behaviour.
|
||||||
|
networking.useDHCP = false;
|
||||||
|
networking.interfaces.wlp61s0.useDHCP = true;
|
||||||
|
|
||||||
|
# Select internationalisation properties.
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "us";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Enable the GNOME 3 Desktop Environment.
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.desktopManager.gnome3.enable = true;
|
||||||
|
|
||||||
|
# Enable CUPS to print documents.
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# Enable sound.
|
||||||
|
sound.enable = true;
|
||||||
|
|
||||||
|
# Enable 32bit for steam
|
||||||
|
hardware.pulseaudio.enable = true;
|
||||||
|
hardware.opengl.driSupport32Bit = true;
|
||||||
|
hardware.opengl.extraPackages32 = with pkgs.pkgsi686Linux; [ libva ];
|
||||||
|
hardware.pulseaudio.support32Bit = true;
|
||||||
|
|
||||||
|
virtualisation.docker.enable = true;
|
||||||
|
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Open ports in the firewall.
|
||||||
|
networking.firewall.enable = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
28
machines/hermes/hardware.nix
Normal file
28
machines/hermes/hardware.nix
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{ 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 = [ ];
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/e39690f0-4026-4571-969f-493efa0d1c96";
|
||||||
|
fsType = "ext4";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" =
|
||||||
|
{ device = "/dev/disk/by-uuid/B2C8-621E";
|
||||||
|
fsType = "vfat";
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices =
|
||||||
|
[ { device = "/dev/disk/by-uuid/0933f280-888d-4eff-9274-a515bcccca4e"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
|
||||||
|
}
|
Reference in New Issue
Block a user