Compare commits

..

3 Commits

Author SHA1 Message Date
4c9ae7b556 base/home: Various improvements
zsh: nd-alias
alacritty: fix borders
base: add some default apps (file, zip, htop, etc.)
2024-05-29 14:47:01 +02:00
585dc252cc edison: various desktop changes 2024-05-29 14:47:01 +02:00
67755aa4a0 edison: add email client 2024-05-29 14:47:01 +02:00
12 changed files with 207 additions and 64 deletions

View File

@ -42,16 +42,23 @@
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
bat bat
bottom bottom
duf
eza eza
file
git git
gnugrep gnugrep
gnutar gnutar
htop
neofetch
nix-output-monitor
p7zip
python3 python3
ripgrep ripgrep
rsync rsync
screen screen
unzip unzip
wget wget
zip
]; ];
services.openssh = { services.openssh = {

View File

@ -9,10 +9,12 @@
window = { window = {
padding = { padding = {
x = 4; x = 8;
y = 4; y = 2;
}; };
dynamic_padding = true;
decorations = "none"; # full/none/transparent/buttonless decorations = "none"; # full/none/transparent/buttonless
# Transparency: # Transparency:

View File

@ -47,6 +47,7 @@
s = "nix-shell --run zsh"; s = "nix-shell --run zsh";
sp = "nix-shell --run zsh -p"; sp = "nix-shell --run zsh -p";
spu = "nix-shell -I nixpkgs=channel:nixos-unstable --run zsh -p"; spu = "nix-shell -I nixpkgs=channel:nixos-unstable --run zsh -p";
nd = "nix develop --command zsh";
em = "emacsclient -c"; em = "emacsclient -c";
emnw = "emacsclient -nw"; emnw = "emacsclient -nw";
gst = "git status -sb"; gst = "git status -sb";

View File

@ -6,10 +6,11 @@
../../base.nix ../../base.nix
../../common/metrics-exporters.nix ../../common/metrics-exporters.nix
./hardware-configuration.nix ./hardware-configuration.nix
./desktop.nix ./desktop
]; ];
virtualisation.docker.enable = true; virtualisation.docker.enable = true;
systemd.coredump.enable = true;
networking = { networking = {
hostName = "edison"; hostName = "edison";
@ -29,14 +30,19 @@
environment.variables = { EDITOR = "vim"; }; environment.variables = { EDITOR = "vim"; };
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
pavucontrol discord
gimp
gparted gparted
openvpn
pavucontrol
unstable.element-desktop
unstable.hydrus unstable.hydrus
]; ];
programs.steam.enable = true; programs.steam.enable = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"discord"
"nvidia-x11" "nvidia-x11"
"nvidia-settings" "nvidia-settings"
"steam" "steam"

View File

@ -1,58 +0,0 @@
{ config, pkgs, lib, ... }:
{
services.xserver = {
enable = true;
desktopManager.xfce.enable = true;
videoDrivers = [ "nvidia" ];
layout = "us,no";
xkbVariant = "intl";
};
services.openssh.settings.X11Forwarding = true;
environment.systemPackages = with pkgs; [
xfce.xfce4-pulseaudio-plugin
];
services.picom.enable = true;
hardware.opengl.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
fonts = {
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
};
# Remote:
services.xrdp = {
enable = true;
defaultWindowManager = "xfce4-session";
openFirewall = true;
};
security.polkit.enable = true;
services.flatpak.enable = true;
users.users."felixalb".packages = [ pkgs.flatpak ];
xdg.portal = {
enable = true;
extraPortals = [ pkgs.xdg-desktop-portal-gtk ];
};
}

View File

@ -0,0 +1,91 @@
{ config, pkgs, lib, ... }:
{
imports = [
./remote.nix
./gnome.nix
./xfce.nix
];
services.xserver = {
enable = true;
displayManager.gdm = {
enable = true;
wayland = true;
};
videoDrivers = [ "nvidia" ];
xkbOptions = "ctrl:nocaps";
layout = "no,us";
xkbVariant = "intl";
};
#hardware.nvidia.modesetting.enable = true; # TODO: Fix this. Steam crashes, and textures/fonts unload when suspended.
hardware.keyboard.zsa.enable = true;
environment.sessionVariables.NIXOS_OZONE_WL = "1";
environment.systemPackages = with pkgs; [
xclip
];
hardware.opengl.enable = true;
# Audio
services.pipewire = {
enable = true;
alsa.enable = true;
pulse.enable = true;
jack.enable = true;
};
hardware.pulseaudio.enable = false;
# Fonts
fonts = {
fontDir.enable = true;
packages = with pkgs; [
noto-fonts
noto-fonts-emoji
noto-fonts-cjk-sans
font-awesome
fira-code
hack-font
(nerdfonts.override {
fonts = [
"Hack"
];
})
];
};
# Dark mode
home-manager.users.felixalb = {
dconf.settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
};
};
qt = {
enable = true;
platformTheme = "gnome";
style = "adwaita-dark";
};
# Misc:
xdg.portal = {
enable = true;
wlr.enable = true;
};
location.provider = "geoclue2";
security.polkit.enable = true;
services.flatpak.enable = true;
services.redshift.enable = true;
users.users."felixalb".packages = [ pkgs.flatpak ];
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }:
{
services.xserver.desktopManager.gnome.enable = true;
environment.systemPackages = with pkgs; [
gnomeExtensions.appindicator
gnome.adwaita-icon-theme
];
services.udev.packages = with pkgs; [ gnome.gnome-settings-daemon ];
programs.dconf.enable = true;
}

View File

@ -0,0 +1,12 @@
{ config, pkgs, lib, ... }:
{
# Microsoft-style Remote Desktop:
services.xrdp = {
enable = true;
defaultWindowManager = "xfce4-session"; # Avoid fancy animations, no hyprland/GNOME!
openFirewall = true;
};
# X window forwarding with `ssh -Y`
services.openssh.settings.X11Forwarding = true;
}

View File

@ -0,0 +1,10 @@
{ config, pkgs, lib, ... }:
{
services.xserver = {
desktopManager.xfce.enable = true;
};
environment.systemPackages = with pkgs; [
xfce.xfce4-pulseaudio-plugin
];
}

52
hosts/edison/email.nix Normal file
View File

@ -0,0 +1,52 @@
{ config, pkgs, lib, ... }:
{
programs.neomutt = {
enable = true;
sidebar = {
enable = true;
width = 30;
};
sort = "reverse-threads";
vimKeys = true;
checkStatsInterval = 60;
};
programs.mbsync.enable = true;
programs.notmuch = {
enable = true;
hooks = {
preNew = "mbsync --all";
};
};
# programs.msmtp.enable = true;
accounts.email = {
accounts.felix-albrigtsen-it = rec {
address = "felix@albrigtsen.it";
userName = address;
primary = true;
realName = "Felix Albrigtsen";
signature = {
text = ''
Med vennlig hilsen
${realName}
'';
showSignature = "append";
};
imap.host = "imap.migadu.com";
smtp.host = "smtp.migadu.com";
passwordCommand = "cat ~/.secrets/email/migadu"; # yolo / TODO
mbsync = {
enable = true;
create = "maildir"; # Create subfolders locally
# expugne = "both";
};
msmtp.enable = true;
notmuch.enable = true;
neomutt.enable = true;
};
};
}

View File

@ -2,10 +2,21 @@
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
nix-index nix-index
]; unstable.snicat
python3
] ++ (with python3Packages; [
beautifulsoup4
numpy
pillow
pwntools
pycryptodome
requests
]);
imports = [ imports = [
./../../home/base.nix ./../../home/base.nix
./email.nix
]; ];
programs = { programs = {

View File

@ -53,7 +53,6 @@ in { pkgs ? import <nixpkgs> {} }:
gdb gdb
pwndbg pwndbg
ropgadget ropgadget
ropper
wireshark wireshark
tcpdump tcpdump
]; ];