Update Desktop Config

This commit is contained in:
2025-07-16 17:48:36 +02:00
parent 4b5127add1
commit 7ca1e956e1
6 changed files with 345 additions and 234 deletions
+1 -1
View File
@@ -57,7 +57,7 @@
]; ];
}; };
desktop = nixpkgs.lib.nixosSystem { desktop = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;}; specialArgs = { inherit inputs; cfg = defaultCfg; };
modules = [ modules = [
hyprland.nixosModules.default hyprland.nixosModules.default
./hosts/desktop/configuration.nix ./hosts/desktop/configuration.nix
+83 -34
View File
@@ -1,4 +1,4 @@
{ config, lib, pkgs, inputs, ... }: { cfg, config, lib, pkgs, inputs, ... }:
{ {
imports = [ imports = [
@@ -6,17 +6,34 @@
inputs.home-manager.nixosModules.default inputs.home-manager.nixosModules.default
]; ];
boot.loader.systemd-boot.enable = true; boot = {
boot.loader.efi.canTouchEfiVariables = true; loader.systemd-boot.enable = true;
boot.plymouth.enable = true; loader.efi.canTouchEfiVariables = true;
plymouth.enable = true;
};
networking = { networking = {
hostName = "lm_desktop";
networkmanager = { networkmanager = {
enable = true; enable = true;
wifi.backend = "iwd"; wifi.backend = "iwd";
}; };
hostName = "nixos-desktop";
firewall.enable = false; firewall = {
enable = true;
# Open ports in the firewall.
allowedTCPPorts = [ 21 22 80 443 4070 5037 ];
allowedUDPPorts = [ 4070 ];
allowedTCPPortRanges = [
{ from = 8000; to = 8010; }
];
allowPing = true;
};
wireless.iwd = { wireless.iwd = {
enable = true; enable = true;
settings = { settings = {
@@ -24,14 +41,6 @@
Settings.Autoconnect = true; Settings.Autoconnect = true;
}; };
}; };
# Configure network proxy if necessary
# proxy.default = "http://user:password@proxy:port/";
# proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
}; };
time.timeZone = "Europe/Dublin"; time.timeZone = "Europe/Dublin";
@@ -53,7 +62,14 @@
}; };
services = { services = {
libinput.enable = true; avahi = {
enable = true;
nssmdns4 = true;
publish = {
enable = true;
userServices = true;
};
};
greetd = { greetd = {
enable = true; enable = true;
@@ -63,16 +79,22 @@
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland"; command = "${pkgs.greetd.tuigreet}/bin/tuigreet --cmd Hyprland";
}; };
}; };
}; };
xserver.videoDrivers = [ "nvidia" ]; udev = {
packages = [ pkgs.android-udev-rules ];
};
libinput.enable = true;
blueman.enable = true; blueman.enable = true;
gvfs.enable = true; gvfs.enable = true;
auto-cpufreq.enable = true; auto-cpufreq.enable = true;
thermald.enable = true; thermald.enable = true;
power-profiles-daemon.enable = false; power-profiles-daemon.enable = false;
pulseaudio.enable = false; pulseaudio.enable = false;
xserver.videoDrivers = [ "nvidia" ];
}; };
security.pam.services.hyprlock = {}; security.pam.services.hyprlock = {};
@@ -85,8 +107,6 @@
bluetooth.enable = true; bluetooth.enable = true;
graphics = { graphics = {
enable = true; enable = true;
extraPackages = with pkgs;[
];
}; };
nvidia = { nvidia = {
modesetting.enable = true; modesetting.enable = true;
@@ -96,7 +116,8 @@
}; };
}; };
fonts.packages = with pkgs; [ fonts = {
packages = with pkgs; [
noto-fonts noto-fonts
noto-fonts-cjk-sans noto-fonts-cjk-sans
noto-fonts-cjk-serif noto-fonts-cjk-serif
@@ -109,6 +130,12 @@
nerd-fonts.droid-sans-mono nerd-fonts.droid-sans-mono
]; ];
fontconfig = {
enable = true;
includeUserConf = true;
};
};
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nix.settings = { nix.settings = {
@@ -123,6 +150,7 @@
dates = "weekly"; dates = "weekly";
options = "--delete-older-than 10d"; options = "--delete-older-than 10d";
}; };
nix.optimise = { nix.optimise = {
automatic = true; automatic = true;
dates = [ "00:00" ]; dates = [ "00:00" ];
@@ -135,44 +163,65 @@
}; };
programs = { programs = {
dconf.enable = true;
steam = { steam = {
enable = true; enable = true;
remotePlay.openFirewall = true; remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true; dedicatedServer.openFirewall = true;
}; };
nix-ld.enable = true; hyprland = {
mtr.enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
xwayland.enable = true;
withUWSM = true;
plugins = [ ];
};
gnupg.agent = { gnupg.agent = {
enable = true; enable = true;
enableSSHSupport = true; enableSSHSupport = true;
}; };
hyprlock.enable = true;
dconf.enable = true;
nix-ld.enable = true;
mtr.enable = true;
}; };
lib.inputMethod.fcitx5.waylandFrontend = true;
home-manager = { home-manager = {
useGlobalPkgs = true; useGlobalPkgs = true;
extraSpecialArgs = { inherit inputs; }; extraSpecialArgs = { inherit inputs; inherit cfg; };
users = { users = {
"liamm" = import ./home.nix; "liamm" = import ./home.nix;
}; };
backupFileExtension = ".bak";
}; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
vim alacritty
fd bat
file
ripgrep
wget
glib
spotify
discord discord
discord-canary discord-canary
wl-clipboard fd
alacritty file
glib
gnome-keyring
libdrm
libnotify libnotify
mesa mesa
libdrm neovim
ripgrep
spotify
unzip
usbutils
uxplay
vim
wget
wl-clipboard
zip
]; ];
zramSwap = { zramSwap = {
+67
View File
@@ -0,0 +1,67 @@
{ cfg, config, context, pkgs, ... }:
let
inherit (config.home) username homeDirectory;
mkSymlinkAttrs = import ../../utils/mkSymlinkAttrs.nix {
inherit pkgs;
inherit (cfg) context runtimeRoot;
hm = config.lib; # same as: cfg.context.inputs.home-manager.lib.hm;
};
in
{
# Symlink dotfiles
home.file = mkSymlinkAttrs {
# Fonts
".local/share/fonts/KelmscottMono.otf" = {
source = ../../fonts/KelmscottMono.otf;
outOfStoreSymlink = true;
recursive = false;
};
# Configs
".config/hypr" = {
source = ../../configs/hypr;
outOfStoreSymlink = true;
recursive = true;
};
".config/waybar" = {
source = ../../configs/waybar;
outOfStoreSymlink = true;
recursive = true;
};
".config/ghostty" = {
source = ../../configs/ghostty;
outOfStoreSymlink = true;
recursive = true;
};
".config/nvim" = {
source = ../../configs/nvim;
outOfStoreSymlink = true;
recursive = true;
};
".config/wofi" = {
source = ../../configs/wofi;
outOfStoreSymlink = true;
recursive = true;
};
".config/swaync" = {
source = ../../configs/swaync;
outOfStoreSymlink = true;
recursive = true;
};
".config/fastfetch" = {
source = ../../configs/fastfetch;
outOfStoreSymlink = true;
recursive = true;
};
# I have no idea why this is an issue...
# ".config/emacs" = {
# source = ../../configs/emacs;
# outOfStoreSymlink = true;
# recursive = true;
# };
};
}
+22 -185
View File
@@ -1,19 +1,27 @@
{ config, pkgs, lib, callPackage, inputs, ... }: {
cfg,
config,
pkgs,
lib,
callPackage,
inputs,
...
}:
{ {
home.username = "liamm"; home.username = "liamm";
home.homeDirectory = "/home/liamm"; home.homeDirectory = "/home/liamm";
imports = [ home.username = cfg.username;
# general modules home.homeDirectory = cfg.homeDirectory;
../../modules/home-manager/dunst.nix
../../modules/home-manager/tmux.nix
../../modules/home-manager/fastfetch.nix
../../modules/home-manager/terminals/alacritty.nix
# desktop imports = [
../../modules/desktop/bluetooth.nix ./file.nix # config file out-of-store links
../../modules/desktop/hyprland-desktop.nix ./pkgs.nix # system pkgs
./services.nix # system services
# general modules
../../modules/home-manager/tmux.nix
]; ];
# You should not change this value, even if you update Home Manager. If you do # You should not change this value, even if you update Home Manager. If you do
@@ -21,65 +29,11 @@
# release notes. # release notes.
home.stateVersion = "24.11"; # Please read the comment before changing. home.stateVersion = "24.11"; # Please read the comment before changing.
nixpkgs.config.allowUnfree = true;
home.packages = with pkgs; [
audacity
android-studio
brave
brightnessctl
btop
emacs-all-the-icons-fonts
emacsPackages.pdf-tools
exfatprogs
filezilla
firefox
floorp
genymotion
ghostty
gimp
gnome-keyring
gtk4
gvfs
grim
grimblast
htop
imagemagick
kdePackages.kdenlive
keepassxc
libsForQt5.polkit-kde-agent
localsend
mpv
nautilus
networkmanagerapplet
nvtopPackages.full
nwg-look
openvpn
pamixer
pavucontrol
powertop
praat
prismlauncher
protonvpn-cli
protonvpn-gui
qbittorrent
signal-desktop
swww
texliveFull
tree
unzip
wev
wl-clipboard
xdg-user-dirs
zip
zoom-us
];
home.file = {};
home.sessionVariables = { home.sessionVariables = {
EDITOR = "emacsclient"; EDITOR = "emacsclient";
GIT_EDITOR = "nvim"; GIT_EDITOR = "nvim";
NIX_SHELL_PRESERVE_PROMPT = 1; NIX_SHELL_PRESERVE_PROMPT = 1;
NIX_CONFIG_DIR = "${cfg.homeDirectory}/personal/nixos";
}; };
nix.settings.extra-trusted-substituters = [ nix.settings.extra-trusted-substituters = [
@@ -87,9 +41,6 @@
]; ];
nix.settings.experimental-features = [ "nix-command" "flakes" ]; nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
# THEMING # THEMING
## QT SECTION ## QT SECTION
@@ -118,131 +69,17 @@
# ENV SETTINGS # ENV SETTINGS
fonts.fontconfig = {
enable = true;
};
xdg.enable = true; xdg.enable = true;
xdg.configFile = { xdg.configFile = {
"emacs" = { "emacs" = {
recursive = true; recursive = true;
source = ../../modules/non-nix_configs/emacs; source = ../../modules/non-nix_configs/emacs;
}; };
"ghostty" = {
recursive = true;
source = ../../modules/non-nix_configs/ghostty;
};
"kitty" = {
recursive = true;
source = ../../modules/non-nix_configs/kitty;
};
"nvim" = {
recursive = true;
source = ../../modules/non-nix_configs/nvim;
};
"wofi" = {
recursive = true;
source = ../../modules/non-nix_configs/wofi;
};
"user-dirs.dirs".source = ../../modules/non-nix_configs/user-dirs.dirs; "user-dirs.dirs".source = ../../modules/non-nix_configs/user-dirs.dirs;
"user-dirs.locale".source = ../../modules/non-nix_configs/user-dirs.locale; "user-dirs.locale".source = ../../modules/non-nix_configs/user-dirs.locale;
}; };
# BEGIN PROGRAMS # Let Home Manager install and manage itself.
programs = { programs.home-manager.enable = true;
bash = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
initExtra =''
if [[ -z $ORIG_SHLVL ]]; then
export ORIG_SHLVL=$SHLVL
fi;
if [[ $SHLVL -gt $ORIG_SHLVL ]]; then
export PS1='\[\e[1;m\e[1;33m\e[1;m\] ($(($SHLVL - $ORIG_SHLVL))) \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
else
export PS1='\[\e[1;m\e[1;33m\e[1;m\] \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
fi;
set -o vi
fastfetch
'';
shellAliases = {
build = "./build.sh";
emacsd = "emacs --daemon";
emacsc = "emacsclient -c -a 'emacs'";
gap = "git add -p";
gcp = "git commit -p";
kpx = "keepassxc-cli open";
ls = "ls --color=auto";
ll = "ls -l";
la = "ls -lA";
nixrebuild = "nixos-rebuild build --flake ~/personal/nixos#desktop && sudo nixos-rebuild switch --flake ~/personal/nixos#desktop";
nixbuild = "sudo nixos-rebuild switch --flake";
nixtest = "sudo nixos-rebuild test --flake";
new = "source $HOME/.bashrc";
newbar = "pkill waybar; waybar &disown";
ping = "ping -c 5";
vi = "\\vim";
work = "nix develop --impure";
".." = "cd ..";
};
};
emacs = {
enable = true;
package = pkgs.emacs-gtk;
extraPackages = epkgs: [
epkgs.pdf-tools
epkgs.org-pdftools
];
};
feh.enable = true;
git = {
enable = true;
lfs.enable = true;
diff-so-fancy.enable = true;
userEmail = "maloneliam@proton.me";
userName = "Liam Malone";
};
neovim = {
enable = true;
package = pkgs.neovim-unwrapped;
vimAlias = true;
vimdiffAlias = true;
};
obs-studio = {
enable = true;
};
wofi.enable = true;
};
# BEGIN SERVICES
services = {
blueman-applet.enable = true;
network-manager-applet.enable = true;
emacs = {
enable = true;
package = pkgs.emacs-gtk;
client = {
enable = true;
arguments = [
"-c"
"-a emacs"
];
};
startWithUserSession = "graphical";
};
gnome-keyring.enable = true;
gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
nextcloud-client.enable = true;
};
} }
+128
View File
@@ -0,0 +1,128 @@
{
pkgs,
...
}:
{
# BEGIN PACKAGES
home.packages = with pkgs; [
audacity
android-studio
bat
brave
brightnessctl
btop
emacs-all-the-icons-fonts
emacsPackages.pdf-tools
exfatprogs
fastfetch
filezilla
floorp
fzf
genymotion
gimp
gtk4
gvfs
grimblast
htop
hyprpicker
imagemagick
kdePackages.kdenlive
keepassxc
libsForQt5.polkit-kde-agent
localsend
mpv
mupdf
nautilus
networkmanagerapplet
networkmanager_dmenu
nwg-look
openvpn
overskride
pamixer
pavucontrol
powertop
prismlauncher
protonvpn-cli
pywal
qbittorrent
signal-desktop
swaynotificationcenter
swww
texliveFull
xfce.thunar
xfce.thunar-volman
tree
waybar
wev
];
# BEGIN PROGRAMS
programs = {
bash = {
enable = true;
enableCompletion = true;
enableVteIntegration = true;
initExtra =''
if [[ -z $ORIG_SHLVL ]]; then
export ORIG_SHLVL=$SHLVL
fi;
if [[ $SHLVL -gt $ORIG_SHLVL ]]; then
export PS1='\[\e[1;m\e[1;33m\e[1;m\] ($(($SHLVL - $ORIG_SHLVL))) \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
else
export PS1='\[\e[1;m\e[1;33m\e[1;m\] \W\[\e[m\e[m\] 🐧 \[\e[1;32m\]~> \[\e[m\e[m\]'
fi;
set -o vi
fastfetch
'';
shellAliases = {
build = "./build.sh";
emacsd = "emacs --daemon";
emacsc = "emacsclient -c -a 'emacs'";
gap = "git add -p";
gcp = "git commit -p";
kpx = "keepassxc-cli open";
ls = "ls --color=auto";
ll = "ls -l";
la = "ls -lA";
fastfetch = "fastfetch -c $HOME/.config/fastfetch/config.json";
nixrebuild = "nixos-rebuild build --flake ~/personal/nixos#darp8 && sudo nixos-rebuild switch --flake ~/personal/nixos#darp8";
nixbuild = "sudo nixos-rebuild switch --flake";
nixtest = "sudo nixos-rebuild test --flake";
new = "source $HOME/.bashrc";
newbar = "pkill waybar; waybar &disown";
ping = "ping -c 5";
vi = "\\vim";
work = "nix develop --impure";
".." = "cd ..";
};
};
emacs = {
enable = true;
package = pkgs.emacs-gtk;
extraPackages = epkgs: [
epkgs.pdf-tools
epkgs.org-pdftools
];
};
feh.enable = true;
git = {
enable = true;
lfs.enable = true;
diff-so-fancy.enable = true;
userEmail = "maloneliam@proton.me";
userName = "Liam Malone";
};
neovim = {
enable = true;
package = pkgs.neovim-unwrapped;
vimAlias = true;
vimdiffAlias = true;
};
obs-studio = {
enable = true;
};
wofi.enable = true;
};
}
+30
View File
@@ -0,0 +1,30 @@
{ pkgs, ... }:
{
services = {
emacs = {
enable = true;
package = pkgs.emacs-gtk;
client = {
enable = true;
arguments = [
"-c"
"-a emacs"
];
};
startWithUserSession = "graphical";
};
gpg-agent = {
enable = true;
defaultCacheTtl = 1800;
enableSshSupport = true;
};
gnome-keyring.enable = true;
mpris-proxy.enable = true;
network-manager-applet.enable = true;
nextcloud-client.enable = true;
swww.enable = true;
};
}