nixos-config/flake.nix
Andreas Schaafsma 252d9b5e2f buncha changes
2024-10-08 07:57:28 +02:00

98 lines
3.2 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
description = "Nixos config flake test";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
};
outputs = { self, nixpkgs, nixos-wsl, nix, ... }@inputs:
let
system =
if builtins ? currentSystem
then builtins.currentSystem
else "x86_64-linux";
pkgs = import nixpkgs { inherit system; config.allowUnfree = true; };
installedPackages = (import ./installed-packages { inherit pkgs; });
in
{
nixosConfigurations.drivebystation-nixos-wsl = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-wsl.nixosModules.default
./systems/drivebystation-nixos-wsl/configuration.nix
{
system.stateVersion = "24.05";
wsl.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = [
]
++ installedPackages.mkPackages.packages;
programs.nix-ld = {
enable = true;
package = pkgs.nix-ld-rs;
};
}
];
specialArgs = { inherit inputs; };
};
nixosConfigurations.th0nkpad-nixos = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
./systems/th0nkpad-nixos/configuration.nix
{
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";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
flatpak
gnome-software
soundwireserver
# thunderbird
];
};
# Open ports in the firewall.
networking.firewall.allowedTCPPorts = [
59010 #SoundWireServer
];
networking.firewall.allowedUDPPorts = [
59010 #SoundWireServer
];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Install firefox.
programs.firefox.enable = true;
# Set up system Packages
environment.systemPackages = with pkgs; [
git
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
# wget
]
++ installedPackages.mkPackages.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
'';
};
}
];
specialArgs = { inherit inputs; };
};
};
}