89 lines
2.9 KiB
Nix
89 lines
2.9 KiB
Nix
{
|
||
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; };
|
||
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
|
||
# thunderbird
|
||
];
|
||
};
|
||
|
||
# Install firefox.
|
||
programs.firefox.enable = true;
|
||
|
||
# Allow unfree packages
|
||
nixpkgs.config.allowUnfree = 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; };
|
||
};
|
||
};
|
||
}
|