aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshay <[email protected]>2024-03-28 21:42:26 +0000
committerAkshay <[email protected]>2024-03-28 21:42:26 +0000
commit76e49249f3cec7a66b7c6f1263292d3966e6b7b7 (patch)
tree5eace807de4b4cd6b0313603c0c552260714a364
parentf35cb2c69836eff47541341b26334559ed851414 (diff)
add laurel
-rw-r--r--flake.lock12
-rw-r--r--flake.nix12
-rw-r--r--hosts/laurel/configuration.nix85
-rw-r--r--hosts/laurel/hardware-configuration.nix43
4 files changed, 146 insertions, 6 deletions
diff --git a/flake.lock b/flake.lock
index d46046d..d485422 100644
--- a/flake.lock
+++ b/flake.lock
@@ -66,11 +66,11 @@
66 ] 66 ]
67 }, 67 },
68 "locked": { 68 "locked": {
69 "lastModified": 1701433070, 69 "lastModified": 1710532761,
70 "narHash": "sha256-Gf9JStfENaUQ7YWFz3V7x/srIwr4nlnVteqaAxtwpgM=", 70 "narHash": "sha256-SUXGZNrXX05YA9G6EmgupxhOr3swI1gcxLUeDMUhrEY=",
71 "owner": "nix-community", 71 "owner": "nix-community",
72 "repo": "home-manager", 72 "repo": "home-manager",
73 "rev": "4a8545f5e737a6338814a4676dc8e18c7f43fc57", 73 "rev": "206f457fffdb9a73596a4cb2211a471bd305243d",
74 "type": "github" 74 "type": "github"
75 }, 75 },
76 "original": { 76 "original": {
@@ -96,11 +96,11 @@
96 }, 96 },
97 "nixpkgs": { 97 "nixpkgs": {
98 "locked": { 98 "locked": {
99 "lastModified": 1707205916, 99 "lastModified": 1710534455,
100 "narHash": "sha256-fmRJilYGlB7VCt3XsdYxrA0u8e/K84O5xYucerUY0iM=", 100 "narHash": "sha256-huQT4Xs0y4EeFKn2BTBVYgEwJSv8SDlm82uWgMnCMmI=",
101 "owner": "NixOS", 101 "owner": "NixOS",
102 "repo": "nixpkgs", 102 "repo": "nixpkgs",
103 "rev": "8cc79aa39bbc6eaedaf286ae655b224c71e02907", 103 "rev": "9af9c1c87ed3e3ed271934cb896e0cdd33dae212",
104 "type": "github" 104 "type": "github"
105 }, 105 },
106 "original": { 106 "original": {
diff --git a/flake.nix b/flake.nix
index 7a397a2..ff479f9 100644
--- a/flake.nix
+++ b/flake.nix
@@ -112,6 +112,18 @@
112 ]; 112 ];
113 }; 113 };
114 114
115 laurel = nixpkgs.lib.nixosSystem {
116 system = "x86_64-linux";
117 modules = [
118 ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; })
119 {
120 imports = [ ./hosts/laurel/configuration.nix ];
121 _module.args.self = self;
122 }
123 flaresolverr.nixosModules.default
124 ];
125 };
126
115 }; 127 };
116 }; 128 };
117 129
diff --git a/hosts/laurel/configuration.nix b/hosts/laurel/configuration.nix
new file mode 100644
index 0000000..d0edee3
--- /dev/null
+++ b/hosts/laurel/configuration.nix
@@ -0,0 +1,85 @@
1# Edit this configuration file to define what should be installed on
2# your system. Help is available in the configuration.nix(5) man page, on
3# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
4
5{ config, lib, pkgs, ... }:
6
7{
8 imports =
9 [
10 # Include the results of the hardware scan.
11 ./hardware-configuration.nix
12 ];
13
14 # Use the systemd-boot EFI boot loader.
15 boot.loader.systemd-boot.enable = true;
16 boot.loader.efi.canTouchEfiVariables = true;
17
18 # networking.hostName = "nixos"; # Define your hostname.
19 # Pick only one of the below networking options.
20 # networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
21 # networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
22 networking.hostName = "laurel";
23 networking.firewall.allowedTCPPorts = [ 80 443 ];
24
25 time.timeZone = "Europe/London";
26 i18n.defaultLocale = "en_US.UTF-8";
27
28
29 nixpkgs.config.packageOverrides = pkgs: {
30 vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
31 };
32
33 # Enable sound.
34 sound.enable = true;
35 hardware.pulseaudio.enable = true;
36 hardware.opengl = {
37 enable = true;
38 extraPackages = with pkgs; [
39 intel-media-driver
40 vaapiIntel
41 vaapiVdpau
42 libvdpau-va-gl
43 intel-compute-runtime # OpenCL filter support (hardware tonemapping and subtitle burn-in)
44 ];
45 };
46
47 environment.systemPackages = with pkgs; [
48 vim
49 wget
50 curl
51 ];
52
53 users.users.op = {
54 isNormalUser = true;
55 extraGroups = [ "wheel" "tty" ];
56 home = "/home/op";
57 openssh.authorizedKeys.keys = [
58 "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIG4oThdAy5wQtzCarxDPuzWX6ImYw0c1QfkF0+wZNE6o np@myrtle"
59 ];
60 };
61 services.openssh.enable = true;
62 services.tailscale.enable = true;
63
64 nix.settings.experimental-features = [ "nix-command" "flakes" ];
65
66 # This option defines the first version of NixOS you have installed on this particular machine,
67 # and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
68 #
69 # Most users should NEVER change this value after the initial install, for any reason,
70 # even if you've upgraded your system to a new NixOS release.
71 #
72 # This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
73 # so changing it will NOT upgrade your system.
74 #
75 # This value being lower than the current NixOS release does NOT mean your system is
76 # out of date, out of support, or vulnerable.
77 #
78 # Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
79 # and migrated your data accordingly.
80 #
81 # For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
82 system.stateVersion = "23.11"; # Did you read the comment?
83
84}
85
diff --git a/hosts/laurel/hardware-configuration.nix b/hosts/laurel/hardware-configuration.nix
new file mode 100644
index 0000000..142c4a7
--- /dev/null
+++ b/hosts/laurel/hardware-configuration.nix
@@ -0,0 +1,43 @@
1# Do not modify this file! It was generated by ‘nixos-generate-config’
2# and may be overwritten by future invocations. Please make changes
3# to /etc/nixos/configuration.nix instead.
4{ config, lib, pkgs, modulesPath, ... }:
5
6{
7 imports =
8 [
9 (modulesPath + "/installer/scan/not-detected.nix")
10 ];
11
12 boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
13 boot.initrd.kernelModules = [ ];
14 boot.kernelModules = [ "kvm-intel" ];
15 boot.extraModulePackages = [ ];
16
17 fileSystems."/" =
18 {
19 device = "/dev/disk/by-uuid/0a4289c5-753f-410a-aca0-0d70b448dffc";
20 fsType = "ext4";
21 };
22
23 fileSystems."/boot" =
24 {
25 device = "/dev/disk/by-uuid/FDC2-EFD1";
26 fsType = "vfat";
27 };
28
29 swapDevices =
30 [{ device = "/dev/disk/by-uuid/22b596ba-93ef-4a41-8e4c-292e5baa36e8"; }];
31
32 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking
33 # (the default) this is the recommended approach. When using systemd-networkd it's
34 # still possible to use this option, but it's recommended to use it in conjunction
35 # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
36 networking.useDHCP = lib.mkDefault true;
37 # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true;
38 # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
39
40 nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
41 hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
42}
43