pc
This commit is contained in:
parent
cb12504749
commit
1c66bf38e9
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
{pkgs, ...}: {
|
||||
boot = {
|
||||
initrd.kernelModules = ["amdgpu"];
|
||||
|
||||
|
@ -7,9 +7,15 @@
|
|||
};
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true; # Mesa
|
||||
driSupport = true; # Vulkan
|
||||
enable = true;
|
||||
|
||||
## radv: an open-source Vulkan driver from freedesktop
|
||||
driSupport = true;
|
||||
driSupport32Bit = true;
|
||||
|
||||
## amdvlk: an open-source Vulkan driver from AMD
|
||||
extraPackages = [pkgs.amdvlk];
|
||||
extraPackages32 = [pkgs.driversi686Linux.amdvlk];
|
||||
};
|
||||
|
||||
services.xserver.videoDrivers = ["amdgpu"];
|
||||
|
|
7
common/locales/en-keymap.nix
Normal file
7
common/locales/en-keymap.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
console.keyMap = "en";
|
||||
|
||||
services.xserver.xkb = {
|
||||
layout = "en";
|
||||
};
|
||||
}
|
12
flake.lock
12
flake.lock
|
@ -23,11 +23,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1712439257,
|
||||
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
|
||||
"lastModified": 1712608508,
|
||||
"narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
|
||||
"rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -39,11 +39,11 @@
|
|||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1712439257,
|
||||
"narHash": "sha256-aSpiNepFOMk9932HOax0XwNxbA38GOUVOiXfUVPOrck=",
|
||||
"lastModified": 1712608508,
|
||||
"narHash": "sha256-vMZ5603yU0wxgyQeHJryOI+O61yrX2AHwY6LOFyV1gM=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "ff0dbd94265ac470dda06a657d5fe49de93b4599",
|
||||
"rev": "4cba8b53da471aea2ab2b0c1f30a81e7c451f4b6",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
@ -65,6 +65,13 @@
|
|||
];
|
||||
};
|
||||
|
||||
pc = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/pc/configuration.nix
|
||||
];
|
||||
};
|
||||
|
||||
stuff = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
|
|
141
hosts/pc/configuration.nix
Normal file
141
hosts/pc/configuration.nix
Normal file
|
@ -0,0 +1,141 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./hardware-configuration.nix
|
||||
../../common/default.nix
|
||||
|
||||
../../common/locales/en.nix
|
||||
#../../common/locales/fr-keymap.nix
|
||||
../../common/hardware/intelcpu.nix
|
||||
#../../common/hardware/amdgpu.nix
|
||||
|
||||
../../common/de/plasma6.nix
|
||||
../../common/de/hyprland.nix
|
||||
|
||||
#../../common/packages/syncthing.nix
|
||||
#../../common/packages/adguardhome.nix
|
||||
|
||||
# If you want to use modules your own flake exports (from modules/nixos):
|
||||
# outputs.nixosModules.example
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
];
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
# boot.kernelModules = [ "fuse" "kvm-intel" "coretemp" ];
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "pc";
|
||||
|
||||
firewall.enable = true;
|
||||
firewall.allowedTCPPorts = [8080 12345 13378];
|
||||
firewall.allowedUDPPorts = [8080];
|
||||
};
|
||||
|
||||
users.users.user = {
|
||||
isNormalUser = true;
|
||||
description = "User";
|
||||
extraGroups = ["networkmanager" "wheel" "dialout" "syncthing"];
|
||||
initialPassword = "correcthorsebatterystaple";
|
||||
openssh.authorizedKeys.keys = [
|
||||
# TODO: Add your SSH public key(s) here, if you plan on using SSH to connect
|
||||
];
|
||||
};
|
||||
|
||||
# services.btrfs.autoScrub = {
|
||||
# enable = true;
|
||||
# interval = "weekly";
|
||||
# fileSystems = ["/" "/data"];
|
||||
# };
|
||||
|
||||
# virtualisation.docker.enable = true;
|
||||
# services.flatpak.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
programs.mtr.enable = true;
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
|
||||
programs.steam = {
|
||||
enable = true;
|
||||
remotePlay.openFirewall = false; # Open ports in the firewall for Steam Remote Play
|
||||
dedicatedServer.openFirewall = false; # Open ports in the firewall for Source Dedicated Server
|
||||
};
|
||||
|
||||
# services.syncthing = {
|
||||
# dataDir = lib.mkForce "/home/user";
|
||||
# configDir = lib.mkForce "/data/sync/configuration/";
|
||||
# };
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden
|
||||
libreoffice-fresh
|
||||
nextdns
|
||||
android-tools
|
||||
gocryptfs
|
||||
#endless-sky
|
||||
#gnucash
|
||||
obs-studio
|
||||
kdenlive
|
||||
rustc
|
||||
cargo
|
||||
nodejs
|
||||
rpi-imager
|
||||
wireshark
|
||||
appimage-run
|
||||
#ssb-patchwork
|
||||
simplex-chat-desktop
|
||||
#android-studio
|
||||
#swig
|
||||
picard
|
||||
kleopatra
|
||||
qbittorrent
|
||||
tor-browser
|
||||
protonvpn-gui
|
||||
# radicle-cli
|
||||
# opensnitch-ui
|
||||
yarn
|
||||
nodePackages.node-gyp
|
||||
nodePackages.node-pre-gyp
|
||||
superTuxKart
|
||||
openssl
|
||||
|
||||
# qgis
|
||||
helix
|
||||
holehe
|
||||
smartmontools
|
||||
cheat
|
||||
lazygit
|
||||
ripgrep
|
||||
jq
|
||||
yq
|
||||
neofetch
|
||||
tldr
|
||||
bat
|
||||
dust
|
||||
powertop
|
||||
fzf
|
||||
atuin
|
||||
zellij
|
||||
eza
|
||||
lapce
|
||||
gotty
|
||||
gping
|
||||
yazi
|
||||
|
||||
tildefriends
|
||||
];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.05";
|
||||
}
|
0
hosts/pc/hardware-configuration.nix
Normal file
0
hosts/pc/hardware-configuration.nix
Normal file
68
hosts/pc/home.nix
Normal file
68
hosts/pc/home.nix
Normal file
|
@ -0,0 +1,68 @@
|
|||
# This is your home-manager configuration file
|
||||
# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
|
||||
{
|
||||
inputs,
|
||||
outputs,
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
# You can import other home-manager modules here
|
||||
imports = [
|
||||
# If you want to use modules your own flake exports (from modules/home-manager):
|
||||
# outputs.homeManagerModules.example
|
||||
|
||||
# Or modules exported from other flakes (such as nix-colors):
|
||||
# inputs.nix-colors.homeManagerModules.default
|
||||
|
||||
# You can also split up your configuration and import pieces of it here:
|
||||
# ./nvim.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
# You can add overlays here
|
||||
overlays = [
|
||||
# Add overlays your own flake exports (from overlays and pkgs dir):
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.modifications
|
||||
outputs.overlays.unstable-packages
|
||||
|
||||
# You can also add overlays exported from other flakes:
|
||||
# neovim-nightly-overlay.overlays.default
|
||||
|
||||
# Or define it inline, for example:
|
||||
# (final: prev: {
|
||||
# hi = final.hello.overrideAttrs (oldAttrs: {
|
||||
# patches = [ ./change-hello-to-hi.patch ];
|
||||
# });
|
||||
# })
|
||||
];
|
||||
# Configure your nixpkgs instance
|
||||
config = {
|
||||
# Disable if you don't want unfree packages
|
||||
allowUnfree = true;
|
||||
# Workaround for https://github.com/nix-community/home-manager/issues/2942
|
||||
allowUnfreePredicate = _: true;
|
||||
};
|
||||
};
|
||||
|
||||
home = {
|
||||
username = "user";
|
||||
homeDirectory = "/home/user";
|
||||
};
|
||||
|
||||
# Add stuff for your user as you see fit:
|
||||
# programs.neovim.enable = true;
|
||||
# home.packages = with pkgs; [ steam ];
|
||||
|
||||
# Enable home-manager and git
|
||||
programs.home-manager.enable = true;
|
||||
programs.git.enable = true;
|
||||
|
||||
# Nicely reload system units when changing configs
|
||||
systemd.user.startServices = "sd-switch";
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
home.stateVersion = "23.05";
|
||||
}
|
Loading…
Reference in a new issue