diff --git a/configuration.nix b/configuration.nix index 6b45e35..c97ecf3 100644 --- a/configuration.nix +++ b/configuration.nix @@ -8,11 +8,7 @@ environment.etc.nixpkgs.source = inputs.nixpkgs; imports = [ # Include the results of the hardware scan. - ./hardware-configuration.nix - # - ./sunshine.nix - #./home-files.nix - #./flatpak.nix + /home/insert/Documents/nixos/hardware-configuration.nix ]; hardware.opengl = { @@ -30,7 +26,6 @@ boot.loader.systemd-boot.configurationLimit = 15; boot.loader.efi.canTouchEfiVariables = true; - networking.hostName = "insertpclinux"; # Define your hostname. # Enable networking networking.networkmanager.enable = true; @@ -55,7 +50,6 @@ # Enable the X11 windowing system. services.xserver.enable = true; - services.xserver.videoDrivers = ["nvidia"]; # Enable the KDE Plasma Desktop Environment. services.xserver.displayManager.sddm.enable = false; services.xserver.desktopManager.plasma5.enable = false; @@ -70,41 +64,7 @@ ''; }; - #nixpkgs.overlays = [ (self: super: (let - # patched_pkgs = import inputs.nixpkgs_patched { - # inherit (self) system; - # config.allowUnfree = true; - # }; - # in { - # linuxPackages = patched_pkgs.linuxPackages; - # })) ]; - #boot.kernelPackages = pkgs.linuxPackages; - - hardware.nvidia = { - - # Modesetting is needed most of the time - modesetting.enable = true; - - # Enable power management (do not disable this unless you have a reason to). - # Likely to cause problems on laptops and with screen tearing if disabled. - powerManagement.enable = true; - - # Use the open source version of the kernel module ("nouveau") - # Note that this offers much lower performance and does not - # support all the latest Nvidia GPU features. - # You most likely don't want this. - # Only available on driver 515.43.04+ - open = false; - - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - - package = config.boot.kernelPackages.nvidiaPackages.production; - - }; + # Configure keymap in X11 services.xserver = { layout = "us"; @@ -144,18 +104,12 @@ options = "--delete-older-than 10d"; }; #programs.zsh.enable = true; - virtualisation.libvirtd.enable = true; - programs.virt-manager.enable = true; services.flatpak.enable = true; users.users.insert = { isNormalUser = true; description = "insert"; extraGroups = [ "networkmanager" "wheel" "input" "docker" "libvirtd" ]; #shell = pkgs.zsh; - packages = with pkgs; [ - firefox - kate - ]; }; programs.waybar = { @@ -203,11 +157,7 @@ monocraft ]; - security.pki.certificateFiles = [ - /home/insert/Documents/nextcloud/nextcloudinternal.pem - /home/insert/Documents/personal-vaultwarden/cert.pem - ]; - + # List packages installed in system profile. To search, run: # $ nix search wget programs.nix-ld.enable = true; diff --git a/flake.nix b/flake.nix index e045c15..031a0ec 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,22 @@ outputs = { nixpkgs, flatpaks, agenix, home-manager, ... } @ inputs: { nixosConfigurations.insertpclinux = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + flatpaks.nixosModules.default + ./configuration.nix + ./special/insertpclinux.nix + agenix.nixosModules.default + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.insert = import /home/insert/Documents/nixos/home.nix; + } + ]; + }; + + nixosConfigurations.insertlaptop = nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs; }; modules = [ flatpaks.nixosModules.default diff --git a/home.nix b/home.nix index 7a76d2f..7b7d145 100644 --- a/home.nix +++ b/home.nix @@ -9,6 +9,8 @@ pkgs.git pkgs.fluffychat pkgs.cinny-desktop + pkgs.firefox + pkgs.kate pkgs.libsForQt5.lightly pkgs.pfetch pkgs.git-credential-oauth diff --git a/special/insertpclinux.nix b/special/insertpclinux.nix new file mode 100644 index 0000000..33ac75b --- /dev/null +++ b/special/insertpclinux.nix @@ -0,0 +1,48 @@ +{ inputs, config, lib, pkgs, ... }: +{ + environment.etc.nixpkgs.source = inputs.nixpkgs; + imports = [ ./sunshine.nix ]; + networking.hostName = "insertpclinux"; + services.xserver.videoDrivers = ["nvidia"]; + #nixpkgs.overlays = [ (self: super: (let + # patched_pkgs = import inputs.nixpkgs_patched { + # inherit (self) system; + # config.allowUnfree = true; + # }; + # in { + # linuxPackages = patched_pkgs.linuxPackages; + # })) ]; + #boot.kernelPackages = pkgs.linuxPackages; + + hardware.nvidia = { + + # Modesetting is needed most of the time + modesetting.enable = true; + + # Enable power management (do not disable this unless you have a reason to). + # Likely to cause problems on laptops and with screen tearing if disabled. + powerManagement.enable = true; + + # Use the open source version of the kernel module ("nouveau") + # Note that this offers much lower performance and does not + # support all the latest Nvidia GPU features. + # You most likely don't want this. + # Only available on driver 515.43.04+ + open = false; + + # Enable the Nvidia settings menu, + # accessible via `nvidia-settings`. + nvidiaSettings = true; + + # Optionally, you may need to select the appropriate driver version for your specific GPU. + + package = config.boot.kernelPackages.nvidiaPackages.production; + + }; + virtualisation.libvirtd.enable = true; + programs.virt-manager.enable = true; + security.pki.certificateFiles = [ + /home/insert/Documents/nextcloud/nextcloudinternal.pem + /home/insert/Documents/personal-vaultwarden/cert.pem + ]; +} \ No newline at end of file diff --git a/sunshine.nix b/special/sunshine.nix similarity index 100% rename from sunshine.nix rename to special/sunshine.nix