diff --git a/flake.nix b/flake.nix index c272ae7..42694a5 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,15 @@ ]; }; + desktop = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/desktop/configuration.nix + inputs.home-manager.nixosModules.default + inputs.stylix.nixosModules.stylix + ]; + }; + server = nixpkgs.lib.nixosSystem { specialArgs = {inherit inputs;}; modules = [ diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix new file mode 100644 index 0000000..420750c --- /dev/null +++ b/hosts/desktop/configuration.nix @@ -0,0 +1,114 @@ +# 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, + inputs, + nixos-hardware, + ... +}: { + imports = [./hardware-configuration.nix]; + hardware.steam-hardware.enable = true; + + networking = { + hostName = "desktop"; + networkmanager.enable = true; + firewall.enable = false; + }; + + nix = { + gc.automatic = true; + settings = { + experimental-features = ["nix-command" "flakes"]; + substituters = ["http://nix.dhilton.xyz/" "https://cache.nixos.org/"]; + trusted-public-keys = ["nix.dhilton.xyz:MOW060dF1A0/UXmPZBue9KMxCO13PHYFwx1X9hcdYZ4="]; + }; + }; + + services = { + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + jack.enable = true; + }; + wivrn = { + enable = true; + defaultRuntime = true; + }; + xserver.enable = true; + displayManager.sddm.enable = true; + desktopManager.plasma6.enable = true; + }; + + stylix = { + enable = true; + autoEnable = true; + polarity = "dark"; + image = ./wallpaper.png; + base16Scheme = "${pkgs.base16-schemes}/share/themes/everforest.yaml"; + opacity = { + terminal = 0.85; + popups = 0.75; + desktop = 0.75; + }; + cursor = { + package = pkgs.adwaita-icon-theme; + name = "Adwaita"; + size = 28; + }; + fonts = { + serif = { + package = pkgs.nerdfonts; + name = "Iosevka NF"; + }; + + sansSerif = { + package = pkgs.nerdfonts; + name = "Iosevka NF"; + }; + + monospace = { + package = pkgs.nerdfonts; + name = "Iosevka NFM"; + }; + }; + }; + + i18n = { + defaultLocale = "en_US.UTF-8"; + 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"; + }; + }; + + hardware = { + graphics.enable32Bit = true; + }; + + programs = { + zsh.enable = true; + wivrn.enable = true; + opencomposite.enable = true; + steam.enable = true; + gamescope.enable = true; + } + + # 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 = "23.11"; # Did you read the comment? +} diff --git a/hosts/desktop/hardware-configuration.nix b/hosts/desktop/hardware-configuration.nix new file mode 100644 index 0000000..0d0787f --- /dev/null +++ b/hosts/desktop/hardware-configuration.nix @@ -0,0 +1 @@ +##TODO diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix new file mode 100644 index 0000000..a15c042 --- /dev/null +++ b/hosts/desktop/home.nix @@ -0,0 +1,9 @@ +{ + config, + pkgs, + inputs, + ... +}: { + imports = [../home/home_common.nix]; + home = {packages = with pkgs; [steam wivrn opencomposite neovim];}; +}