mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-25 02:03:51 -08:00
Compare commits
8 commits
5b3c4b4ee6
...
7fb6171dcf
Author | SHA1 | Date | |
---|---|---|---|
7fb6171dcf | |||
4e5adbd869 | |||
cbcb9467d6 | |||
26aa04552c | |||
3ebf22d7ce | |||
d60a08ceb0 | |||
c11f3ef550 | |||
4343e50b6d |
19 changed files with 56 additions and 114 deletions
14
README.md
14
README.md
|
@ -105,21 +105,23 @@ The [flake.nix](/flake.nix) currently contains my configuration for four hosts:
|
||||||
|
|
||||||
## Keybinds
|
## Keybinds
|
||||||
|
|
||||||
|
Non-exhaustive.
|
||||||
|
|
||||||
| Shortcut | Action |
|
| Shortcut | Action |
|
||||||
| -------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
| -------------------------------------------------------------------------------------------------------- | -------------------------------- |
|
||||||
| <kbd>Super</kbd> + <kbd>W</kbd> | Toggle floating |
|
| <kbd>Super</kbd> + <kbd>W</kbd> | Toggle floating |
|
||||||
| <kbd>Super</kbd> + <kbd>J</kbd> | Toggle layout |
|
| <kbd>Super</kbd> + <kbd>K</kbd> | Toggle layout |
|
||||||
| <kbd>Super</kbd> + <kbd>E</kbd> | Open Dolphin |
|
| <kbd>Super</kbd> + <kbd>E</kbd> | Open Dolphin |
|
||||||
| <kbd>Super</kbd> + <kbd>T</kbd> | Open kitty |
|
| <kbd>Super</kbd> + <kbd>T</kbd> | Open kitty |
|
||||||
| <kbd>Super</kbd> + <kbd>F</kbd> | Open librewolf |
|
| <kbd>Super</kbd> + <kbd>F</kbd> | Open librewolf |
|
||||||
| <kbd>Super</kbd> + <kbd>R</kbd> | Open pavucontrol |
|
| <kbd>Super</kbd> + <kbd>R</kbd> | Open pavucontrol |
|
||||||
| <kbd>Super</kbd> + <kbd>Space</kbd> | Open rofi |
|
| <kbd>Super</kbd> + <kbd>Space</kbd> | Open rofi |
|
||||||
| <kbd>Super</kbd> + <kbd>Backspace</kbd> | Open logout menu |
|
| <kbd>Super</kbd> + <kbd>Backspace</kbd> | Open logout menu |
|
||||||
| <kbd>Super</kbd> + <kbd>P</kbd> | Screenshot region |
|
| <kbd>Super</kbd> + <kbd>L</kbd> | Screenshot region |
|
||||||
| <kbd>Super</kbd> + <kbd>Y</kbd><kbd>U</kbd><kbd>I</kbd><kbd>O</kbd> | Move around |
|
| <kbd>Super</kbd> + <kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> | Move around |
|
||||||
| <kbd>Super</kbd> + <kbd>Ctrl</kbd> + <kbd>Y</kbd><kbd>O</kbd> | Move workspaces |
|
| <kbd>Super</kbd> + <kbd>Ctrl</kbd> + <kbd>H</kbd><kbd>L</kbd> | Move workspaces |
|
||||||
| <kbd>Super</kbd> + <kbd>Alt</kbd> + <kbd>Ctrl</kbd> + <kbd>Y</kbd><kbd>U</kbd><kbd>I</kbd><kbd>O</kbd> | Move windows around workspaces |
|
| <kbd>Super</kbd> + <kbd>Alt</kbd> + <kbd>Ctrl</kbd> + <kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> | Move windows around workspaces |
|
||||||
| <kbd>Super</kbd> + <kbd>Shift</kbd> + <kbd>Ctrl</kbd> + <kbd>Y</kbd><kbd>U</kbd><kbd>I</kbd><kbd>O</kbd> | Move windows around |
|
| <kbd>Super</kbd> + <kbd>Shift</kbd> + <kbd>Ctrl</kbd> + <kbd>H</kbd><kbd>J</kbd><kbd>K</kbd><kbd>L</kbd> | Move windows around |
|
||||||
| <kbd>Super</kbd> + <kbd>S</kbd> | Open Special Workspace |
|
| <kbd>Super</kbd> + <kbd>S</kbd> | Open Special Workspace |
|
||||||
| <kbd>Super</kbd> + <kbd>Enter</kbd> | Fullscreen Window |
|
| <kbd>Super</kbd> + <kbd>Enter</kbd> | Fullscreen Window |
|
||||||
| <kbd>Super</kbd> + <kbd>Alt</kbd> + <kbd>S</kbd> | Move Window to Special Workspace |
|
| <kbd>Super</kbd> + <kbd>Alt</kbd> + <kbd>S</kbd> | Move Window to Special Workspace |
|
||||||
|
|
10
TODOS.md
10
TODOS.md
|
@ -2,8 +2,14 @@
|
||||||
|
|
||||||
## P1
|
## P1
|
||||||
|
|
||||||
- Massively refactor module system
|
|
||||||
|
|
||||||
## P2
|
## P2
|
||||||
|
|
||||||
- Add Nvidia-specific config options for Hyprland (blocked by P1)
|
- [ ] Move wallpapers to submodule
|
||||||
|
- [ ] Move Neovim to submodule
|
||||||
|
|
||||||
|
|
||||||
|
## Done
|
||||||
|
|
||||||
|
- [x] Add Nvidia-specific config options for Hyprland (blocked by P1)
|
||||||
|
- [x] Massively refactor module system
|
||||||
|
|
|
@ -134,11 +134,9 @@
|
||||||
users.users.youwen = {
|
users.users.youwen = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Youwen Wu";
|
description = "Youwen Wu";
|
||||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
extraGroups = ["networkmanager"];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.realtime = {};
|
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["root" "youwen"];
|
trusted-users = ["root" "youwen"];
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
@ -148,27 +146,6 @@
|
||||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
security.pam.loginLimits = [
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "rtprio";
|
|
||||||
value = 98;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "memlock";
|
|
||||||
value = "unlimited";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "nice";
|
|
||||||
value = -11;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
}: {
|
}: {
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../../modules/nixos/gaming
|
../../modules/linux/gaming
|
||||||
../../modules/nixos/audio
|
../../modules/linux/audio
|
||||||
../../modules/nixos/networking
|
../../modules/linux/networking
|
||||||
../../modules/nixos/fonts
|
../../modules/linux/fonts
|
||||||
../../modules/nixos/greeter
|
../../modules/linux/greeter
|
||||||
../../modules/nixos/core
|
../../modules/linux/core
|
||||||
../../overlays
|
../../overlays
|
||||||
|
|
||||||
catppuccin.nixosModules.catppuccin
|
catppuccin.nixosModules.catppuccin
|
||||||
|
|
|
@ -103,11 +103,9 @@
|
||||||
users.users.youwen = {
|
users.users.youwen = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Youwen Wu";
|
description = "Youwen Wu";
|
||||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
extraGroups = ["networkmanager"];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.realtime = {};
|
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["root" "youwen"];
|
trusted-users = ["root" "youwen"];
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
@ -118,27 +116,6 @@
|
||||||
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
|
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
security.pam.loginLimits = [
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "rtprio";
|
|
||||||
value = 98;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "memlock";
|
|
||||||
value = "unlimited";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "nice";
|
|
||||||
value = -11;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,11 @@
|
||||||
}: {
|
}: {
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../../modules/nixos/audio
|
../../modules/linux/audio
|
||||||
../../modules/nixos/networking
|
../../modules/linux/networking
|
||||||
../../modules/nixos/fonts
|
../../modules/linux/fonts
|
||||||
../../modules/nixos/greeter
|
../../modules/linux/greeter
|
||||||
../../modules/nixos/core
|
../../modules/linux/core
|
||||||
../../overlays
|
../../overlays
|
||||||
|
|
||||||
apple-silicon.nixosModules.apple-silicon-support
|
apple-silicon.nixosModules.apple-silicon-support
|
||||||
|
|
|
@ -117,11 +117,9 @@
|
||||||
users.users.youwen = {
|
users.users.youwen = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Youwen Wu";
|
description = "Youwen Wu";
|
||||||
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
|
extraGroups = ["networkmanager"];
|
||||||
};
|
};
|
||||||
|
|
||||||
users.groups.realtime = {};
|
|
||||||
|
|
||||||
nix.settings = {
|
nix.settings = {
|
||||||
trusted-users = ["root" "youwen"];
|
trusted-users = ["root" "youwen"];
|
||||||
experimental-features = ["nix-command" "flakes"];
|
experimental-features = ["nix-command" "flakes"];
|
||||||
|
@ -131,27 +129,6 @@
|
||||||
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
KERNEL=="cpu_dma_latency", GROUP="realtime"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
security.pam.loginLimits = [
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "rtprio";
|
|
||||||
value = 98;
|
|
||||||
}
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "memlock";
|
|
||||||
value = "unlimited";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
domain = "@realtime";
|
|
||||||
type = "-";
|
|
||||||
item = "nice";
|
|
||||||
value = -11;
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
}: {
|
}: {
|
||||||
imports = with inputs; [
|
imports = with inputs; [
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
../../modules/nixos/gaming
|
../../modules/linux/gaming
|
||||||
../../modules/nixos/audio
|
../../modules/linux/audio
|
||||||
../../modules/nixos/networking
|
../../modules/linux/networking
|
||||||
../../modules/nixos/fonts
|
../../modules/linux/fonts
|
||||||
../../modules/nixos/greeter
|
../../modules/linux/greeter
|
||||||
../../modules/nixos/core
|
../../modules/linux/core
|
||||||
../../modules/nixos/hamachi
|
../../modules/linux/hamachi
|
||||||
../../overlays
|
../../overlays
|
||||||
|
|
||||||
catppuccin.nixosModules.catppuccin
|
catppuccin.nixosModules.catppuccin
|
||||||
|
|
14
modules/linux/core/default.nix
Normal file
14
modules/linux/core/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{
|
||||||
|
security.sudo.enable = false;
|
||||||
|
|
||||||
|
security.doas = {
|
||||||
|
enable = true;
|
||||||
|
extraRules = [
|
||||||
|
{
|
||||||
|
users = ["youwen"];
|
||||||
|
keepEnv = true;
|
||||||
|
persist = true;
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,2 +0,0 @@
|
||||||
{
|
|
||||||
}
|
|
|
@ -76,23 +76,14 @@
|
||||||
programs.fish = {
|
programs.fish = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
rebuild = "sudo nixos-rebuild switch";
|
|
||||||
ls = "eza -l --icons=auto";
|
ls = "eza -l --icons=auto";
|
||||||
};
|
};
|
||||||
functions = {
|
shellInit = ''
|
||||||
update-nixos = {
|
oh-my-posh disable notice
|
||||||
description = "Update the system flake and attempt to build and switch to the new configuration.";
|
'';
|
||||||
body = ''
|
|
||||||
cd /etc/nixos
|
|
||||||
nix flake update
|
|
||||||
sudo nixos-rebuild switch
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
interactiveShellInit = ''
|
interactiveShellInit = ''
|
||||||
fish_vi_key_bindings
|
fish_vi_key_bindings
|
||||||
set -g fish_greeting
|
set -g fish_greeting
|
||||||
oh-my-posh disable notice
|
|
||||||
'';
|
'';
|
||||||
plugins = [
|
plugins = [
|
||||||
{
|
{
|
||||||
|
|
|
@ -455,6 +455,7 @@
|
||||||
indent-blankline.enable = true;
|
indent-blankline.enable = true;
|
||||||
which-key.enable = true;
|
which-key.enable = true;
|
||||||
zen-mode.enable = true;
|
zen-mode.enable = true;
|
||||||
|
nvim-autopairs.enable = true;
|
||||||
yanky = {
|
yanky = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableTelescope = true;
|
enableTelescope = true;
|
||||||
|
@ -548,7 +549,6 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
modules = {
|
modules = {
|
||||||
surround = {};
|
surround = {};
|
||||||
pairs = {};
|
|
||||||
ai = {};
|
ai = {};
|
||||||
hipatterns = {};
|
hipatterns = {};
|
||||||
notify = {};
|
notify = {};
|
||||||
|
|
Loading…
Reference in a new issue