From 1983f9b0b521fe51a15d32f0c8afb7de167405c1 Mon Sep 17 00:00:00 2001 From: Sasza Stanczew Date: Tue, 10 Feb 2026 13:41:47 +0100 Subject: [PATCH] copilot output --- copilot/flake.nix | 61 +++++++++++++++++++ copilot/home/gamer/home.nix | 11 ++++ copilot/home/office/home.nix | 11 ++++ copilot/hosts/gaming-amd/configuration.nix | 3 + copilot/hosts/laptop-office/configuration.nix | 3 + copilot/modules/common/base.nix | 4 ++ copilot/modules/common/locale.nix | 4 ++ copilot/modules/common/networking.nix | 3 + copilot/modules/common/users.nix | 10 +++ copilot/modules/desktop/gaming.nix | 16 +++++ copilot/modules/desktop/office.nix | 8 +++ copilot/modules/services/bluetooth.nix | 4 ++ copilot/modules/services/printing.nix | 3 + copilot/modules/services/steam.nix | 8 +++ 14 files changed, 149 insertions(+) create mode 100644 copilot/flake.nix create mode 100644 copilot/home/gamer/home.nix create mode 100644 copilot/home/office/home.nix create mode 100644 copilot/hosts/gaming-amd/configuration.nix create mode 100644 copilot/hosts/laptop-office/configuration.nix create mode 100644 copilot/modules/common/base.nix create mode 100644 copilot/modules/common/locale.nix create mode 100644 copilot/modules/common/networking.nix create mode 100644 copilot/modules/common/users.nix create mode 100644 copilot/modules/desktop/gaming.nix create mode 100644 copilot/modules/desktop/office.nix create mode 100644 copilot/modules/services/bluetooth.nix create mode 100644 copilot/modules/services/printing.nix create mode 100644 copilot/modules/services/steam.nix diff --git a/copilot/flake.nix b/copilot/flake.nix new file mode 100644 index 0000000..3e76f9c --- /dev/null +++ b/copilot/flake.nix @@ -0,0 +1,61 @@ + { + description = "Modular NixOS config for gaming PC + office laptop"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = { self, nixpkgs, home-manager, ... }: + let + system = "x86_64-linux"; + lib = nixpkgs.lib; + in { + nixosConfigurations = { + gaming-amd = lib.nixosSystem { + inherit system; + modules = [ + ./hosts/gaming-amd/configuration.nix + ./modules/common/base.nix + ./modules/common/networking.nix + ./modules/common/users.nix + ./modules/common/locale.nix + ./modules/desktop/gaming.nix + ./modules/services.steam.nix + ]; + }; + + laptop-office = lib.nixosSystem { + inherit system; + modules = [ + ./hosts/laptop-office/configuration.nix + ./modules/common/base.nix + ./modules/common/networking.nix + ./modules/common/users.nix + ./modules/common/locale.nix + ./modules/desktop/office.nix + ./modules/services/printing.nix + ./modules/services/bluetooth.nix + ]; + }; + }; + + homeConfigurations = { + gamer = home-manager.lib.homeManagerConfiguration { + inherit system; + modules = [ + ./home/gamer/home.nix + ]; + }; + + office = home-manager.lib.homeManagerConfiguration { + inherit system; + modules = [ + ./home/office/home.nix + ]; + }; + }; + }; +} + diff --git a/copilot/home/gamer/home.nix b/copilot/home/gamer/home.nix new file mode 100644 index 0000000..86ab23f --- /dev/null +++ b/copilot/home/gamer/home.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: { + home.username = "gamer"; + home.homeDirectory = "/home/gamer"; + + programs.git.enable = true; + programs.zsh.enable = true; + + home.packages = with pkgs; [ + discord obs-studio protonup-qt + ]; +} diff --git a/copilot/home/office/home.nix b/copilot/home/office/home.nix new file mode 100644 index 0000000..cce0152 --- /dev/null +++ b/copilot/home/office/home.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ... }: { + home.username = "office"; + home.homeDirectory = "/home/office"; + + programs.git.enable = true; + programs.zsh.enable = true; + + home.packages = with pkgs; [ + libreoffice nextcloud-client zoom + ]; +} diff --git a/copilot/hosts/gaming-amd/configuration.nix b/copilot/hosts/gaming-amd/configuration.nix new file mode 100644 index 0000000..0089df0 --- /dev/null +++ b/copilot/hosts/gaming-amd/configuration.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ]; +} diff --git a/copilot/hosts/laptop-office/configuration.nix b/copilot/hosts/laptop-office/configuration.nix new file mode 100644 index 0000000..0089df0 --- /dev/null +++ b/copilot/hosts/laptop-office/configuration.nix @@ -0,0 +1,3 @@ +{ config, pkgs, ... }: { + imports = [ ./hardware-configuration.nix ]; +} diff --git a/copilot/modules/common/base.nix b/copilot/modules/common/base.nix new file mode 100644 index 0000000..0a6ec1e --- /dev/null +++ b/copilot/modules/common/base.nix @@ -0,0 +1,4 @@ +{ pkgs, ... }: { + environment.systemPackages = with pkgs; [ vim git ]; + services.openssh.enable = true; +} diff --git a/copilot/modules/common/locale.nix b/copilot/modules/common/locale.nix new file mode 100644 index 0000000..1abc0e2 --- /dev/null +++ b/copilot/modules/common/locale.nix @@ -0,0 +1,4 @@ +{ ... }: { + i18n.defaultLocale = "pl_PL.UTF-8"; + time.timeZone = "Europe/Warsaw"; +} diff --git a/copilot/modules/common/networking.nix b/copilot/modules/common/networking.nix new file mode 100644 index 0000000..45771c5 --- /dev/null +++ b/copilot/modules/common/networking.nix @@ -0,0 +1,3 @@ +{ ... }: { + networking.networkmanager.enable = true; +} diff --git a/copilot/modules/common/users.nix b/copilot/modules/common/users.nix new file mode 100644 index 0000000..cf66a99 --- /dev/null +++ b/copilot/modules/common/users.nix @@ -0,0 +1,10 @@ +{ ... }: { + users.users.gamer = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + }; + users.users.office = { + isNormalUser = true; + extraGroups = [ "wheel" "networkmanager" ]; + }; +} diff --git a/copilot/modules/desktop/gaming.nix b/copilot/modules/desktop/gaming.nix new file mode 100644 index 0000000..8850f99 --- /dev/null +++ b/copilot/modules/desktop/gaming.nix @@ -0,0 +1,16 @@ +{ config, pkgs, ... }: { + services.xserver.enable = true; + services.xserver.desktopManager.gnome.enable = true; + + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + }; + + hardware.cpu.amd.updateMicrocode = true; + + environment.systemPackages = with pkgs; [ + mangohud goverlay lutris vkBasalt + ]; +} diff --git a/copilot/modules/desktop/office.nix b/copilot/modules/desktop/office.nix new file mode 100644 index 0000000..21f7ea5 --- /dev/null +++ b/copilot/modules/desktop/office.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + services.xserver.enable = true; + services.xserver.desktopManager.plasma6.enable = true; + + environment.systemPackages = with pkgs; [ + libreoffice thunderbird okular + ]; +} diff --git a/copilot/modules/services/bluetooth.nix b/copilot/modules/services/bluetooth.nix new file mode 100644 index 0000000..f3d21b1 --- /dev/null +++ b/copilot/modules/services/bluetooth.nix @@ -0,0 +1,4 @@ +{ ... }: { + hardware.bluetooth.enable = true; + services.blueman.enable = true; +} diff --git a/copilot/modules/services/printing.nix b/copilot/modules/services/printing.nix new file mode 100644 index 0000000..35017e4 --- /dev/null +++ b/copilot/modules/services/printing.nix @@ -0,0 +1,3 @@ +{ ... }: { + services.printing.enable = true; +} diff --git a/copilot/modules/services/steam.nix b/copilot/modules/services/steam.nix new file mode 100644 index 0000000..68ef5bd --- /dev/null +++ b/copilot/modules/services/steam.nix @@ -0,0 +1,8 @@ +{ pkgs, ... }: { + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + }; + environment.systemPackages = with pkgs; [ steam-run ]; +}