Compare commits
67 Commits
68843be871
...
feature/ad
| Author | SHA1 | Date | |
|---|---|---|---|
|
35319f58de
|
|||
| cfa9aa2e14 | |||
|
98617c4099
|
|||
| 61cebd469b | |||
|
86729827e8
|
|||
| 60bf6173c7 | |||
|
90df3e5ed9
|
|||
|
22df1df1d7
|
|||
|
f5d629d5f5
|
|||
| 9885867cc2 | |||
|
2cb495848f
|
|||
| 7e84ba21dc | |||
|
54dc51eec4
|
|||
| 3c3dd262ae | |||
|
cd683bfa94
|
|||
| 10a4b462b3 | |||
|
5111de5278
|
|||
|
3a6b6091d6
|
|||
|
382cb2b096
|
|||
|
05245ea56b
|
|||
| 3ee5cfac97 | |||
|
2e1c2524fc
|
|||
|
b87d881258
|
|||
|
8fa948b0be
|
|||
|
859d524f4a
|
|||
|
989f676ce7
|
|||
|
55bb23cf07
|
|||
|
894c113607
|
|||
|
724db8a252
|
|||
|
d0eb6f614d
|
|||
|
c419f052a3
|
|||
|
1f7e9f6eef
|
|||
|
656dfe4b93
|
|||
|
d913c6cc02
|
|||
|
a535f00e54
|
|||
|
0509b11c00
|
|||
|
0fccd2d54b
|
|||
|
3a95182d3a
|
|||
|
c125409336
|
|||
|
f3678a13c5
|
|||
|
520eadd6fb
|
|||
|
01f6137eed
|
|||
|
edd73ddf53
|
|||
|
31c4834a2d
|
|||
|
6d437c290f
|
|||
|
2cdd02b024
|
|||
|
7f57f89a77
|
|||
|
9cde74486a
|
|||
|
a045ca7d94
|
|||
|
3c18029b95
|
|||
|
d06ab6d54b
|
|||
|
6a9ba7082b
|
|||
|
64dee7a59f
|
|||
|
b4c3ddd300
|
|||
|
4360fbed68
|
|||
|
f8964775af
|
|||
|
a696c2ff1d
|
|||
|
a537daccbf
|
|||
|
581c5dea90
|
|||
|
e84503f755
|
|||
|
f139e7b72f
|
|||
|
512f21bd3e
|
|||
| 030f3b8e39 | |||
| e8b8a1c84f | |||
| 3c737ac07f | |||
| 5c6639f429 | |||
| 9e167f82d3 |
26
README.md
26
README.md
@@ -1,10 +1,10 @@
|
|||||||
# 0x29a nixos config
|
# 0x29a nixos config
|
||||||
|
|
||||||
My personal nixos configuration files.
|
My personal nixos configuration files for different environments.
|
||||||
|
|
||||||
## basic system installation
|
## basic system installation
|
||||||
|
|
||||||
- The installations in this repository are always luks encrypted
|
- The installations presented in this repository are always luks encrypted
|
||||||
- For simplicity I'm using device labels rather than uuids
|
- For simplicity I'm using device labels rather than uuids
|
||||||
|
|
||||||
1. the partitioning layout should look somewhat like this after the installation
|
1. the partitioning layout should look somewhat like this after the installation
|
||||||
@@ -97,10 +97,12 @@ cd /mnt
|
|||||||
sudo nixos-install
|
sudo nixos-install
|
||||||
```
|
```
|
||||||
|
|
||||||
## how to deploy the config
|
## how to deploy the inital config
|
||||||
|
|
||||||
|
- Don't forget to install the bootloader, if you changed it since `nixos-install`
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ sudo nixos-rebuild switch --flake .#host_name
|
$ sudo nixos-rebuild --install-bootloader switch --flake .#host_name
|
||||||
```
|
```
|
||||||
|
|
||||||
## how to upgrade the system
|
## how to upgrade the system
|
||||||
@@ -109,8 +111,24 @@ $ sudo nixos-rebuild switch --flake .#host_name
|
|||||||
$ cd /path/to/repo
|
$ cd /path/to/repo
|
||||||
$ sudo nix flake update
|
$ sudo nix flake update
|
||||||
$ sudo nixos-rebuild switch --flake .#host_name
|
$ sudo nixos-rebuild switch --flake .#host_name
|
||||||
|
$ sudo nix-collect-garbage
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## how to use nix-helper
|
||||||
|
|
||||||
|
The tool nix-helper is installed by this configuration. It simplifies administrating nixos and adds more output to the rebuild command. It also features a diff after a successful build. The command uses the `NH_FLAKE` environment variable to be able to run from whatever directory.
|
||||||
|
|
||||||
|
Basic commands with a set `NH_FLAKE` variable are:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
$ nh os switch
|
||||||
|
$ nh os build
|
||||||
|
$ nh os test
|
||||||
|
$ nh clean all --keep 5
|
||||||
|
```
|
||||||
|
|
||||||
|
There is also the option to interface with home-manager by using `nh home switch`but this isn't necessary since home-manager is imported as a module in this config.
|
||||||
|
|
||||||
## author
|
## author
|
||||||
|
|
||||||
aaron <aaron@0x29a.ch>
|
aaron <aaron@0x29a.ch>
|
||||||
|
|||||||
77
flake.lock
generated
77
flake.lock
generated
@@ -1,5 +1,26 @@
|
|||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-parts": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs-lib": [
|
||||||
|
"nixvim",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1765835352,
|
||||||
|
"narHash": "sha256-XswHlK/Qtjasvhd1nOa1e8MgZ8GS//jBoTqWtrS1Giw=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"rev": "a34fae9c08a15ad73f295041fec82323541400a9",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "flake-parts",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"home-manager": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -7,11 +28,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765337252,
|
"lastModified": 1768434960,
|
||||||
"narHash": "sha256-HuWQp8fM25fyWflbuunQkQI62Hg0ecJxWD52FAgmxqY=",
|
"narHash": "sha256-cJbFn17oyg6qAraLr+NVeNJrXsrzJdrudkzI4H2iTcg=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "13cc1efd78b943b98c08d74c9060a5b59bf86921",
|
"rev": "b4d88c9ac42ae1a745283f6547701da43b6e9f9b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -22,11 +43,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765186076,
|
"lastModified": 1768305791,
|
||||||
"narHash": "sha256-hM20uyap1a0M9d344I692r+ik4gTMyj60cQWO+hAYP8=",
|
"narHash": "sha256-AIdl6WAn9aymeaH/NvBj0H9qM+XuAuYbGMZaP0zcXAQ=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "addf7cf5f383a3101ecfba091b98d0a1263dc9b8",
|
"rev": "1412caf7bf9e660f2f962917c14b1ea1c3bc695e",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -36,6 +57,28 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixvim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-parts": "flake-parts",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1768486009,
|
||||||
|
"narHash": "sha256-I7ymDe6UQooHy9I9wrafKCCDnRbox/EMWAgJgpm7fGs=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"rev": "03a638205b5cb04ba9c2ed6c604e137b15f07fa1",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "nixvim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"noctalia": {
|
"noctalia": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -43,11 +86,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1765420707,
|
"lastModified": 1768504094,
|
||||||
"narHash": "sha256-lX0WxWosQbm3DrZhscVTiLLpJcoZvaQaZoP+eNt75wE=",
|
"narHash": "sha256-4BRzwk88XyTeM8IzfQm31AHxGu2YpAorLMG2dpsA6xs=",
|
||||||
"owner": "noctalia-dev",
|
"owner": "noctalia-dev",
|
||||||
"repo": "noctalia-shell",
|
"repo": "noctalia-shell",
|
||||||
"rev": "298b2f5c794d4641cde21cf20422224bf8a60f99",
|
"rev": "c083b33dca0f8fc9c9647ee5cc88281a4bb8c69d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@@ -60,8 +103,24 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
|
"nixvim": "nixvim",
|
||||||
"noctalia": "noctalia"
|
"noctalia": "noctalia"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|||||||
78
flake.nix
78
flake.nix
@@ -1,63 +1,55 @@
|
|||||||
{
|
{
|
||||||
description = "0x29a ecosystem NixOS flake";
|
description = "0x29a NixOS flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# the main nix package collection
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
nixpkgs = {
|
|
||||||
url = "github:nixos/nixpkgs/nixos-unstable";
|
|
||||||
};
|
|
||||||
# home manager for dotfiles
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
# noctalia shell
|
|
||||||
noctalia = {
|
noctalia = {
|
||||||
url = "github:noctalia-dev/noctalia-shell";
|
url = "github:noctalia-dev/noctalia-shell";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
nixvim = {
|
||||||
|
url = "github:nix-community/nixvim";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = inputs@{self, nixpkgs, home-manager, ... }: let
|
outputs = { self, nixpkgs, home-manager, nixvim, ... }@inputs: {
|
||||||
lib = nixpkgs.lib;
|
|
||||||
system = "x86_64-linux";
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
|
||||||
in {
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# default config
|
|
||||||
default = nixpkgs.lib.nixosSystem {
|
|
||||||
inherit system;
|
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
modules = [
|
|
||||||
# import host specific configs
|
|
||||||
./hosts/default/configuration.nix
|
|
||||||
# import host specific hardware configs
|
|
||||||
./hosts/default/hardware-configuration.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# laptop neon
|
default = nixpkgs.lib.nixosSystem {
|
||||||
neon = nixpkgs.lib.nixosSystem {
|
system = "x86_64-linux";
|
||||||
inherit system;
|
specialArgs = { inherit inputs; };
|
||||||
specialArgs = {
|
|
||||||
inherit inputs;
|
|
||||||
};
|
|
||||||
modules = [
|
modules = [
|
||||||
# import host specific configs
|
./hosts/default/hardware-configuration.nix
|
||||||
./hosts/neon/configuration.nix
|
./hosts/default/configuration.nix
|
||||||
# import host specific hardware configs
|
|
||||||
./hosts/neon/hardware-configuration.nix
|
|
||||||
# import noctalia shell configs
|
|
||||||
./hosts/neon/noctalia.nix
|
|
||||||
# Add home-manager form my user as a module
|
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.users.aaron = import ./hosts/neon/home.nix;
|
|
||||||
home-manager.extraSpecialArgs = { inherit inputs; };
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.aaron.imports = [
|
||||||
|
nixvim.homeModules.nixvim
|
||||||
|
./users/aaron/home.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
neon = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
specialArgs = { inherit inputs; };
|
||||||
|
modules = [
|
||||||
|
./hosts/neon/hardware-configuration.nix
|
||||||
|
./hosts/neon/configuration.nix
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
{
|
||||||
|
home-manager.extraSpecialArgs = { inherit inputs; };
|
||||||
|
home-manager.users.aaron.imports = [
|
||||||
|
nixvim.homeModules.nixvim
|
||||||
|
./users/aaron/home.nix
|
||||||
|
];
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,151 +1,24 @@
|
|||||||
{ pkgs, lib, inputs, ... }:
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
../../modules/nixos/audio.nix
|
||||||
./hardware-configuration.nix
|
../../modules/nixos/bootloader.nix
|
||||||
];
|
../../modules/nixos/certificates.nix
|
||||||
|
../../modules/nixos/gnupg.nix
|
||||||
# use flakes
|
../../modules/nixos/locales.nix
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
../../modules/nixos/networking.nix
|
||||||
|
../../modules/nixos/niri.nix
|
||||||
# configure bootloader
|
../../modules/nixos/noctalia.nix
|
||||||
boot.loader.systemd-boot.enable = true;
|
../../modules/nixos/openssh.nix
|
||||||
boot.loader.efi.canTouchEfiVariables = true;
|
../../modules/nixos/packages.nix
|
||||||
|
../../modules/nixos/sddm.nix
|
||||||
# plymouth boot eye candy
|
../../modules/nixos/services.nix
|
||||||
boot.initrd.systemd.enable = true;
|
../../modules/nixos/settings.nix
|
||||||
boot.plymouth.enable = true;
|
../../modules/nixos/steam.nix
|
||||||
boot.plymouth.theme = "spinner";
|
../../modules/nixos/users.nix
|
||||||
|
|
||||||
# use latest kernel
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
|
|
||||||
# networking
|
|
||||||
networking.hostName = "neon";
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
# bluetooth
|
|
||||||
hardware.bluetooth.enable = true;
|
|
||||||
|
|
||||||
# time zone.
|
|
||||||
time.timeZone = "Europe/Amsterdam";
|
|
||||||
|
|
||||||
# select internationalisation properties
|
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
|
||||||
i18n.extraLocaleSettings = {
|
|
||||||
LC_ADDRESS = "en_US.UTF-8";
|
|
||||||
LC_IDENTIFICATION = "en_US.UTF-8";
|
|
||||||
LC_MEASUREMENT = "en_US.UTF-8";
|
|
||||||
LC_MONETARY = "en_US.UTF-8";
|
|
||||||
LC_NAME = "en_US.UTF-8";
|
|
||||||
LC_NUMERIC = "en_US.UTF-8";
|
|
||||||
LC_PAPER = "en_US.UTF-8";
|
|
||||||
LC_TELEPHONE = "en_US.UTF-8";
|
|
||||||
LC_TIME = "en_US.UTF-8";
|
|
||||||
};
|
|
||||||
console = {
|
|
||||||
font = "Lat2-Terminus16";
|
|
||||||
keyMap = "de_CH-latin1";
|
|
||||||
};
|
|
||||||
|
|
||||||
# window manager configs
|
|
||||||
programs.niri.enable = true;
|
|
||||||
programs.xwayland.enable = true;
|
|
||||||
services.displayManager.gdm = {
|
|
||||||
enable = true;
|
|
||||||
wayland = true;
|
|
||||||
};
|
|
||||||
services.tuned.enable = true;
|
|
||||||
services.upower.enable = true;
|
|
||||||
|
|
||||||
environment.pathsToLink = [ "/libexec" ];
|
|
||||||
environment.variables.EDITOR = "vim";
|
|
||||||
|
|
||||||
# enable sound
|
|
||||||
services.pipewire = {
|
|
||||||
enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# define a user account
|
|
||||||
users.users.aaron = {
|
|
||||||
isNormalUser = true;
|
|
||||||
group = "users";
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
shell = pkgs.zsh;
|
|
||||||
packages = with pkgs; [
|
|
||||||
tree
|
|
||||||
fastfetch
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
# browser
|
|
||||||
programs.firefox.enable = true;
|
|
||||||
|
|
||||||
# zsh config
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
enableCompletion = true;
|
|
||||||
autosuggestions.enable = true;
|
|
||||||
ohMyZsh = {
|
|
||||||
enable = true;
|
|
||||||
plugins = [ "git" "sudo" ];
|
|
||||||
theme = "gentoo";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# system packages
|
|
||||||
environment.systemPackages = with pkgs; [
|
|
||||||
efibootmgr
|
|
||||||
neovim
|
|
||||||
vim
|
|
||||||
git
|
|
||||||
alacritty
|
|
||||||
ghostty
|
|
||||||
kitty
|
|
||||||
gnupg
|
|
||||||
xwayland
|
|
||||||
xwayland-satellite
|
|
||||||
wget
|
|
||||||
];
|
];
|
||||||
|
|
||||||
# Some programs need SUID wrappers
|
|
||||||
programs.mtr.enable = true;
|
|
||||||
programs.gnupg.agent = {
|
|
||||||
enable = true;
|
|
||||||
enableSSHSupport = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable steam on this machine
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
|
||||||
programs.steam = {
|
|
||||||
enable = true;
|
|
||||||
remotePlay.openFirewall = true;
|
|
||||||
dedicatedServer.openFirewall = true;
|
|
||||||
localNetworkGameTransfers.openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# fix black screen in steam on intel gpu
|
|
||||||
programs.steam.package = pkgs.steam.override {
|
|
||||||
extraArgs = "-system-composer";
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable the OpenSSH daemon
|
|
||||||
services.openssh = {
|
|
||||||
enable = true;
|
|
||||||
openFirewall = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# firewall configs
|
|
||||||
networking.firewall.allowedTCPPorts = [ ];
|
|
||||||
networking.firewall.allowedUDPPorts = [ ];
|
|
||||||
|
|
||||||
# enable home-manager globally
|
|
||||||
home-manager.useGlobalPkgs = true;
|
|
||||||
home-manager.useUserPackages = true;
|
|
||||||
home-manager.backupFileExtension = "backup";
|
|
||||||
|
|
||||||
# install state version
|
# install state version
|
||||||
system.stateVersion = "25.11"; # Don't change
|
system.stateVersion = "25.11"; # Don't change
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,102 +0,0 @@
|
|||||||
{ config, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
# user config
|
|
||||||
home.username = "aaron";
|
|
||||||
home.homeDirectory = "/home/aaron";
|
|
||||||
|
|
||||||
# user packages
|
|
||||||
home.packages = with pkgs; [
|
|
||||||
discord
|
|
||||||
fastfetch
|
|
||||||
screenfetch
|
|
||||||
zip
|
|
||||||
xz
|
|
||||||
unzip
|
|
||||||
p7zip
|
|
||||||
jq
|
|
||||||
mtr
|
|
||||||
iperf3
|
|
||||||
imagemagick
|
|
||||||
imv
|
|
||||||
dnsutils
|
|
||||||
ldns
|
|
||||||
socat
|
|
||||||
nmap
|
|
||||||
keepassxc
|
|
||||||
cowsay
|
|
||||||
file
|
|
||||||
which
|
|
||||||
tree
|
|
||||||
zstd
|
|
||||||
gnupg
|
|
||||||
btop
|
|
||||||
iotop
|
|
||||||
iftop
|
|
||||||
strace
|
|
||||||
ltrace
|
|
||||||
lsof
|
|
||||||
sysstat
|
|
||||||
lm_sensors
|
|
||||||
ethtool
|
|
||||||
pciutils
|
|
||||||
usbutils
|
|
||||||
powerline-fonts
|
|
||||||
powerline-symbols
|
|
||||||
nerd-fonts.sauce-code-pro
|
|
||||||
];
|
|
||||||
|
|
||||||
# configure git
|
|
||||||
programs.git.settings = {
|
|
||||||
enable = true;
|
|
||||||
userName = "aaron";
|
|
||||||
userEmail = "aaron@0x29a.ch";
|
|
||||||
};
|
|
||||||
|
|
||||||
# configure zsh theme
|
|
||||||
programs.zsh = {
|
|
||||||
enable = true;
|
|
||||||
autosuggestion.enable = true;
|
|
||||||
syntaxHighlighting.enable = true;
|
|
||||||
oh-my-zsh = {
|
|
||||||
enable = true;
|
|
||||||
theme = "agnoster";
|
|
||||||
#plugins = [ "git" "ssh-agent" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# set gtk theme
|
|
||||||
gtk = {
|
|
||||||
enable = true;
|
|
||||||
theme = {
|
|
||||||
name = "Adwaita-dark";
|
|
||||||
package = pkgs.gnome-themes-extra;
|
|
||||||
};
|
|
||||||
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
|
||||||
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
|
||||||
};
|
|
||||||
|
|
||||||
# set qt theme
|
|
||||||
qt = {
|
|
||||||
enable = true;
|
|
||||||
platformTheme.name = "qt6";
|
|
||||||
style = {
|
|
||||||
name = "adwaita-dark";
|
|
||||||
package = pkgs.adwaita-qt;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# set env vars
|
|
||||||
home.sessionVariables = {
|
|
||||||
EDITOR = "vim";
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable syncthing for user
|
|
||||||
services.syncthing.enable = true;
|
|
||||||
|
|
||||||
# enable home manager
|
|
||||||
programs.home-manager.enable = true;
|
|
||||||
|
|
||||||
# don't change
|
|
||||||
home.stateVersion = "25.11";
|
|
||||||
}
|
|
||||||
18
modules/home-manager/git.nix
Normal file
18
modules/home-manager/git.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
push = { autoSetupRemote = true; };
|
||||||
|
user = {
|
||||||
|
name = "aaron";
|
||||||
|
email = "aaron@0x29a.ch";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
signing = {
|
||||||
|
key = "7A830180A05DAC59CDE43B0677D2F5DB48184456";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
26
modules/home-manager/nixvim.nix
Normal file
26
modules/home-manager/nixvim.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
globals.mapleader = " ";
|
||||||
|
enable = true;
|
||||||
|
viAlias = false;
|
||||||
|
vimAlias = true;
|
||||||
|
opts = {
|
||||||
|
number = true;
|
||||||
|
relativenumber = true;
|
||||||
|
shiftwidth = 2;
|
||||||
|
tabstop = 2;
|
||||||
|
expandtab = true;
|
||||||
|
incsearch = true;
|
||||||
|
};
|
||||||
|
colorschemes.nord.enable = true;
|
||||||
|
plugins.lualine.enable = true;
|
||||||
|
plugins.nix.enable = true;
|
||||||
|
plugins.nvim-tree.enable = true;
|
||||||
|
plugins.treesitter.enable = true;
|
||||||
|
plugins.telescope.enable = true;
|
||||||
|
plugins.web-devicons.enable = true;
|
||||||
|
plugins.indent-blankline.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
18
modules/home-manager/programs.nix
Normal file
18
modules/home-manager/programs.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# user packages
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
discord
|
||||||
|
fastfetch
|
||||||
|
keepassxc
|
||||||
|
nerd-fonts.sauce-code-pro
|
||||||
|
powerline-fonts
|
||||||
|
powerline-symbols
|
||||||
|
screenfetch
|
||||||
|
];
|
||||||
|
|
||||||
|
# services and other software
|
||||||
|
services.syncthing.enable = true;
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
||||||
20
modules/home-manager/shell.nix
Normal file
20
modules/home-manager/shell.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion.enable = true;
|
||||||
|
syntaxHighlighting.enable = true;
|
||||||
|
oh-my-zsh = {
|
||||||
|
enable = true;
|
||||||
|
theme = "agnoster";
|
||||||
|
#plugins = [ "git" "ssh-agent" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# set important env vars
|
||||||
|
home.sessionVariables = {
|
||||||
|
EDITOR = "vim";
|
||||||
|
NH_FLAKE = "/home/aaron/git/nixconfig";
|
||||||
|
};
|
||||||
|
}
|
||||||
30
modules/home-manager/styling.nix
Normal file
30
modules/home-manager/styling.nix
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# set gtk theme
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
theme = {
|
||||||
|
name = "Adwaita-dark";
|
||||||
|
package = pkgs.gnome-themes-extra;
|
||||||
|
};
|
||||||
|
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||||
|
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
# set qt theme
|
||||||
|
qt = {
|
||||||
|
enable = true;
|
||||||
|
platformTheme.name = "qt6";
|
||||||
|
style = {
|
||||||
|
name = "adwaita-dark";
|
||||||
|
package = pkgs.adwaita-qt;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# ensure packages are installed
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
gnome-themes-extra
|
||||||
|
adwaita-qt
|
||||||
|
];
|
||||||
|
}
|
||||||
56
modules/home-manager/tmux.nix
Normal file
56
modules/home-manager/tmux.nix
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
{ config, pkgs, inputs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.tmux = {
|
||||||
|
enable = true;
|
||||||
|
prefix = "C-a";
|
||||||
|
keyMode = "vi";
|
||||||
|
mouse = true;
|
||||||
|
terminal = "screen-256color";
|
||||||
|
extraConfig = ''
|
||||||
|
# Status keys
|
||||||
|
set -g status-keys vi
|
||||||
|
# Status bar options
|
||||||
|
set -g status-interval 1
|
||||||
|
set -g status on
|
||||||
|
set -g status-justify left
|
||||||
|
# Clock mode
|
||||||
|
setw -g clock-mode-colour cyan
|
||||||
|
# Colors
|
||||||
|
set -g status-bg black
|
||||||
|
set -g status-fg white
|
||||||
|
# Key bindings
|
||||||
|
# Reload configuration
|
||||||
|
bind r source-file ~/.config/tmux/tmux.conf
|
||||||
|
# Panel split and selection
|
||||||
|
unbind %
|
||||||
|
unbind '"'
|
||||||
|
bind v split-window -v
|
||||||
|
bind c split-window -h
|
||||||
|
bind i new-window
|
||||||
|
bind b previous-window
|
||||||
|
bind n next-window
|
||||||
|
# Move around panes with hjkl
|
||||||
|
bind h select-pane -L
|
||||||
|
bind j select-pane -D
|
||||||
|
bind k select-pane -U
|
||||||
|
bind l select-pane -R
|
||||||
|
# Resize panes
|
||||||
|
bind H resize-pane -L 5
|
||||||
|
bind J resize-pane -D 5
|
||||||
|
bind K resize-pane -U 5
|
||||||
|
bind L resize-pane -R 5
|
||||||
|
# Kill commands
|
||||||
|
bind q kill-window
|
||||||
|
bind Q kill-session
|
||||||
|
# Bars
|
||||||
|
set -g status-left "#[fg=black,bg=blue,bold] #S#[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||||
|
set -g status-left "#[fg=black,bg=blue,bold] #S #[fg=blue,bg=black,nobold,noitalics,nounderscore]"
|
||||||
|
set -g status-right "#{prefix_highlight}#[fg=brightblack,bg=black,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %Y-%m-%d #[fg=white,bg=brightblack,nobold,noitalics,nounderscore]#[fg=white,bg=brightblack] %H:%M #[fg=cyan,bg=brightblack,nobold,noitalics,nounderscore]#[fg=black,bg=cyan,bold] #H "
|
||||||
|
# Windows
|
||||||
|
set -g window-status-format "#[fg=black,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#I #[fg=white,bg=brightblack,nobold,noitalics,nounderscore] #[fg=white,bg=brightblack]#W #F #[fg=brightblack,bg=black,nobold,noitalics,nounderscore]"
|
||||||
|
set -g window-status-current-format "#[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#I #[fg=black,bg=cyan,nobold,noitalics,nounderscore] #[fg=black,bg=cyan]#W #F #[fg=cyan,bg=black,nobold,noitalics,nounderscore]"
|
||||||
|
set -g window-status-separator ""
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
9
modules/nixos/audio.nix
Normal file
9
modules/nixos/audio.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# enable sound through pipewire
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
pulse.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
29
modules/nixos/bootloader.nix
Normal file
29
modules/nixos/bootloader.nix
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# set bootloader to systemd
|
||||||
|
boot.loader = {
|
||||||
|
systemd-boot.enable = true;
|
||||||
|
efi.canTouchEfiVariables = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable systemd initrd
|
||||||
|
boot.initrd.systemd.enable = true;
|
||||||
|
|
||||||
|
# plymouth
|
||||||
|
boot.plymouth = {
|
||||||
|
enable = true;
|
||||||
|
theme = "spinner";
|
||||||
|
};
|
||||||
|
|
||||||
|
# kernel options
|
||||||
|
boot.kernelParams = [ "quiet" "acpi.debug_level=0"];
|
||||||
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
boot.consoleLogLevel = 2;
|
||||||
|
|
||||||
|
# Add boot-related packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
efibootmgr
|
||||||
|
terminus_font
|
||||||
|
];
|
||||||
|
}
|
||||||
22
modules/nixos/certificates.nix
Normal file
22
modules/nixos/certificates.nix
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
caddyRootCA = ''
|
||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIIBozCCAUmgAwIBAgIQf2N1DGp2HVOoPaGuGDEnwjAKBggqhkjOPQQDAjAwMS4w
|
||||||
|
LAYDVQQDEyVDYWRkeSBMb2NhbCBBdXRob3JpdHkgLSAyMDI1IEVDQyBSb290MB4X
|
||||||
|
DTI1MTEwNjE5NDA1OFoXDTM1MDkxNTE5NDA1OFowMDEuMCwGA1UEAxMlQ2FkZHkg
|
||||||
|
TG9jYWwgQXV0aG9yaXR5IC0gMjAyNSBFQ0MgUm9vdDBZMBMGByqGSM49AgEGCCqG
|
||||||
|
SM49AwEHA0IABGR9mSgKCSjvcv7LvvIcO84Wpf/KtC/aexT5shSKXd1R97kIyMI5
|
||||||
|
SUYz0MzbRZHJ4QMpIeALirOK9Eoy2zht0dKjRTBDMA4GA1UdDwEB/wQEAwIBBjAS
|
||||||
|
BgNVHRMBAf8ECDAGAQH/AgEBMB0GA1UdDgQWBBRHKfIfJrrA2DACFrunVSmdnJHO
|
||||||
|
1zAKBggqhkjOPQQDAgNIADBFAiAoqc0+cHeq/8SQN16CKjVvXpZuMkg7NLDoWYMw
|
||||||
|
KgmzowIhAJlkxzBdVngwnJu8uPrVizTGF6XtmUHdJ0NDeccEqUCr
|
||||||
|
-----END CERTIFICATE-----
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
security.pki.certificates = [
|
||||||
|
caddyRootCA # self-signed pki ca for my home-lab
|
||||||
|
];
|
||||||
|
}
|
||||||
15
modules/nixos/gnupg.nix
Normal file
15
modules/nixos/gnupg.nix
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# enable gnupg agent
|
||||||
|
programs.gnupg.agent = {
|
||||||
|
enable = true;
|
||||||
|
enableSSHSupport = true;
|
||||||
|
pinentryPackage = pkgs.pinentry-curses;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnupg
|
||||||
|
pinentry-curses
|
||||||
|
];
|
||||||
|
}
|
||||||
26
modules/nixos/locales.nix
Normal file
26
modules/nixos/locales.nix
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# set the time zone
|
||||||
|
time.timeZone = "Europe/Zurich";
|
||||||
|
|
||||||
|
# set internationalisation properties
|
||||||
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
|
i18n.extraLocaleSettings = {
|
||||||
|
LC_ADDRESS = "en_US.UTF-8";
|
||||||
|
LC_IDENTIFICATION = "en_US.UTF-8";
|
||||||
|
LC_MEASUREMENT = "en_US.UTF-8";
|
||||||
|
LC_MONETARY = "en_US.UTF-8";
|
||||||
|
LC_NAME = "en_US.UTF-8";
|
||||||
|
LC_NUMERIC = "en_US.UTF-8";
|
||||||
|
LC_PAPER = "en_US.UTF-8";
|
||||||
|
LC_TELEPHONE = "en_US.UTF-8";
|
||||||
|
LC_TIME = "en_US.UTF-8";
|
||||||
|
};
|
||||||
|
|
||||||
|
# set console font and keymap
|
||||||
|
console = {
|
||||||
|
font = "Lat2-Terminus16";
|
||||||
|
keyMap = "de_CH-latin1";
|
||||||
|
};
|
||||||
|
}
|
||||||
21
modules/nixos/networking.nix
Normal file
21
modules/nixos/networking.nix
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# set hostnname
|
||||||
|
networking.hostName = "neon";
|
||||||
|
|
||||||
|
# user networkmanager
|
||||||
|
networking.networkmanager.enable = true;
|
||||||
|
|
||||||
|
# firewall default configs
|
||||||
|
networking.firewall.allowedTCPPorts = [ ];
|
||||||
|
networking.firewall.allowedUDPPorts = [ ];
|
||||||
|
|
||||||
|
# enable bluetooth
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
|
||||||
|
# Add network-related packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wireguard-tools
|
||||||
|
];
|
||||||
|
}
|
||||||
11
modules/nixos/niri.nix
Normal file
11
modules/nixos/niri.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# just enable and install niri
|
||||||
|
programs.niri.enable = true;
|
||||||
|
|
||||||
|
# Add compositor-related packages
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
xwayland-satellite
|
||||||
|
];
|
||||||
|
}
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
{ pkgs, inputs, ... }:
|
{ config, lib, pkgs, inputs, ... }:
|
||||||
{
|
{
|
||||||
# install noctalia and helper packages
|
# install noctalia and helper packages
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
inputs.noctalia.packages.${pkgs.stdenv.hostPlatform.system}.default
|
||||||
#kdePackages.qt6ct
|
|
||||||
#nwg-look
|
|
||||||
adw-gtk3
|
adw-gtk3
|
||||||
adwaita-qt
|
adwaita-qt
|
||||||
adwaita-qt6
|
adwaita-qt6
|
||||||
9
modules/nixos/openssh.nix
Normal file
9
modules/nixos/openssh.nix
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# enable the openssh daemon
|
||||||
|
services.openssh = {
|
||||||
|
enable = true;
|
||||||
|
openFirewall = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
53
modules/nixos/packages.nix
Normal file
53
modules/nixos/packages.nix
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# system packges
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
alacritty
|
||||||
|
btop
|
||||||
|
cowsay
|
||||||
|
dnsutils
|
||||||
|
ethtool
|
||||||
|
file
|
||||||
|
fwupd
|
||||||
|
fwupd-efi
|
||||||
|
ghostty
|
||||||
|
git
|
||||||
|
imagemagick
|
||||||
|
imv
|
||||||
|
iperf3
|
||||||
|
jq
|
||||||
|
kdePackages.qtmultimedia
|
||||||
|
kitty
|
||||||
|
ldns
|
||||||
|
lm_sensors
|
||||||
|
lsof
|
||||||
|
ltrace
|
||||||
|
mtr
|
||||||
|
neovim
|
||||||
|
nh
|
||||||
|
nix-output-monitor
|
||||||
|
nmap
|
||||||
|
nvd
|
||||||
|
p7zip
|
||||||
|
pciutils
|
||||||
|
sddm-astronaut
|
||||||
|
socat
|
||||||
|
sof-firmware
|
||||||
|
strace
|
||||||
|
sysstat
|
||||||
|
terminus_font
|
||||||
|
tree
|
||||||
|
unzip
|
||||||
|
usbutils
|
||||||
|
vim
|
||||||
|
wget
|
||||||
|
which
|
||||||
|
xz
|
||||||
|
zip
|
||||||
|
zstd
|
||||||
|
];
|
||||||
|
|
||||||
|
# browser
|
||||||
|
programs.firefox.enable = true;
|
||||||
|
}
|
||||||
20
modules/nixos/sddm.nix
Normal file
20
modules/nixos/sddm.nix
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# enable sddm and use astronaut theme
|
||||||
|
services.displayManager.sddm = {
|
||||||
|
enable = true;
|
||||||
|
wayland.enable = true;
|
||||||
|
autoNumlock = true;
|
||||||
|
enableHidpi = true;
|
||||||
|
theme = "sddm-astronaut-theme";
|
||||||
|
settings = {
|
||||||
|
Theme = {
|
||||||
|
Current = "sddm-astronaut-theme";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
extraPackages = with pkgs; [
|
||||||
|
sddm-astronaut
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
11
modules/nixos/services.nix
Normal file
11
modules/nixos/services.nix
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# list of enabled services on the system
|
||||||
|
services = {
|
||||||
|
tuned.enable = true;
|
||||||
|
upower.enable = true;
|
||||||
|
fwupd.enable = true;
|
||||||
|
tailscale.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
44
modules/nixos/settings.nix
Normal file
44
modules/nixos/settings.nix
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
nix = {
|
||||||
|
# nix settings
|
||||||
|
settings = {
|
||||||
|
# enable flakes and nix-command
|
||||||
|
experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
# auto-optimize my nix-store
|
||||||
|
auto-optimise-store = true;
|
||||||
|
# use all cores
|
||||||
|
max-jobs = "auto";
|
||||||
|
# use all available cores per job
|
||||||
|
cores = 0;
|
||||||
|
# add trusted substituters (binary caches)
|
||||||
|
substituters = [
|
||||||
|
"https://cache.nixos.org"
|
||||||
|
"https://nix-community.cachix.org"
|
||||||
|
];
|
||||||
|
# add keys
|
||||||
|
trusted-public-keys = [
|
||||||
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||||
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable automatic garbage collection
|
||||||
|
gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "weekly";
|
||||||
|
options = "--delete-older-than 7d";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# links /libexec from derivations to /run/current-system/sw
|
||||||
|
environment.pathsToLink = [ "/libexec" ];
|
||||||
|
# set the default editor to vim
|
||||||
|
environment.variables.EDITOR = "vim";
|
||||||
|
|
||||||
|
# enable home-manager globally
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.useUserPackages = true;
|
||||||
|
home-manager.backupFileExtension = "backup";
|
||||||
|
}
|
||||||
23
modules/nixos/steam.nix
Normal file
23
modules/nixos/steam.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# allow unfree to install steam
|
||||||
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
# enable steam and open firewall
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true;
|
||||||
|
dedicatedServer.openFirewall = true;
|
||||||
|
localNetworkGameTransfers.openFirewall = true;
|
||||||
|
# add proton-glorious-eggroll
|
||||||
|
extraCompatPackages = with pkgs; [
|
||||||
|
proton-ge-bin
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# fix black screen in steam when using xwayland-satellite
|
||||||
|
programs.steam.package = pkgs.steam.override {
|
||||||
|
extraArgs = "-system-composer";
|
||||||
|
};
|
||||||
|
}
|
||||||
23
modules/nixos/users.nix
Normal file
23
modules/nixos/users.nix
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
# create users
|
||||||
|
users.users.aaron = {
|
||||||
|
isNormalUser = true;
|
||||||
|
group = "users";
|
||||||
|
extraGroups = [ "wheel" "networkmanager" ];
|
||||||
|
shell = pkgs.zsh;
|
||||||
|
};
|
||||||
|
|
||||||
|
# add default zsh config
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
enableCompletion = true;
|
||||||
|
autosuggestions.enable = true;
|
||||||
|
ohMyZsh = {
|
||||||
|
enable = true;
|
||||||
|
plugins = [ "git" "sudo" ];
|
||||||
|
theme = "gentoo";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
18
users/aaron/home.nix
Normal file
18
users/aaron/home.nix
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
../../modules/home-manager/git.nix
|
||||||
|
../../modules/home-manager/nixvim.nix
|
||||||
|
../../modules/home-manager/programs.nix
|
||||||
|
../../modules/home-manager/shell.nix
|
||||||
|
../../modules/home-manager/styling.nix
|
||||||
|
../../modules/home-manager/tmux.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "aaron";
|
||||||
|
homeDirectory = "/home/aaron";
|
||||||
|
stateVersion = "25.11";
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user