diff --git a/.sops.yaml b/.sops.yaml index b499ac6..fb48793 100644 --- a/.sops.yaml +++ b/.sops.yaml @@ -1,7 +1,7 @@ keys: - &primary age1j3uuyax673fvl5x4dveupq3dylngnrq0e5uy7fmclsexkfd25vysk646wk creation_rules: - - path_regex: home-manager/secrets.yaml$ + - path_regex: home-manager/users/sweetbread/secrets.yaml$ key_groups: - age: - *primary diff --git a/flake.nix b/flake.nix index 468383c..8496d3b 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,19 @@ ]; }; + Senko = nixpkgs.lib.nixosSystem { + specialArgs = { + pkgs-stable = import nixpkgs-stable { + inherit system; + config.allowUnfree = true; + }; + inherit inputs system; + }; + modules = [ + ./nixos/hosts/Senko/configuration.nix + ]; + }; + popka = nixpkgs.lib.nixosSystem { specialArgs = { pkgs-stable = import nixpkgs-stable { diff --git a/nixos/hosts/Senko/configuration.nix b/nixos/hosts/Senko/configuration.nix new file mode 100644 index 0000000..20d9dc6 --- /dev/null +++ b/nixos/hosts/Senko/configuration.nix @@ -0,0 +1,37 @@ +{ config, pkgs, ...}: { + imports = [ + ./hardware-configuration.nix + ../../packages.nix + ../../modules/bundle.nix + ../../modules/gamemode.nix + ../../modules/users/sweetbread.nix + ]; + + networking.hostName = "Senko"; + + time.timeZone = "Europe/Moscow"; + + i18n.defaultLocale = "ru_RU.UTF-8"; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + + system.stateVersion = "23.05"; + + hardware.graphics = { + enable = true; + enable32Bit = true; + extraPackages = with pkgs; [nvidia-vaapi-driver intel-media-driver]; + extraPackages32 = with pkgs.pkgsi686Linux; [nvidia-vaapi-driver intel-media-driver]; + }; + + services.xserver.videoDrivers = [ "nvidia" ]; + + hardware.nvidia = { + modesetting.enable = true; + powerManagement.enable = true; + powerManagement.finegrained = false; + open = false; + nvidiaSettings = true; + package = config.boot.kernelPackages.nvidiaPackages.stable; + }; +} diff --git a/nixos/hosts/Senko/hardware-configuration.nix b/nixos/hosts/Senko/hardware-configuration.nix new file mode 100644 index 0000000..74e4296 --- /dev/null +++ b/nixos/hosts/Senko/hardware-configuration.nix @@ -0,0 +1,42 @@ +# 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" "nvme" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = { + device = "/dev/disk/by-uuid/48ebb252-9212-49e3-a036-501d549477f5"; + fsType = "ext4"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D706-818C"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + fileSystems."/mnt/D" = { + device = "/dev/disk/by-uuid/3234E61E6467EB30"; + fsType = "ntfs"; + options = ["umask=0022" "gid=100" "uid=1000"]; + }; + + 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.eno1.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +}