realeinherjar / flakes Goto Github PK
View Code? Open in Web Editor NEWNixOS Minimalist-Hardened-Privacy-oriented configs
License: MIT License
NixOS Minimalist-Hardened-Privacy-oriented configs
License: MIT License
We need to remove mason config and add the binaries as packages.
This would need also a fix on https://github.com/realeinherjar/nvim.
Related: williamboman/mason.nvim#428
PS: don't forget to add the nil
Nix LSP package and LSP config in nvim.
Add oxalica/rust-overlay
:
{
description = "My configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
};
outputs = { nixpkgs, rust-overlay, ... }: {
nixosConfigurations = {
hostname = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix # Your system configuration.
({ pkgs, ... }: {
nixpkgs.overlays = [ rust-overlay.overlays.default ];
# includes cargo, clippy, rustfmt
environment.systemPackages = [ pkgs.rust-bin.stable.latest.default ];
})
];
};
};
};
}
disko
is an automated disk partitioning and formatting for NixOS.
Install via flakes:
{
inputs.disko.url = "github:nix-community/disko";
inputs.disko.inputs.nixpkgs.follows = "nixpkgs";
outputs = { self, nixpkgs, disko }: {
# change `yourhostname` to your actual hostname
nixosConfigurations.yourhostname = nixpkgs.lib.nixosSystem {
# change to your system:
system = "x86_64-linux";
modules = [
./configuration.nix
disko.nixosModules.disko
];
};
};
}
Then add the following:
{ disks ? [ "/dev/vda" ], ... }: {
# checkout the example folder for how to configure different disko layouts
disko.devices = {
disk = {
vbd = {
device = builtins.elemAt disks 0;
type = "disk";
content = {
type = "table";
format = "gpt";
partitions = [
{
name = "ESP";
start = "1MiB";
end = "512MiB";
type = "EF00";
bootable = true;
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [
"defaults"
];
};
}
{
name = "luks";
start = "512MiB";
end = "100%";
part-type = "primary";
bootable = true;
content = {
type = "luks";
name = "crypted";
type = "btrfs";
extraOpenArgs = [ "-f" "--allow-discards" ];
passwordFile = config.age.secrets.luks.path;
subvolumes = {
"/nix" = {
mountOptions = [ "compress=zstd" "noatime" ];
mountpoint = "/nix";
};
};
};
}
];
};
};
};
nodev = {
"/" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"size=12G"
"mode=755"
];
};
};
};
}
secrets.nix
add an entry:
"luks.age".publicKeys = [ einherjar ];
hosts/laptop/wayland/default.nix
:
age.secrets = {
...
luks.file = ../../../secrets/luks.age;
};
Additionally this script might help you: https://github.com/Ruixi-rebirth/flakes/blob/main/scripts/disko.sh
Right now every time I have to do a git
command on a ssh repo I have to enter my ssh key.
eww
is awesome.
Resources:
This will be released in home-manager in 24.05 probably.
Uncomment this
Helix editor with rust-analyzer
ripgrep
and fd
Use this extra easy to configure step in the CI/CD: https://github.com/DeterminateSystems/magic-nix-cache-action
in modules/desktop/hyprland/home.nix
:
add wayland.windowManager.hyprland.xwayland.enable
as true
write extraConfig
as wayland.windowManager.hyprland.settings
.
Entries with the same key should be written as lists. Variables’ and colors’ names should be quoted
Example:
{
decoration = {
shadow_offset = "0 5";
"col.shadow" = "rgba(00000099)";
};
"$mod" = "SUPER";
bindm = [
# mouse movements
"$mod, mouse:272, movewindow"
"$mod, mouse:273, resizewindow"
"$mod ALT, mouse:272, resizewindow"
];
}
add a hypr keybind to change keyboard between "xkbVariant = "altgr-intl"
and xkbVariant = "colemak"
.
Use agenix
to create a wireguard
kill switch config:
agenix
wg-something.conf
with systemd-networkd
wg-something.conf
with secretssystemd
autostartprivacy.md
)Maybe we need to add an user file/folder config to impermanence
?
services = {
keyd = {
enable = true;
settings = {
main = {
# Maps capslock to escape when pressed and control when held
capslock = "overload(control, esc)";
};
};
};
};
Add firefox
config to home manager.
Overhaul modules/programs/common/firefox/default.nix
:
Resources: https://youtu.be/GaM_paeX7TI
foot.ini
:
font=JetBrains Mono Nerd Font:size=12
initial-window-size-chars=190x60
bold-text-in-bright=yes
initial-window-mode=maximized
[key-bindings]
search-start=Control+Shift+f
show-urls-launch=Control+Shift+u
[colors]
alpha=0.95
# catppucin mocha
# catppuccin/foot
foreground=cdd6f4 # Text
background=1e1e2e # Base
regular0=45475a # Surface 1
regular1=f38ba8 # red
regular2=a6e3a1 # green
regular3=f9e2af # yellow
regular4=89b4fa # blue
regular5=f5c2e7 # pink
regular6=94e2d5 # teal
regular7=bac2de # Subtext 1
bright0=585b70 # Surface 2
bright1=f38ba8 # red
bright2=a6e3a1 # green
bright3=f9e2af # yellow
bright4=89b4fa # blue
bright5=f5c2e7 # pink
bright6=94e2d5 # teal
bright7=a6adc8 # Subtext 0
[csd]
hide-when-maximized=yes
# vim: ft=dosini
tmux config in https://github.com/catppuccin/tmux
terminalfloat
(foot --title=
or foot --app-id=
), and terminal float does not launch with tmux attach
.tmux.conf
######################################################################
# START OF GENERAL CONFIGURATIONS
######################################################################
# set scroll history to 100,000 lines
set-option -g history-limit 100000
# Turn on interactivity with mouse
set -g mouse on
# Enables italics in tmux
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",xterm-256color*:Tc"
set -ga terminal-overrides ",foot:Tc"
# Turns off the status bar
set -g status on
# Change the position of the status bar
# set-option -g status-position bottom
# TMUX and VIM Focus Events
set-option -g focus-events on
# Start window numbering at specific num
set -g base-index 1
setw -g pane-base-index 1
# Renumber windows on window close
set -g renumber-windows on
# Avoid ESC delay
set -s escape-time 0
# Fix titlebar
set -g set-titles on
set -g set-titles-string "#T"
# VIM mode
set -g mode-keys vi
#######################################################
# KEY BINDING
#######################################################
# Remap prefix from 'C-b' to 'C-a'
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# C-b to server prefix in nested tmux stuff
bind-key -n C-b send-prefix
# New windows and panes are in current path
bind c new-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind \" split-window -v -c "#{pane_current_path}"
# hjkl pane traversal
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# copy to X clipboard
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send-keys -X copy-pipe 'xclip -in -selection clipboard &> /dev/null'
bind -T copy-mode-vi Enter send-keys -X cancel
# shortcut for moving tmux buffer to clipboard
# useful if you've selected with the mouse
bind-key -nr C-y run "tmux show-buffer | pbcopy" # doesn't work on MacOS
######################################################################
# END OF GENERAL CONFIGURATIONS
######################################################################
######################
### DESIGN CHANGES ###
######################
source-file ~/.config/tmux/base16-gruvbox-dark-hard.conf
######################
### STATUS BAR ###
######################
set -g status-interval 1
# uptime
#set-option -ag status-right "#[fg=#b8bb26,bg=default]#(uptime | awk -F, '{sub(\".*up \",x,$1); print $1}')"
set-option -ag status-right "#[fg=#b8bb26,bg=default] up:#(uptime | cut -f 4-5 -d ' ' | cut -f 1 -d ',')"
Make this:
### 'Catppuccin' theme for CMus (for 255 color terms)
set color_cmdline_bg=default
# Text Color White
set color_cmdline_fg=254
# Error Color Red
set color_error=211
# Info Color Yellow
set color_info=223
# Separator Color Blue
set color_separator=117
# Statusline background Black
set color_statusline_bg=default
#Statusline foreground #White
set color_statusline_fg=254
# Titleline background Green
set color_titleline_bg=151
# Titleline foreground Black
set color_titleline_fg=16
# Terminal default as background
set color_win_bg=default
# Currently Playing song Blue
set color_win_cur=117
# Indicator over currently playing song Green
set color_win_cur_sel_bg=151
set color_win_cur_sel_fg=16
# Browser Directory Colors White
set color_win_dir=254
# Playlist browser general text color White
set color_win_fg=254
# Selected inactive Directory of currently playing Album/Song Maroon bg Black fg
set color_win_inactive_cur_sel_bg=181
set color_win_inactive_cur_sel_fg=235
into ~/.config/cmus/catppuccin.theme
and then in rc
:
colorscheme catppuccin
There is a new set of neovim minimal configs here realeinherjar/init.lua
.config/cmus/rc
:
bind -f common ^T push run opustags -s FIELD=VALUE -i {}
add opustags
to nix pkgs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.