From 7dffbd9b79912f9a0eb3544da89a6c9d54fccf81 Mon Sep 17 00:00:00 2001 From: KaitoTLex Date: Fri, 27 Sep 2024 08:07:41 -0700 Subject: [PATCH] YAY --- flake.nix | 23 +++++++++ hosts/kuroko/configuration.nix | 65 +++++++++++++++++++++++++ hosts/kuroko/default.nix | 9 ++++ hosts/kuroko/hardware-configuration.nix | 38 +++++++++++++++ users/kaitotlex/home.nix | 2 + 5 files changed, 137 insertions(+) create mode 100644 hosts/kuroko/configuration.nix create mode 100644 hosts/kuroko/default.nix create mode 100644 hosts/kuroko/hardware-configuration.nix diff --git a/flake.nix b/flake.nix index baeb1c3..137b637 100644 --- a/flake.nix +++ b/flake.nix @@ -21,6 +21,28 @@ }@inputs: { formatter."x86_64-linux" = nixpkgs.legacyPackages.x86_64-linux.nixfmt-rfc-style; + nixosConfigurations.kuroko = nixpkgs.lib.nixosSystem{ + specialArgs = { + inherit inputs; + }; + system= "x86_64-linux"; + modules = [ + ./hosts/kuroko + home-manager.nixosModules.home-manager{ + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + backupFileExtension = "backup"; + extraSpecialArgs = { + inherit inputs; + }; + users.kaitotlex = { + imports = [ ./users/kaitotlex ]; + }; + }; + } + ]; + }; nixosConfigurations.shiroko = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; @@ -28,6 +50,7 @@ system = "x86_64-linux"; modules = [ ./hosts/shiroko + home-manager.nixosModules.home-manager { home-manager = { diff --git a/hosts/kuroko/configuration.nix b/hosts/kuroko/configuration.nix new file mode 100644 index 0000000..48f5d3c --- /dev/null +++ b/hosts/kuroko/configuration.nix @@ -0,0 +1,65 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). +{ + config, + pkgs, + ... +}: +{ + imports = [ + # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + virtualisation.waydroid.enable = true; + networking.hostName = "kuroko"; # Define your hostname. + + # Configure network proxy if necessary + # networking.proxy.default = "http://user:password@proxy:port/"; + # networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain"; + security.polkit.enable = true; + # Enable networking + networking.networkmanager.enable = true; + + # Set your time zone. + time.timeZone = "America/Los_Angeles"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + + i18n.extraLocaleSettings = { + LC_ADDRESS = "en_US.UTF-8"; + LC_IDENTIFICATION = "en_US.UTF-8"; + LC_MEASUREMENT = "en_US.UTF-8"; + LC_MONETARY = "en_US.UTF-8"; + LC_NAME = "en_US.UTF-8"; + LC_NUMERIC = "en_US.UTF-8"; + LC_PAPER = "en_US.UTF-8"; + LC_TELEPHONE = "en_US.UTF-8"; + LC_TIME = "en_US.UTF-8"; + }; + + # Some programs need SUID wrappers, can be configured further or are + # started in user sessions. + # programs.mtr.enable = true; + + # List services that you want to enable: + + # Open ports in the firewall. + # networking.firewall.allowedTCPPorts = [ ... ]; + # networking.firewall.allowedUDPPorts = [ ... ]; + # Or disable the firewall altogether. + # networking.firewall.enable = false; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.11"; # Did you read the comment? +} diff --git a/hosts/kuroko/default.nix b/hosts/kuroko/default.nix new file mode 100644 index 0000000..416f647 --- /dev/null +++ b/hosts/kuroko/default.nix @@ -0,0 +1,9 @@ +{ + imports = [ + ./configuration.nix + ../../modules/core + ../../modules/wm + ../../modules/security + ../../modules/audio + ]; +} diff --git a/hosts/kuroko/hardware-configuration.nix b/hosts/kuroko/hardware-configuration.nix new file mode 100644 index 0000000..5bbde06 --- /dev/null +++ b/hosts/kuroko/hardware-configuration.nix @@ -0,0 +1,38 @@ +# 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" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/2abdd540-3e44-4f48-8dc3-ac2eb6d47702"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/92D9-2113"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + 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..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/users/kaitotlex/home.nix b/users/kaitotlex/home.nix index 7188964..87630b0 100644 --- a/users/kaitotlex/home.nix +++ b/users/kaitotlex/home.nix @@ -34,6 +34,8 @@ manga-tui thunderbird + sl + dolphin xfce.thunar