copilot output
This commit is contained in:
parent
d845e14b37
commit
1983f9b0b5
14 changed files with 149 additions and 0 deletions
61
copilot/flake.nix
Normal file
61
copilot/flake.nix
Normal file
|
|
@ -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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
11
copilot/home/gamer/home.nix
Normal file
11
copilot/home/gamer/home.nix
Normal file
|
|
@ -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
|
||||||
|
];
|
||||||
|
}
|
||||||
11
copilot/home/office/home.nix
Normal file
11
copilot/home/office/home.nix
Normal file
|
|
@ -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
|
||||||
|
];
|
||||||
|
}
|
||||||
3
copilot/hosts/gaming-amd/configuration.nix
Normal file
3
copilot/hosts/gaming-amd/configuration.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
}
|
||||||
3
copilot/hosts/laptop-office/configuration.nix
Normal file
3
copilot/hosts/laptop-office/configuration.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
}
|
||||||
4
copilot/modules/common/base.nix
Normal file
4
copilot/modules/common/base.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
environment.systemPackages = with pkgs; [ vim git ];
|
||||||
|
services.openssh.enable = true;
|
||||||
|
}
|
||||||
4
copilot/modules/common/locale.nix
Normal file
4
copilot/modules/common/locale.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
i18n.defaultLocale = "pl_PL.UTF-8";
|
||||||
|
time.timeZone = "Europe/Warsaw";
|
||||||
|
}
|
||||||
3
copilot/modules/common/networking.nix
Normal file
3
copilot/modules/common/networking.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
}
|
||||||
10
copilot/modules/common/users.nix
Normal file
10
copilot/modules/common/users.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
{ ... }: {
|
||||||
|
users.users.gamer = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
|
};
|
||||||
|
users.users.office = {
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
16
copilot/modules/desktop/gaming.nix
Normal file
16
copilot/modules/desktop/gaming.nix
Normal file
|
|
@ -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
|
||||||
|
];
|
||||||
|
}
|
||||||
8
copilot/modules/desktop/office.nix
Normal file
8
copilot/modules/desktop/office.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.desktopManager.plasma6.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
libreoffice thunderbird okular
|
||||||
|
];
|
||||||
|
}
|
||||||
4
copilot/modules/services/bluetooth.nix
Normal file
4
copilot/modules/services/bluetooth.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
{ ... }: {
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
}
|
||||||
3
copilot/modules/services/printing.nix
Normal file
3
copilot/modules/services/printing.nix
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{ ... }: {
|
||||||
|
services.printing.enable = true;
|
||||||
|
}
|
||||||
8
copilot/modules/services/steam.nix
Normal file
8
copilot/modules/services/steam.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
{ pkgs, ... }: {
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
};
|
||||||
|
environment.systemPackages = with pkgs; [ steam-run ];
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue