mirror of
https://github.com/youwen5/nixos.git
synced 2024-11-28 11:43:51 -08:00
Compare commits
9 commits
3e5297d04a
...
ee303edef3
Author | SHA1 | Date | |
---|---|---|---|
ee303edef3 | |||
046f91a5f2 | |||
4a840c8fae | |||
3dbc049b64 | |||
4cc4dc2c37 | |||
ff235895de | |||
6abc51f47a | |||
c2e287ec90 | |||
c30ab2e0f0 |
19 changed files with 315 additions and 105 deletions
28
flake.nix
28
flake.nix
|
@ -43,22 +43,19 @@
|
|||
}@inputs: rec {
|
||||
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
|
||||
nixosConfigurations = {
|
||||
nixos = nixpkgs.lib.nixosSystem {
|
||||
demeter = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/nixos
|
||||
./modules/nixos/gaming.nix
|
||||
./modules/nixos/audio.nix
|
||||
./modules/nixos/networking.nix
|
||||
./modules/common/fonts.nix
|
||||
./modules/nixos/gaming
|
||||
./modules/nixos/audio
|
||||
./modules/nixos/networking
|
||||
./modules/common/fonts
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
|
||||
lix-module.nixosModules.default
|
||||
|
||||
lanzaboote.nixosModules.lanzaboote
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
@ -66,11 +63,10 @@
|
|||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
# ./users/youwen/linux/linux-home.nix
|
||||
./users/youwen/linux/desktop.nix
|
||||
./users/youwen/linux/programs.nix
|
||||
./users/youwen/common/core.nix
|
||||
./users/youwen/linux/catppuccin.nix
|
||||
./users/youwen/linux/desktop
|
||||
./users/youwen/linux/packages/x86_64
|
||||
./users/youwen/linux/programs
|
||||
./users/youwen/common
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
];
|
||||
};
|
||||
|
@ -96,9 +92,9 @@
|
|||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.youwen = {
|
||||
imports = [
|
||||
./users/youwen/common
|
||||
./users/youwen/linux/laptop
|
||||
./users/youwen/linux/packages/aarch-64
|
||||
./users/youwen/common
|
||||
./users/youwen/linux/laptop
|
||||
./users/youwen/linux/packages/aarch-64
|
||||
|
||||
inputs.catppuccin.homeManagerModules.catppuccin
|
||||
];
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
options hid_apple iso_layout=0
|
||||
'';
|
||||
|
||||
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
|
||||
|
||||
networking.hostName = "callisto"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
|
|
|
@ -13,29 +13,22 @@
|
|||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
timeout = 15;
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
enable = false;
|
||||
consoleMode = "auto";
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = [
|
||||
# For debugging and troubleshooting Secure Boot.
|
||||
pkgs.sbctl
|
||||
];
|
||||
|
||||
# Lanzaboote currently replaces the systemd-boot module.
|
||||
# This setting is usually set to true in configuration.nix
|
||||
# generated at installation time. So we force it to false
|
||||
# for now.
|
||||
boot.loader.systemd-boot.enable = lib.mkForce false;
|
||||
|
||||
boot.lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
networking.hostName = "nixos"; # Define your hostname.
|
||||
networking.hostName = "demeter"; # Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# select kernel
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
imports = [ ./core.nix ];
|
||||
}
|
||||
{ imports = [ ./core.nix ]; }
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
# xxx
|
||||
# '';
|
||||
|
||||
home.file.".config/neofetch/config.conf".source = ../common/neofetch.conf
|
||||
home.file.".config/neofetch/config.conf".source = ../common/neofetch.conf;
|
||||
|
||||
# Packages that should be installed to the user profile.
|
||||
home.packages = with pkgs; [
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{
|
||||
imports = [ ../theming ../home.nix ../programs ../hyprland/desktop ../waybar ];
|
||||
imports = [
|
||||
../theming
|
||||
../home.nix
|
||||
../programs
|
||||
../hyprland/desktop
|
||||
../waybar/desktop
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
@ -20,19 +20,19 @@
|
|||
"$mod, T, exec, kitty"
|
||||
"$mod, E, exec, dolphin"
|
||||
"$mod, R, exec, pavucontrol"
|
||||
|
||||
|
||||
# Window actions
|
||||
"$mod, Q, killactive"
|
||||
"$mod, W, togglefloating"
|
||||
"$mod, J, togglesplit"
|
||||
"$mod, Return, fullscreen"
|
||||
|
||||
|
||||
# Move around
|
||||
"$mod, $Left, movefocus, l"
|
||||
"$mod, $Right, movefocus, r"
|
||||
"$mod, $Up, movefocus, u"
|
||||
"$mod, $Down, movefocus, d"
|
||||
|
||||
|
||||
"$mod, 1, workspace, 1"
|
||||
"$mod, 2, workspace, 2"
|
||||
"$mod, 3, workspace, 3"
|
||||
|
@ -43,28 +43,28 @@
|
|||
"$mod, 8, workspace, 8"
|
||||
"$mod, 9, workspace, 9"
|
||||
"$mod, 0, workspace, 10"
|
||||
|
||||
|
||||
"$mod, S, togglespecialworkspace"
|
||||
|
||||
|
||||
# Move windows around
|
||||
"$mod+Shift+Ctrl, $Left, movewindow, l"
|
||||
"$mod+Shift+Ctrl, $Right, movewindow, r"
|
||||
"$mod+Shift+Ctrl, $Up, movewindow, u"
|
||||
"$mod+Shift+Ctrl, $Down, movewindow, d"
|
||||
|
||||
|
||||
"$mod+Ctrl+Alt, $Right, movetoworkspace, r+1"
|
||||
"$mod+Ctrl+Alt, $Left, movetoworkspace, r-1"
|
||||
|
||||
|
||||
"$mod+Ctrl, $Right, workspace, r+1"
|
||||
"$mod+Ctrl, $Left, workspace, r-1"
|
||||
|
||||
|
||||
"$mod+Alt, S, movetoworkspacesilent, special"
|
||||
|
||||
|
||||
# Utilities
|
||||
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi
|
||||
|
||||
|
||||
''$mod, P, exec, grim -g "$(slurp)" - | swappy -f -'' # Screenshot
|
||||
|
||||
|
||||
"$mod, Backspace, exec, wlogout" # Screenshot
|
||||
];
|
||||
bindm = [
|
||||
|
@ -93,7 +93,7 @@
|
|||
"opacity 0.80 0.80,class:^(qt5ct)$"
|
||||
"opacity 0.80 0.80,class:^(qt6ct)$"
|
||||
"opacity 0.80 0.80,class:^(kvantummanager)$"
|
||||
|
||||
|
||||
"opacity 0.90 0.90,class:^(com.github.rafostar.Clapper)$ # Clapper-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.github.tchx84.Flatseal)$ # Flatseal-Gtk"
|
||||
"opacity 0.80 0.80,class:^(hu.kramo.Cartridges)$ # Cartridges-Gtk"
|
||||
|
@ -110,13 +110,13 @@
|
|||
"opacity 0.80 0.80,class:^(io.gitlab.theevilskeleton.Upscaler)$ # Upscaler-Gtk"
|
||||
"opacity 0.80 0.80,class:^(com.github.unrud.VideoDownloader)$ # VideoDownloader-Gtk"
|
||||
"opacity 0.80 0.80,class:^(lutris)$ # Lutris game launcher"
|
||||
|
||||
|
||||
"opacity 0.80 0.70,class:^(pavucontrol)$"
|
||||
"opacity 0.80 0.70,class:^(blueman-manager)$"
|
||||
"opacity 0.80 0.70,class:^(nm-applet)$"
|
||||
"opacity 0.80 0.70,class:^(nm-connection-editor)$"
|
||||
"opacity 0.80 0.70,class:^(org.kde.polkit-kde-authentication-agent-1)$"
|
||||
|
||||
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Progress Dialog — Dolphin)$"
|
||||
"float,class:^(org.kde.dolphin)$,title:^(Copying — Dolphin)$"
|
||||
"float,title:^(Picture-in-Picture)$"
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
{
|
||||
imports = [ ../common.nix ./desktop-only.nix ];
|
||||
}
|
||||
{ imports = [ ../common.nix ]; }
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{ }
|
|
@ -1,3 +1,18 @@
|
|||
{
|
||||
imports = [ ../common.nix ./laptop-only.nix ];
|
||||
{ lib, ... }:
|
||||
{
|
||||
imports = [ ../common.nix ];
|
||||
wayland.windowManager.hyprland.settings.input.touchpad = {
|
||||
natural_scroll = true;
|
||||
disable_while_typing = true;
|
||||
clickfinger_behavior = true;
|
||||
tap-to-click = false;
|
||||
scroll_factor = 0.5;
|
||||
};
|
||||
wayland.windowManager.hyprland.settings.general.sensitivity = lib.mkForce 1.0;
|
||||
wayland.windowManager.hyprland.settings.env = [
|
||||
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
|
||||
"HYPRCURSOR_SIZE,24"
|
||||
"XCURSOR_THEME,Bibata-Modern-Ice"
|
||||
"XCURSOR_SIZE,24"
|
||||
];
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
{ }
|
|
@ -1,4 +1,5 @@
|
|||
{
|
||||
imports = [ ../theming ../home.nix ../programs ../hyprland/laptop ../waybar ];
|
||||
imports =
|
||||
[ ../theming ../home.nix ../programs ../hyprland/laptop ../waybar/laptop ];
|
||||
}
|
||||
|
||||
|
|
|
@ -1,49 +1,50 @@
|
|||
pkgs: with pkgs; [
|
||||
neofetch
|
||||
pkgs:
|
||||
with pkgs; [
|
||||
neofetch
|
||||
|
||||
# archives
|
||||
zip
|
||||
xz
|
||||
unzip
|
||||
p7zip
|
||||
# archives
|
||||
zip
|
||||
xz
|
||||
unzip
|
||||
p7zip
|
||||
|
||||
# utils
|
||||
nurl # helps fetch git data for nixpkgs
|
||||
# utils
|
||||
nurl # helps fetch git data for nixpkgs
|
||||
|
||||
# nix related
|
||||
#
|
||||
# it provides the command `nom` works just like `nix`
|
||||
# with more details log output
|
||||
nix-output-monitor
|
||||
# nix related
|
||||
#
|
||||
# it provides the command `nom` works just like `nix`
|
||||
# with more details log output
|
||||
nix-output-monitor
|
||||
|
||||
# system tools
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
# system tools
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
|
||||
# desktop utils
|
||||
wl-clipboard
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
pavucontrol
|
||||
swww
|
||||
waypaper
|
||||
# desktop utils
|
||||
wl-clipboard
|
||||
grim
|
||||
slurp
|
||||
swappy
|
||||
pavucontrol
|
||||
swww
|
||||
waypaper
|
||||
|
||||
# desktop apps
|
||||
dolphin
|
||||
thunderbird
|
||||
vesktop
|
||||
signal-desktop
|
||||
# desktop apps
|
||||
dolphin
|
||||
thunderbird
|
||||
vesktop
|
||||
signal-desktop
|
||||
|
||||
# dev tools
|
||||
nodePackages_latest.pnpm
|
||||
rustfmt
|
||||
rust-analyzer
|
||||
# dev tools
|
||||
nodePackages_latest.pnpm
|
||||
rustfmt
|
||||
rust-analyzer
|
||||
|
||||
# desktop ricing
|
||||
bibata-cursors
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libsForQt5.qt5ct
|
||||
papirus-icon-theme
|
||||
libsForQt5.qt5ct
|
||||
# desktop ricing
|
||||
bibata-cursors
|
||||
libsForQt5.qtstyleplugin-kvantum
|
||||
libsForQt5.qt5ct
|
||||
papirus-icon-theme
|
||||
libsForQt5.qt5ct
|
||||
]
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
let createCommon = import ../common-packages.nix;
|
||||
in { home.packages = ((createCommon pkgs) ++ with pkgs; [
|
||||
spotify
|
||||
bitwarden-desktop
|
||||
modrinth-app
|
||||
lutris
|
||||
wine
|
||||
]);
|
||||
in {
|
||||
home.packages = ((createCommon pkgs) ++ (with pkgs; [
|
||||
spotify
|
||||
bitwarden-desktop
|
||||
modrinth-app
|
||||
lutris
|
||||
wine
|
||||
sbctl
|
||||
]));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{ pkgs, ... }: {
|
||||
imports = [ ./catppuccin.nix ];
|
||||
|
||||
gtk = {
|
||||
|
|
93
users/youwen/linux/waybar/laptop/default.nix
Normal file
93
users/youwen/linux/waybar/laptop/default.nix
Normal file
|
@ -0,0 +1,93 @@
|
|||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 24;
|
||||
# width = 1000;
|
||||
reload-style-on-change = true;
|
||||
margin = "5px 0px 0px 0px";
|
||||
modules-left =
|
||||
[ "hyprland/window" "hyprland/workspaces" "network" "clock" ];
|
||||
modules-right =
|
||||
[ "group/hardware" "backlight" "group/adjustable" "custom/weather" ];
|
||||
# modules-center = [ "network" "group/hardware" "clock" ];
|
||||
"hyprland/workspaces" = {
|
||||
active-only = false;
|
||||
all-outputs = false;
|
||||
format = "{icon}";
|
||||
persistent-workspaces = {
|
||||
eDP-1 = [ 1 ];
|
||||
DP-1 = [ 2 3 4 5 ];
|
||||
};
|
||||
};
|
||||
"group/hardware" = {
|
||||
orientation = "inherit";
|
||||
modules = [ "cpu" "battery" ];
|
||||
};
|
||||
"group/adjustable" = {
|
||||
orientation = "inherit";
|
||||
drawer = {
|
||||
transition-duration = 500;
|
||||
transition-left-to-right = true;
|
||||
};
|
||||
modules = [ "pulseaudio" "mpris" ];
|
||||
};
|
||||
"custom/weather" = {
|
||||
orientation = "horizontal";
|
||||
exec = ''curl wttr.in/?format="%l:%20%t"'';
|
||||
interval = 10;
|
||||
};
|
||||
cpu = {
|
||||
interval = 10;
|
||||
format = "{usage}% ";
|
||||
};
|
||||
memory = {
|
||||
interval = 10;
|
||||
format = "{percentage}% ";
|
||||
};
|
||||
# mpris = {
|
||||
# format-playing = " {title} ";
|
||||
# format-paused = " {title} ";
|
||||
# format-stopped = "Nothing Playing";
|
||||
# };
|
||||
tray = { spacing = 10; };
|
||||
clock = { format = "{:%a %b %d, %I:%M %p} "; };
|
||||
backlight = {
|
||||
device = "intel_backlight";
|
||||
format = "{percent}% {icon}";
|
||||
format-icons = [ "" "" ];
|
||||
};
|
||||
battery = {
|
||||
states = {
|
||||
good = 95;
|
||||
warning = 20;
|
||||
critical = 10;
|
||||
};
|
||||
format = "{capacity}% {icon}";
|
||||
format-icons = [ "" "" "" "" "" ];
|
||||
};
|
||||
"hyprland/window" = { format = "{class}"; };
|
||||
network = {
|
||||
format-wifi = "{essid} ";
|
||||
format-linked = "{ifname} (No IP) ";
|
||||
format-disconnected = "Disconnected ⚠";
|
||||
format-alt = "{ifname}: {ipaddr}/{cidr}";
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth = "{volume}% {icon} {format_source}";
|
||||
format-bluetooth-muted = " {icon} {format_source}";
|
||||
format-muted = " {format_source}";
|
||||
format-source = "{volume}% ";
|
||||
format-source-muted = "";
|
||||
format-icons = { default = [ "" "" "" ]; };
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ./waybar.css;
|
||||
systemd.enable = true;
|
||||
};
|
||||
}
|
108
users/youwen/linux/waybar/laptop/waybar.css
Executable file
108
users/youwen/linux/waybar/laptop/waybar.css
Executable file
|
@ -0,0 +1,108 @@
|
|||
* {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
border-bottom: 0px solid #ffffff;
|
||||
background: transparent;
|
||||
transition-property: none;
|
||||
transition-duration: 0s;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background: #24273a;
|
||||
padding: 0px 5px 0px 5px;
|
||||
margin: 0px 0px 0px 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces {
|
||||
background: #24273a;
|
||||
padding: 0px 5px 0px 5px;
|
||||
margin: 0px 0px 0px 2px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
#workspaces button,
|
||||
#workspaces button:hover {
|
||||
padding: 0;
|
||||
background-color: #24273a;
|
||||
/* color: @color4; */
|
||||
}
|
||||
#workspaces button.active,
|
||||
#workspaces button:hover {
|
||||
/* color: @color8; */
|
||||
}
|
||||
|
||||
#clock,
|
||||
#pulseaudio,
|
||||
#network,
|
||||
#battery,
|
||||
#tray,
|
||||
#mpris,
|
||||
#cpu,
|
||||
#memory,
|
||||
#temperature,
|
||||
#custom-weather,
|
||||
#window,
|
||||
#backlight {
|
||||
background-color: #24273a;
|
||||
/* color: @color4; */
|
||||
opacity: 1;
|
||||
border-radius: 5px;
|
||||
padding: 1px 10px 1px 10px;
|
||||
margin: 0px 5px 0px 0px;
|
||||
}
|
||||
#backlight {
|
||||
margin-right: 0px;
|
||||
padding-right: 3px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
}
|
||||
#network {
|
||||
margin-left: 15px;
|
||||
padding-right: 15px;
|
||||
}
|
||||
#mpris {
|
||||
padding-left: 0px;
|
||||
margin-left: 0px;
|
||||
margin-right: 5px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
#pulseaudio {
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
margin-left: 0px;
|
||||
margin-right: 5px;
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
}
|
||||
#memory,
|
||||
#cpu {
|
||||
padding-right: 2px;
|
||||
border-top-right-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border-right-width: 0px;
|
||||
}
|
||||
#memory,
|
||||
#battery {
|
||||
margin-left: 0px;
|
||||
padding-left: 2px;
|
||||
border-top-left-radius: 0px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-left-width: 0px;
|
||||
}
|
||||
#cpu {
|
||||
margin-right: 0px;
|
||||
}
|
||||
#battery {
|
||||
padding-right: 13px;
|
||||
}
|
||||
#custom-weather {
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#window {
|
||||
margin-right: 10px;
|
||||
margin-left: 10px;
|
||||
}
|
Loading…
Reference in a new issue