all repos — dotfiles @ 3a22acc86db422b92f00f3b73fd86fcbf8d6395b

my *nix dotfiles

nix/hosts: add denna
Anirudh Oppiliappan x@icyphox.sh
Thu, 06 Jun 2024 22:32:31 +0300
commit

3a22acc86db422b92f00f3b73fd86fcbf8d6395b

parent

3a0d9ecef1acfc03e241e62bd8da99bd3365162f

3 files changed, 119 insertions(+), 0 deletions(-)

jump to
M flake.nixflake.nix

@@ -103,6 +103,19 @@ }

]; }; }; + + nixosConfigurations = { + denna = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ({ config = { nix.registry.nixpkgs.flake = nixpkgs; }; }) + { + imports = [ ./hosts/denna/configuration.nix ]; + _module.args.self = self; + } + ]; + }; + }; }; }
A hosts/denna/configuration.nix

@@ -0,0 +1,60 @@

+{ config, pkgs, ... }: + +{ + imports = + [ + ./hardware-configuration.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.initrd.luks.devices."luks-0ae4be28-55a1-4a0c-8518-c6d53540cb26".device = "/dev/disk/by-uuid/0ae4be28-55a1-4a0c-8518-c6d53540cb26"; + networking.hostName = "denna"; # Define your hostname. + + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Helsinki"; + + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "fi_FI.UTF-8"; + LC_IDENTIFICATION = "fi_FI.UTF-8"; + LC_MEASUREMENT = "fi_FI.UTF-8"; + LC_MONETARY = "fi_FI.UTF-8"; + LC_NAME = "fi_FI.UTF-8"; + LC_NUMERIC = "fi_FI.UTF-8"; + LC_PAPER = "fi_FI.UTF-8"; + LC_TELEPHONE = "fi_FI.UTF-8"; + LC_TIME = "fi_FI.UTF-8"; + }; + + users.users.icy = { + isNormalUser = true; + description = "icy"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; [ ]; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + vim + wget + git + ]; + + services = { + openssh.enable = true; + tailscale.enable = true; + }; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + system.stateVersion = "24.05"; # Did you read the comment? + +} +
A hosts/denna/hardware-configuration.nix

@@ -0,0 +1,46 @@

+# 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 = [ "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-uuid/16a54d44-96ca-4b94-b4b5-66c5964fdbf5"; + fsType = "ext4"; + }; + + boot.initrd.luks.devices."luks-bbed123c-7bda-4d76-9d39-a47b3452ab55".device = "/dev/disk/by-uuid/bbed123c-7bda-4d76-9d39-a47b3452ab55"; + + fileSystems."/boot" = + { + device = "/dev/disk/by-uuid/4246-3555"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = + [{ device = "/dev/disk/by-uuid/f812a558-7d9a-4dbd-a343-2f556156832f"; }]; + + # 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.enp2s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp3s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} +