Skip to content

Commit

Permalink
Add config for X1 Carbon
Browse files Browse the repository at this point in the history
  • Loading branch information
joinemm committed Jan 9, 2024
1 parent 9192d2e commit 882a206
Show file tree
Hide file tree
Showing 4 changed files with 254 additions and 1 deletion.
4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@
specialArgs = {inherit inputs outputs;};
modules = [./hosts/unikie/configuration.nix];
};
X1 = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/X1/configuration.nix];
};
hetzner = inputs.nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs outputs;};
modules = [./hosts/hetzner/configuration.nix];
Expand Down
117 changes: 117 additions & 0 deletions hosts/X1/configuration.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
{
inputs,
outputs,
lib,
config,
pkgs,
...
}: let
user = "joonas";
in {
imports = lib.flatten [
(with outputs.nixosModules; [
(common {inherit user pkgs outputs;})
# (syncthing {inherit user config lib;})
(docker {inherit user;})
laptop
bluetooth
gui
work-vpn
])
# (with inputs.nixos-hardware.nixosModules; [
# common-cpu-amd
# common-cpu-amd-pstate
# common-pc-ssd
# common-gpu-amd
# ])
(import ./home.nix {inherit inputs outputs pkgs user;})
./hardware-configuration.nix
];

boot = {
# zfs requires this
# kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
# force S3 sleep mode
# kernelParams = ["mem_sleep_default=deep"];
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
};

networking = {
hostName = "buutti";
# zfs requires hostId to be set.
hostId = "c08d7d71";
};

# services.syncthing = {
# settings.folders = {
# "code".enable = true;
# "notes".enable = true;
# "pictures".enable = true;
# "work".enable = true;
# };
# };

# services.tailscale.enable = true;

# allow old electron for obsidian version <= 1.4.16"
# https://github.com/NixOS/nixpkgs/issues/273611
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
];

environment.systemPackages = lib.flatten [
(
with pkgs; [
# languages and dev tools
python3
pipenv
rustup
lua
nodejs
statix

# apps
spotify
darktable
slack
pavucontrol
pcmanfm
obsidian
dwmblocks
gimp
firefox
chromium

# cli tools
ffmpeg-full
slop
acpi
feh
fastfetch
wget
mons
file
bottom
xdotool
playerctl
pulseaudio
alsa-utils
pre-commit
wirelesstools
jq # json parser
fd # faster find
dig
rsync
glow # render markdown on the cli
xclip

# libs
libnotify
]
)
inputs.bin.all
];
}
132 changes: 132 additions & 0 deletions hosts/X1/home.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
{
inputs,
outputs,
pkgs,
user,
...
}: let
homeDir = "/home/${user}";
in {
imports = [
inputs.home-manager.nixosModules.home-manager
];

home-manager.users."${user}" = {
imports = pkgs.lib.flatten [
(with outputs.homeManagerModules; [
common
xresources
(neovim {inherit pkgs user;})
zsh
wezterm
xinitrc
picom
git
ssh-personal
ssh-work
dunst
hidpi
rofi
discord
])
inputs.nixvim.homeManagerModules.nixvim
inputs.nix-index-database.hmModules.nix-index
];

home = {
packages = with pkgs; [
qogir-icon-theme
dracula-theme
xsecurelock
];

pointerCursor = {
package = pkgs.qogir-icon-theme;
name = "Qogir";
x11.enable = true;
gtk.enable = true;
};
};

xdg = {
enable = true;
userDirs = {
enable = true;
desktop = homeDir;
templates = homeDir;
publicShare = homeDir;
documents = "${homeDir}/documents";
download = "${homeDir}/downloads";
music = "${homeDir}/music";
pictures = "${homeDir}/pictures";
videos = "${homeDir}/videos";
};
};

gtk = {
enable = true;
theme.name = "Dracula";
iconTheme.name = "Qogir";
};

services = {
flameshot = {
enable = true;
settings = {
General = {
disabledTrayIcon = true;
showStartupLaunchMessage = false;
savePath = "${homeDir}/pictures/screenshots";
};
};
};

redshift = {
enable = true;
tray = true;
dawnTime = "6:00-8:00";
duskTime = "22:00-23:30";
temperature = {
day = 6500;
night = 3300;
};
};

easyeffects.enable = true;
batsignal.enable = true;
udiskie.enable = true;
};

programs = {
starship = {
enable = true;
settings = {
add_newline = true;
battery.disabled = true;
git_metrics.disabled = false;
directory.repo_root_style = "bold underline italic blue";
};
};

imv = {
enable = true;
settings = {
options = {
overlay_font = "monospace:10";
overlay = true;
overlay_position_bottom = true;
};
binds = {
"w" = "exec setbg $imv_current_file";
"<comma>" = "prev_frame";
};
};
};

yazi = {
enable = true;
enableZshIntegration = true;
};
};
};
}
2 changes: 1 addition & 1 deletion modules/common.nix
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
};

console = {
font = "ter-v32n";
font = "ter-v32b";
packages = [pkgs.terminus_font];
};

Expand Down

0 comments on commit 882a206

Please sign in to comment.