something
This commit is contained in:
parent
b48972e264
commit
00eefb0cbc
45
README.md
45
README.md
|
@ -1,7 +1,46 @@
|
|||
# My NixOS config
|
||||
|
||||
## File system structure
|
||||
|
||||
- `common`: stores all Nix files which are shared by all system configs
|
||||
- `de`: Desktop environments and their parameters
|
||||
- `hardware`: self-explenatory
|
||||
- `locales`: localization options
|
||||
- `packages`: services & packages with common configurations
|
||||
- `default.nix`: The minimum configuration that a machine needs
|
||||
- `full-install.nix`: if this machine has a DE or is going to be used by a human
|
||||
- `tasia-packages.nix`: Collection of additional packages
|
||||
- `hosts`: Machine-specific configurations
|
||||
- `modules/nixos`: Custom NixOS modules
|
||||
- `overlays`: Custom NixOS overlays
|
||||
- `pkgs`: Custom NixOS packages
|
||||
|
||||
## Memo
|
||||
|
||||
Update channels: `nix flake update`
|
||||
|
||||
Build a configuration: `# nixos-rebuild switch --flake .#phoenix`
|
||||
|
||||
Build enry and upload a generation: TODO
|
||||
|
||||
# Hosts
|
||||
|
||||
## pc
|
||||
|
||||
My main PC. Mostly unused because of power constraints
|
||||
|
||||
## phoenix
|
||||
|
||||
phoenix ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJTqExIIZuW9yvK7mgveNK8KDGKaRswrjj/nwVDwUdeL
|
||||
`phoenix ssh-ed25519 AAAAC3Nza C1lZDI1NTE5AAAAIJTqExIIZuW9yvK7mgveNK8KDGKaRswrjj/nwVDwUdeL`
|
||||
|
||||
## enry
|
||||
My old laptop.
|
||||
|
||||
enry ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHCPPE7U87PZ4+BQrdJtPuD/ibf9ubyPAqcRJe6Lpc2D
|
||||
## stuff
|
||||
|
||||
Another person's laptop.
|
||||
|
||||
### enry
|
||||
|
||||
`enry ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHCPPE7U87PZ4+BQrdJtPuD/ibf9ubyPAqcRJe6Lpc2D`
|
||||
|
||||
This is my Raspberry Pi 3B+ inside my electrical cabinet.
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs,... }: {
|
||||
{pkgs, ...}: {
|
||||
# Allows non-free packages to be installed
|
||||
nixpkgs = {
|
||||
config = {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{ pkgs, ...}: {
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
# See ./plasma6.nix
|
||||
ksshaskpass
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ...}: {
|
||||
imports = [
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./plasma-packages.nix
|
||||
];
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
|||
|
||||
# Use ksshaskpass to access stored secrets
|
||||
environment.sessionVariables = rec {
|
||||
GIT_ASKPASS=ksshaskpass
|
||||
GIT_ASKPASS = "ksshaskpass";
|
||||
};
|
||||
|
||||
programs.kdeconnect = {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{ pkgs, ...}: {
|
||||
imports = [
|
||||
{pkgs, ...}: {
|
||||
imports = [
|
||||
./plasma-packages.nix
|
||||
];
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
./packages/neovim.nix
|
||||
./packages/zsh.nix
|
||||
];
|
||||
|
||||
nixpkgs = {
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
{pkgs, ...}: {
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
|
@ -16,27 +13,6 @@
|
|||
pulse.enable = true;
|
||||
};
|
||||
|
||||
# Z Shell
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -al";
|
||||
};
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
#
|
||||
];
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{pkgs, ...}: {
|
||||
{lib, ...}: {
|
||||
# Disable systemd-boot
|
||||
boot.loader = {
|
||||
systemd-boot = {
|
||||
|
|
3
common/hardware/ssd.nix
Normal file
3
common/hardware/ssd.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
services.fstrim.enable = true;
|
||||
}
|
21
common/packages/zsh.nix
Normal file
21
common/packages/zsh.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{pkgs, ...}: {
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableCompletion = true;
|
||||
autosuggestions.enable = true;
|
||||
syntaxHighlighting.enable = true;
|
||||
|
||||
shellAliases = {
|
||||
ll = "ls -al";
|
||||
};
|
||||
|
||||
ohMyZsh = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"git"
|
||||
];
|
||||
theme = "robbyrussell";
|
||||
};
|
||||
};
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
}
|
59
common/tasia-packages.nix
Normal file
59
common/tasia-packages.nix
Normal file
|
@ -0,0 +1,59 @@
|
|||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden
|
||||
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
|
||||
];
|
||||
}
|
17
flake.nix
17
flake.nix
|
@ -2,20 +2,10 @@
|
|||
description = "My NixOS config";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
stable.url = "github:nixos/nixpkgs/nixos-23.11";
|
||||
# You can access packages and modules from different nixpkgs revs
|
||||
# at the same time. Here's an working example:
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||
|
||||
# TODO: Add any other flake you might need
|
||||
# hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Shameless plug: looking for a way to nixify your themes and make
|
||||
# everything match nicely? Try nix-colors!
|
||||
# nix-colors.url = "github:misterio77/nix-colors";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
|
@ -26,24 +16,29 @@
|
|||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"x86_64-linux"
|
||||
];
|
||||
|
||||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Hosts
|
||||
|
||||
## enry
|
||||
|
||||
This is my Raspberry Pi 3B+ inside my electrical cabinet.
|
||||
|
||||
## pc
|
||||
|
||||
My main PC.
|
||||
|
||||
## phoenix
|
||||
|
||||
My old laptop.
|
||||
|
||||
## stuff
|
||||
|
||||
A friend's laptop.
|
|
@ -12,6 +12,7 @@
|
|||
../../common/locales/fr-keymap.nix
|
||||
../../common/hardware/intelcpu.nix
|
||||
# ../../common/hardware/amdgpu.nix
|
||||
../../common/hardware/ssd.nix
|
||||
|
||||
../../common/packages/syncthing.nix
|
||||
../../common/packages/adguardhome.nix
|
||||
|
@ -64,6 +65,10 @@
|
|||
# Needed to build enry
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
#
|
||||
];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
system.stateVersion = "23.05";
|
||||
}
|
||||
|
|
|
@ -13,19 +13,14 @@
|
|||
../../common/locales/en-keymap.nix
|
||||
../../common/hardware/intelcpu.nix
|
||||
../../common/hardware/nvidiagpu.nix
|
||||
../../common/hardware/ssd.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
|
||||
../../common/tasia-packages.nix
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
@ -78,13 +73,7 @@
|
|||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden
|
||||
nextdns
|
||||
obs-studio
|
||||
kdenlive
|
||||
rpi-imager
|
||||
kleopatra
|
||||
xonotic
|
||||
#
|
||||
];
|
||||
|
||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||
|
|
|
@ -13,21 +13,16 @@
|
|||
../../common/locales/fr-keymap.nix
|
||||
../../common/hardware/intelcpu.nix
|
||||
../../common/hardware/amdgpu.nix
|
||||
../../common/hardware/ssd.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
|
||||
../../common/tasia-packages.nix
|
||||
|
||||
../../modules/nixos/vedirect-reader.nix
|
||||
|
||||
# Or modules from other flakes (such as nixos-hardware):
|
||||
# inputs.hardware.nixosModules.common-cpu-amd
|
||||
# inputs.hardware.nixosModules.common-ssd
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
@ -92,64 +87,10 @@
|
|||
};
|
||||
|
||||
# Needed to build enry
|
||||
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
|
||||
boot.binfmt.emulatedSystems = ["aarch64-linux"];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
bitwarden
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue