From 89f570a6178b0a41fe5a5773cd9b65eb248b7758 Mon Sep 17 00:00:00 2001 From: Jack Mechem Date: Sun, 30 Nov 2025 19:53:25 -0800 Subject: [PATCH] Added desktop config (incomplete) --- flake.nix | 29 +++++--- hosts/desktop/configuration.nix | 72 +++++++++++++++++++ hosts/desktop/home.nix | 119 ++++++++++++++++++++++++++++++++ 3 files changed, 210 insertions(+), 10 deletions(-) create mode 100644 hosts/desktop/configuration.nix create mode 100644 hosts/desktop/home.nix diff --git a/flake.nix b/flake.nix index 601571b..30f3030 100755 --- a/flake.nix +++ b/flake.nix @@ -18,15 +18,24 @@ }; }; - outputs = { self, nixpkgs, ... }@inputs: { - # use "nixos", or your hostname as the name of the configuration - # it's a better practice than "default" shown in the video - nixosConfigurations.t480 = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/t480/configuration.nix - inputs.home-manager.nixosModules.default - ]; + outputs = + { self, nixpkgs, ... }@inputs: + { + # use "nixos", or your hostname as the name of the configuration + # it's a better practice than "default" shown in the video + nixosConfigurations.t480 = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/t480/configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; + nixosConfigurations.desktop = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/desktop/configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; }; - }; } diff --git a/hosts/desktop/configuration.nix b/hosts/desktop/configuration.nix new file mode 100644 index 0000000..d4f9308 --- /dev/null +++ b/hosts/desktop/configuration.nix @@ -0,0 +1,72 @@ +{ + config, + lib, + pkgs, + inputs, + ... +}: + +{ + imports = [ + ./hardware-configuration.nix + inputs.home-manager.nixosModules.default + ../../modules/nixos/gtkapps.nix + ../../modules/nixos/gtkbar.nix + ../../modules/nixos/fonts.nix + ../../modules/nixos/system-packages.nix + ../../modules/nixos/user-jack.nix + ../../modules/nixos/sound.nix + ]; + + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + boot.kernelPackages = pkgs.linuxPackages_latest; + + networking.hostName = "jackdesk"; + networking.networkmanager.enable = true; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + time.timeZone = "America/Los_Angeles"; + + # Enable CUPS to print documents. + services.printing.enable = true; + + services.dbus.enable = true; + + programs.zsh.enable = true; + + programs.thunar.enable = true; + + programs.dconf.enable = true; + + nixpkgs.config.allowUnfree = true; + + xdg.portal = { + enable = true; + wlr.enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-hyprland + xdg-desktop-portal-gnome + ]; + }; + + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + "jack" = import ./home.nix; + }; + }; + + services.libinput.enable = true; + + services.openssh.enable = true; + + system.stateVersion = "25.05"; + +} diff --git a/hosts/desktop/home.nix b/hosts/desktop/home.nix new file mode 100644 index 0000000..8257d12 --- /dev/null +++ b/hosts/desktop/home.nix @@ -0,0 +1,119 @@ +{ + config, + pkgs, + inputs, + ... +}: + +{ + + imports = [ + inputs.zen-browser.homeModules.twilight + ../../modules/home-manager/zsh.nix + ../../modules/home-manager/tmux.nix + ../../modules/home-manager/hyprland.nix + ../../modules/home-manager/homepackages.nix + ../../modules/home-manager/shell-aliases.nix + ]; + + programs.home-manager.enable = true; + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "jack"; + home.homeDirectory = "/home/jack"; + + home.stateVersion = "25.05"; # Please read the comment before changing. + + programs.zen-browser.enable = true; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { }; + + nixpkgs = { + config = { + allowUnfree = true; + allowUnfreePredicate = (_: true); + }; + }; + + gtk = { + enable = true; + + theme = { + name = "Kanagawa-B"; + package = pkgs.kanagawa-gtk-theme; + }; + + iconTheme = { + name = "Papirus-Dark"; + package = pkgs.papirus-icon-theme; + }; + }; + + home.pointerCursor = { + gtk.enable = true; + x11.enable = true; + name = "capitaine-cursors"; + package = pkgs.capitaine-cursors; + size = 32; # optional, adjust as needed + }; + + xdg.configFile = { + "gtk-4.0/assets".source = + "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/assets"; + "gtk-4.0/gtk.css".source = + "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk.css"; + "gtk-4.0/gtk-dark.css".source = + "${config.gtk.theme.package}/share/themes/${config.gtk.theme.name}/gtk-4.0/gtk-dark.css"; + }; + + programs.ghostty = { + enable = true; + + # If you're on a channel/flake that has ghostty packaged: + # comment this out if you install ghostty some other way + package = pkgs.ghostty; + + settings = { + # ----- basic look ----- + "font-family" = "JetBrainsMono Nerd Font"; + "font-size" = 14; + + "window-padding-x" = 8; + "window-padding-y" = 8; + + # ----- your theme ----- + # repeated keys like `palette` become a list + palette = [ + "0=#181616" + "1=#c4746e" + "2=#8a9a7b" + "3=#c4b28a" + "4=#8ba4b0" + "5=#a292a3" + "6=#8ea4a2" + "7=#bcb093" + "8=#a6a69c" + "9=#e46876" + "10=#87a987" + "11=#6c8384" + "12=#7fb4ca" + "13=#938aa9" + "14=#7aa89f" + "15=#c5c9c5" + ]; + + background = "#181616"; + foreground = "#c5c9c5"; + "cursor-color" = "#c8c093"; + "selection-background" = "#2d4f67"; + "selection-foreground" = "#c8c093"; + }; + }; + + home.sessionVariables = { + EDITOR = "nvim"; + }; + +}