diff --git a/flake.nix b/flake.nix index aeec165..3e5df02 100644 --- a/flake.nix +++ b/flake.nix @@ -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]; diff --git a/hosts/X1/configuration.nix b/hosts/X1/configuration.nix new file mode 100644 index 0000000..41e62ff --- /dev/null +++ b/hosts/X1/configuration.nix @@ -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 + ]; +} diff --git a/hosts/X1/home.nix b/hosts/X1/home.nix new file mode 100644 index 0000000..a6b4303 --- /dev/null +++ b/hosts/X1/home.nix @@ -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"; + "" = "prev_frame"; + }; + }; + }; + + yazi = { + enable = true; + enableZshIntegration = true; + }; + }; + }; +} diff --git a/modules/common.nix b/modules/common.nix index 0170e6f..677de8b 100644 --- a/modules/common.nix +++ b/modules/common.nix @@ -63,7 +63,7 @@ }; console = { - font = "ter-v32n"; + font = "ter-v32b"; packages = [pkgs.terminus_font]; };