From 2cea6a19861c87bc28afaf1ec4bfdfcc4e6a9ed7 Mon Sep 17 00:00:00 2001 From: jgrogan Date: Wed, 9 Jul 2025 09:06:39 +0100 Subject: [PATCH 1/5] Add terraform mode --- emacs/.emacs.d/modules/jg-dev.el | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emacs/.emacs.d/modules/jg-dev.el b/emacs/.emacs.d/modules/jg-dev.el index be5d6fd..7b828aa 100644 --- a/emacs/.emacs.d/modules/jg-dev.el +++ b/emacs/.emacs.d/modules/jg-dev.el @@ -96,6 +96,9 @@ (use-package yaml-mode :ensure t) +(use-package terraform-mode + :ensure t) + (use-package nix-mode :mode "\\.nix\\'") From 4c15a972e62178640d3c34ec0c6526cc95eeff58 Mon Sep 17 00:00:00 2001 From: jgrogan Date: Wed, 9 Jul 2025 09:17:20 +0100 Subject: [PATCH 2/5] Add initial nix config --- nix/configuration.nix | 31 +++++++++++++++++++ nix/flake.lock | 70 +++++++++++++++++++++++++++++++++++++++++++ nix/flake.nix | 25 ++++++++++++++++ nix/home.nix | 69 ++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 195 insertions(+) create mode 100644 nix/configuration.nix create mode 100644 nix/flake.lock create mode 100644 nix/flake.nix create mode 100644 nix/home.nix diff --git a/nix/configuration.nix b/nix/configuration.nix new file mode 100644 index 0000000..c1ca063 --- /dev/null +++ b/nix/configuration.nix @@ -0,0 +1,31 @@ +{ pkgs, ... }: + +{ + # List packages installed in system profile. To search by name, run: + # $ nix-env -qaP | grep wget + environment.systemPackages = + [ + pkgs.vim + ]; + + # Necessary for using flakes on this system. + nix.settings.experimental-features = "nix-command flakes"; + + # Enable alternative shell support in nix-darwin. + programs.zsh.enable = true; + + # Set Git commit hash for darwin-version. + # system.configurationRevision = self.rev or self.dirtyRev or null; + + # Used for backwards compatibility, please read the changelog before changing. + # $ darwin-rebuild changelog + system.stateVersion = 6; + + # The platform the configuration will be used on. + nixpkgs.hostPlatform = "aarch64-darwin"; + + users.users.jgrogan = { + name = "jgrogan"; + home = "/Users/jgrogan";}; +} + diff --git a/nix/flake.lock b/nix/flake.lock new file mode 100644 index 0000000..924d4c0 --- /dev/null +++ b/nix/flake.lock @@ -0,0 +1,70 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751824240, + "narHash": "sha256-aDDC0CHTlL7QDKWWhdbEgVPK6KwWt+ca0QkmHYZxMzI=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "fd9e55f5fac45a26f6169310afca64d56b681935", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "nix-darwin": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1751313918, + "narHash": "sha256-HsJM3XLa43WpG+665aGEh8iS8AfEwOIQWk3Mke3e7nk=", + "owner": "nix-darwin", + "repo": "nix-darwin", + "rev": "e04a388232d9a6ba56967ce5b53a8a6f713cdfcf", + "type": "github" + }, + "original": { + "owner": "nix-darwin", + "ref": "master", + "repo": "nix-darwin", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1751949589, + "narHash": "sha256-mgFxAPLWw0Kq+C8P3dRrZrOYEQXOtKuYVlo9xvPntt8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9b008d60392981ad674e04016d25619281550a9d", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nix-darwin": "nix-darwin", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix/flake.nix b/nix/flake.nix new file mode 100644 index 0000000..fc5718c --- /dev/null +++ b/nix/flake.nix @@ -0,0 +1,25 @@ +{ + description = "Darwin system config"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; + nix-darwin.url = "github:nix-darwin/nix-darwin/master"; + nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; + home-manager.url = "github:nix-community/home-manager"; + home-manager.inputs.nixpkgs.follows = "nixpkgs"; + }; + + outputs = inputs@{ self, home-manager, nix-darwin, nixpkgs }: { + # Build darwin flake using: + # $ darwin-rebuild build --flake .#616-jgrogan + darwinConfigurations."616-jgrogan" = nix-darwin.lib.darwinSystem { + modules = [ ./configuration.nix + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.jgrogan = ./home.nix; } + ]; + }; + }; +} diff --git a/nix/home.nix b/nix/home.nix new file mode 100644 index 0000000..05099d2 --- /dev/null +++ b/nix/home.nix @@ -0,0 +1,69 @@ +{ config, pkgs, ... }: + +{ + # Home Manager needs a bit of information about you and the paths it should + # manage. + + # This value determines the Home Manager release that your configuration is + # compatible with. This helps avoid breakage when a new Home Manager release + # introduces backwards incompatible changes. + # + # You should not change this value, even if you update Home Manager. If you do + # want to update the value, then make sure to first check the Home Manager + # release notes. + home.stateVersion = "25.05"; # Please read the comment before changing. + + # The home.packages option allows you to install Nix packages into your + # environment. + home.packages = [ + # # Adds the 'hello' command to your environment. It prints a friendly + # # "Hello, world!" when run. + # pkgs.hello + + # # It is sometimes useful to fine-tune packages, for example, by applying + # # overrides. You can do that directly here, just don't forget the + # # parentheses. Maybe you want to install Nerd Fonts with a limited number of + # # fonts? + # (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; }) + + # # You can also create simple shell scripts directly inside your + # # configuration. For example, this adds a command 'my-hello' to your + # # environment: + # (pkgs.writeShellScriptBin "my-hello" '' + # echo "Hello, ${config.home.username}!" + # '') + ]; + programs.zsh.enable = true; + + # Home Manager is pretty good at managing dotfiles. The primary way to manage + # plain files is through 'home.file'. + home.file = { + # # Building this configuration will create a copy of 'dotfiles/screenrc' in + # # the Nix store. Activating the configuration will then make '~/.screenrc' a + # # symlink to the Nix store copy. + # ".screenrc".source = dotfiles/screenrc; + + # # You can also set the file content immediately. + # ".gradle/gradle.properties".text = '' + # org.gradle.console=verbose + # org.gradle.daemon.idletimeout=3600000 + # ''; + }; + + # You can also manage environment variables but you will have to manually + # source + # + # ~/.nix-profile/etc/profile.d/hm-session-vars.sh + # + # or + # + # /etc/profiles/per-user/davish/etc/profile.d/hm-session-vars.sh + # + # if you don't want to manage your shell through Home Manager. + home.sessionVariables = { + # EDITOR = "emacs"; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; +} From ee4c79e5bcfcfe4c2ab8f63479a347981ab0147f Mon Sep 17 00:00:00 2001 From: jgrogan Date: Sun, 13 Jul 2025 19:56:26 +0100 Subject: [PATCH 3/5] Add greetd --- guix/config.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/guix/config.scm b/guix/config.scm index e4d63be..e3f8000 100755 --- a/guix/config.scm +++ b/guix/config.scm @@ -81,7 +81,11 @@ (services (append (modify-services %desktop-services - (delete gdm-service-type)) + (delete gdm-service-type) + (delete login-service-type) + (delete mingetty-service-type) + (delete console-font-service-type) + ) ;; Configure swaylock (list (service screen-locker-service-type (screen-locker-configuration @@ -89,6 +93,21 @@ (program (file-append swaylock "/bin/swaylock")) (using-pam? #t) (using-setuid? #f))) + + (service greetd-service-type + (greetd-configuration + (greeter-supplementary-groups (list "video" "input")) + (terminals + (list + ;; TTY1 is the graphical login screen for Sway + (greetd-terminal-configuration + (terminal-vt "1") + (terminal-switch #t) + (default-session-command (greetd-wlgreet-sway-session)) + ) + + (greetd-terminal-configuration (terminal-vt "2")) + (greetd-terminal-configuration (terminal-vt "3")))))) ))) From 47497e3b2735bb4b361f7fa65d2c8476a9f2c3bc Mon Sep 17 00:00:00 2001 From: jgrogan Date: Mon, 14 Jul 2025 09:11:35 +0100 Subject: [PATCH 4/5] Adjust nix config --- amethyst/.amethyst.yml | 4 ++-- nix/configuration.nix | 3 +++ nix/home.nix | 12 ++++++------ 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/amethyst/.amethyst.yml b/amethyst/.amethyst.yml index 2808e17..d179268 100644 --- a/amethyst/.amethyst.yml +++ b/amethyst/.amethyst.yml @@ -15,9 +15,9 @@ # layouts - Ordered list of layouts to use by layout key (default tall, wide, fullscreen, and column). layouts: - - 3column-left - tall - fullscreen + - 3column-left # - tall-right - wide # - two-pane @@ -273,7 +273,7 @@ float-small-windows: true mouse-follows-focus: false # true if the windows underneath the mouse should become focused as the mouse moves (default false). Note that this is largely incompatible with mouse-follows-focus -focus-follows-mouse: true +focus-follows-mouse: false # true if dragging and dropping windows on to each other should swap their positions (default false). mouse-swaps-windows: false diff --git a/nix/configuration.nix b/nix/configuration.nix index c1ca063..054b2d0 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -6,6 +6,9 @@ environment.systemPackages = [ pkgs.vim + pkgs.wget + pkgs.git + pkgs.htop ]; # Necessary for using flakes on this system. diff --git a/nix/home.nix b/nix/home.nix index 05099d2..e127d5e 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -1,8 +1,6 @@ { config, pkgs, ... }: { - # Home Manager needs a bit of information about you and the paths it should - # manage. # This value determines the Home Manager release that your configuration is # compatible with. This helps avoid breakage when a new Home Manager release @@ -16,9 +14,11 @@ # The home.packages option allows you to install Nix packages into your # environment. home.packages = [ - # # Adds the 'hello' command to your environment. It prints a friendly - # # "Hello, world!" when run. - # pkgs.hello + pkgs.graphviz + pkgs.jq + pkgs.hunspell + pkgs.pandoc + pkgs.stow # # It is sometimes useful to fine-tune packages, for example, by applying # # overrides. You can do that directly here, just don't forget the @@ -61,7 +61,7 @@ # # if you don't want to manage your shell through Home Manager. home.sessionVariables = { - # EDITOR = "emacs"; + EDITOR = "vim"; }; # Let Home Manager install and manage itself. From 6d68026ebbb9ac61b4f0573af8ac2c84348f7106 Mon Sep 17 00:00:00 2001 From: jgrogan Date: Mon, 14 Jul 2025 09:32:17 +0100 Subject: [PATCH 5/5] Update zsh completions --- nix/configuration.nix | 2 ++ nix/home.nix | 22 ++++++++++------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/nix/configuration.nix b/nix/configuration.nix index 054b2d0..94dd0d5 100644 --- a/nix/configuration.nix +++ b/nix/configuration.nix @@ -11,6 +11,8 @@ pkgs.htop ]; + environment.pathsToLink = [ "/share/zsh" ]; + # Necessary for using flakes on this system. nix.settings.experimental-features = "nix-command flakes"; diff --git a/nix/home.nix b/nix/home.nix index e127d5e..fccc482 100644 --- a/nix/home.nix +++ b/nix/home.nix @@ -1,18 +1,8 @@ { config, pkgs, ... }: { + home.stateVersion = "25.05"; - # This value determines the Home Manager release that your configuration is - # compatible with. This helps avoid breakage when a new Home Manager release - # introduces backwards incompatible changes. - # - # You should not change this value, even if you update Home Manager. If you do - # want to update the value, then make sure to first check the Home Manager - # release notes. - home.stateVersion = "25.05"; # Please read the comment before changing. - - # The home.packages option allows you to install Nix packages into your - # environment. home.packages = [ pkgs.graphviz pkgs.jq @@ -33,7 +23,15 @@ # echo "Hello, ${config.home.username}!" # '') ]; - programs.zsh.enable = true; + programs.zsh = { + enable = true; + enableCompletion = true; + autosuggestion.enable = true; + syntaxHighlighting.enable = true; + + sessionVariables = {CLICOLOR = 1;}; + shellAliases = {pyact = "source .venv/bin/activate";}; + }; # Home Manager is pretty good at managing dotfiles. The primary way to manage # plain files is through 'home.file'.