143 lines
4.3 KiB
Nix
143 lines
4.3 KiB
Nix
# nixosConfigurations.th0nkpad-nixos = nixpkgs.lib.nixosSystem {
|
||
|
||
{
|
||
# 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.
|
||
# The namespace used for your flake, defaulting to "internal" if not set.
|
||
namespace,
|
||
# The system architecture for this host (eg. `x86_64-linux`).
|
||
system,
|
||
# The Snowfall Lib target for this system (eg. `x86_64-iso`).
|
||
target,
|
||
# A normalized name for the system target (eg. `iso`).
|
||
format,
|
||
# A boolean to determine whether this system is a virtual target using nixos-generators.
|
||
virtual,
|
||
# An attribute map of your defined hosts.
|
||
systems,
|
||
# All other arguments come from the system system.
|
||
config
|
||
, ...
|
||
}:
|
||
let
|
||
inherit (lib.my-namespace) enabled;
|
||
inherit pkgs;
|
||
installedPackages = lib.my-namespace.mkPackages pkgs;
|
||
in
|
||
{
|
||
# inherit system;
|
||
imports = [
|
||
./configuration.nix
|
||
./steam.nix
|
||
./video.nix
|
||
];
|
||
config = {
|
||
system.stateVersion = "24.05";
|
||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||
users.users.andreas = {
|
||
isNormalUser = true;
|
||
description = "Andreas Schaafsma";
|
||
extraGroups = [ "networkmanager" "wheel" ] ;
|
||
packages = with pkgs; [
|
||
# Packages from inputs
|
||
inputs.game-of-life.packages.x86_64-linux.default
|
||
inputs.zen-browser.packages.x86_64-linux.default
|
||
inputs.nixos-cosmic
|
||
|
||
flatpak
|
||
gnome-software
|
||
gnomeExtensions.pop-shell
|
||
soundwireserver
|
||
vscode
|
||
spotify
|
||
appimage-run
|
||
minecraft
|
||
trilium-desktop
|
||
terraform
|
||
# thunderbird
|
||
];
|
||
};
|
||
|
||
my-namespace.cosmic-desktop.enable = false;
|
||
# lib.my-namespace.home.stream-tools.enable = true;
|
||
|
||
# Open ports in the firewall.
|
||
networking.firewall.allowedTCPPorts = [
|
||
59010 #SoundWireServer
|
||
3389 #RDP
|
||
];
|
||
networking.firewall.allowedUDPPorts = [
|
||
59010 #SoundWireServer
|
||
3389 #RDP
|
||
];
|
||
# Or disable the firewall altogether.
|
||
# networking.firewall.enable = false;
|
||
|
||
|
||
# Install firefox.
|
||
programs.firefox.enable = true;
|
||
nixpkgs.config.allowBroken = true;
|
||
# Set up system Packages
|
||
environment.systemPackages = with pkgs; [
|
||
git
|
||
wine
|
||
bottles
|
||
gparted
|
||
ntfs3g
|
||
ntfsprogs
|
||
my-namespace.udev-steelseries
|
||
my-namespace.hello
|
||
# stuff I installed to try to get gamescope to work to no avail Gamescope is just broken it seems.
|
||
# pkgs.mesa
|
||
# pkgs.vulkan-loader
|
||
# pkgs.vulkan-validation-layers
|
||
# pkgs.vulkan-extension-layer
|
||
# pkgs.vulkan-tools
|
||
# pkgs.libva
|
||
# pkgs.libva-utils
|
||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||
# wget
|
||
]
|
||
++ installedPackages.packages;
|
||
programs.nix-ld = {
|
||
enable = true;
|
||
package = pkgs.nix-ld-rs;
|
||
};
|
||
services.flatpak.enable = true;
|
||
systemd.services.flatpak-repo = {
|
||
wantedBy = [ "multi-user.target" ];
|
||
path = [ pkgs.flatpak ];
|
||
script = ''
|
||
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
|
||
'';
|
||
};
|
||
|
||
services.openssh = {
|
||
enable = true;
|
||
settings.PasswordAuthentication = true;
|
||
# settings = {
|
||
# # passwordAuthentication = true;
|
||
# };
|
||
};
|
||
|
||
|
||
# services.xrdp.enable = true;
|
||
# services.xrdp.defaultWindowManager = "${pkgs.gnome-session}/bin/gnome-session";
|
||
# services.xrdp.openFirewall = true;
|
||
|
||
|
||
# Disable the GNOME3/GDM auto-suspend feature that cannot be disabled in GUI!
|
||
# If no user is logged in, the machine will power down after 20 minutes.
|
||
systemd.targets.sleep.enable = true;
|
||
systemd.targets.suspend.enable = true;
|
||
systemd.targets.hibernate.enable = true;
|
||
systemd.targets.hybrid-sleep.enable = true;
|
||
};
|
||
} |