diff --git a/flake.nix b/flake.nix index 2d96ebc..75186e3 100644 --- a/flake.nix +++ b/flake.nix @@ -1,48 +1,39 @@ { inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; - nix-data = { - url = "github:snowflakelinux/nix-data"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - snowfall-lib = { - url = "github:snowfallorg/lib"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - snowflakeos-modules.url = "github:snowflakelinux/snowflakeos-modules"; - nixos-hardware.url = "github:nixos/nixos-hardware/master"; - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + snowfall-lib.url = "github:snowfallorg/lib"; + snowfall-lib.inputs.nixpkgs.follows = "nixpkgs"; sops-nix.url = "github:Mic92/sops-nix"; sops-nix.inputs.nixpkgs.follows = "nixpkgs"; + lix-module.url = "https://git.lix.systems/lix-project/nixos-module/archive/2.91.1-1.tar.gz"; + lix-module.inputs.nixpkgs.follows = "nixpkgs"; + nix-minecraft.url = "github:Infinidoge/nix-minecraft"; + nix-minecraft.inputs.nixpkgs.follows = "nixpkgs"; }; - outputs = inputs: - inputs.snowfall-lib.mkFlake { - inherit inputs; - src = ./.; + outputs = inputs: inputs.snowfall-lib.mkFlake { + inherit inputs; + src = ./.; - channels-config.allowUnfree = false; - systems.modules.nixos = with inputs; [ - nix-data.nixosModules.nix-data -# snowflakeos-modules.nixosModules.efiboot -# snowflakeos-modules.nixosModules.gnome -# snowflakeos-modules.nixosModules.kernel -# snowflakeos-modules.nixosModules.networking -# snowflakeos-modules.nixosModules.packagemanagers -# snowflakeos-modules.nixosModules.pipewire -# snowflakeos-modules.nixosModules.printing -# snowflakeos-modules.nixosModules.snowflakeos -# snowflakeos-modules.nixosModules.metadata - ]; -# nixosConfigurations.HyperC = nixpkgs.lib.nixosSystem { -# modules = [ - # add your model from this list: https://github.com/NixOS/nixos-hardware/blob/master/flake.nix -# nixos-hardware.nixosModules.microsoft-surface-pro-intel -# ]; -# }; + channels-config.allowUnfree = false; + + nix.gc = { + automatic = true; + options = "--delete-older-than 30d"; }; + nix.optimise.automatic = true; + + # Modules for Host kb-games-01 + systems.hosts.voloxo.modules = with inputs; [ + ]; + + # Modules that get imported to every NixOS system + systems.modules.nixos = with inputs; [ + lix-module.nixosModules.default + ]; + + outputs-builder = channels: { formatter = channels.nixpkgs.nixfmt-rfc-style; }; + + }; } diff --git a/systems/x86_64-linux/voloxo/default.nix b/systems/x86_64-linux/voloxo/default.nix index 1bba8a0..9c5b965 100644 --- a/systems/x86_64-linux/voloxo/default.nix +++ b/systems/x86_64-linux/voloxo/default.nix @@ -1,36 +1,20 @@ -# 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’). - -{ - # Snowfall Lib provides a customized `lib` instance with access to your flake's library - # as well as the libraries available from your flake's inputs. - lib, - # An instance of `pkgs` with your overlays and packages applied is also available. - pkgs, - # You also have access to your flake's inputs. - inputs, - - # Additional metadata is provided by Snowfall Lib. - namespace, # The namespace used for your flake, defaulting to "internal" if not set. - system, # The system architecture for this host (eg. `x86_64-linux`). - target, # The Snowfall Lib target for this system (eg. `x86_64-iso`). - format, # A normalized name for the system target (eg. `iso`). - virtual, # A boolean to determine whether this system is a virtual target using nixos-generators. - systems, # An attribute map of your defined hosts. - - # All other arguments come from the system system. - config, - ... -}: +{ config, lib, pkgs, inputs, ... }: { imports = [ # Include the results of the hardware scan. ./hardware.nix -# ./modules.nix ]; + # Configure Nix + nix.package = pkgs.lix; + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + nixpkgs.config.allowUnfree = true; + nixpkgs.config.permittedInsecurePackages = [ + "electron-27.3.11" + "olm-3.2.16" + ]; + # Bootloader. boot.loader.systemd-boot.enable = true; boot.loader.efi.canTouchEfiVariables = true; @@ -66,8 +50,7 @@ LC_TIME = "de_DE.UTF-8"; }; - # Experimental Features - nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # Nvidia Configuration hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; @@ -116,10 +99,6 @@ #media-session.enable = true; }; - services.onlyoffice = { - enable = true; - }; - # Enable touchpad support (enabled default in most desktopManager). # services.xserver.libinput.enable = true; @@ -134,7 +113,7 @@ thunderbird cheese obs-studio - blender + # blender syncthing keepassxc freetube @@ -181,12 +160,6 @@ services.displayManager.autoLogin.enable = true; services.displayManager.autoLogin.user = "kb"; - # Allow unfree packages - nixpkgs.config.allowUnfree = true; - nixpkgs.config.permittedInsecurePackages = [ - "electron-27.3.11" - "olm-3.2.16" - ]; programs.vim = { enable = true; diff --git a/systems/x86_64-linux/voloxo/hardware.nix b/systems/x86_64-linux/voloxo/hardware.nix index 1020e9e..55f822f 100644 --- a/systems/x86_64-linux/voloxo/hardware.nix +++ b/systems/x86_64-linux/voloxo/hardware.nix @@ -25,7 +25,7 @@ fsType = "vfat"; }; - swapDevices = [ ]; + swapDevices = [{ device = "/swapfile"; size = 8 * 1024; }]; # 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