From 6c9e26377c266343f6b586f14a77c45f34bd0395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=B6ger?= Date: Thu, 3 Apr 2025 01:25:04 +0200 Subject: [PATCH] Home Gen487 @ 2025-03-22-20:32 --- flake.nix | 29 +++++++- home/{jonas.nix => jonas@comfy-station.nix} | 0 home/jonas@jroeger.de.nix | 39 +++++++++++ hosts/jroeger.de/configuration.nix | 73 +++++++++++++++++++++ modules/derivations/antlrworks.nix | 35 ---------- modules/programs.nix | 5 -- 6 files changed, 139 insertions(+), 42 deletions(-) rename home/{jonas.nix => jonas@comfy-station.nix} (100%) create mode 100644 home/jonas@jroeger.de.nix create mode 100644 hosts/jroeger.de/configuration.nix delete mode 100644 modules/derivations/antlrworks.nix diff --git a/flake.nix b/flake.nix index a442d12..b71b1db 100644 --- a/flake.nix +++ b/flake.nix @@ -56,6 +56,16 @@ ./hosts/comfy-station/configuration.nix ]; }; + "jroeger.de" = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { + inherit inputs; + }; + modules = [ + ({...}: {nixpkgs.overlays = [overlay-unstable];}) + ./hosts/jroeger.de/configuration.nix + ]; + }; vm = nixpkgs.lib.nixosSystem { inherit system; specialArgs = { @@ -66,7 +76,7 @@ ]; }; }; - homeConfigurations."jonas" = home-manager.lib.homeManagerConfiguration { + homeConfigurations."jonas@comfy-station" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.${system}; # Specify your home configuration modules here, for example, @@ -76,7 +86,22 @@ ({...}: {nixpkgs.config.allowUnfree = true;}) inputs.plasma-manager.homeManagerModules.plasma-manager inputs.sops-nix.homeManagerModules.sops - ./home/jonas.nix + (./home + "/jonas@comfy-station.nix") + ]; + + # Optionally use extraSpecialArgs + # to pass through arguments to home.nix + extraSpecialArgs = {inherit inputs;}; + }; + homeConfigurations."jonas@jroeger.de" = home-manager.lib.homeManagerConfiguration { + pkgs = nixpkgs.legacyPackages.${system}; + + # Specify your home configuration modules here, for example, + # the path to your home.nix. + modules = [ + ({...}: {nixpkgs.overlays = [overlay-unstable];}) + ({...}: {nixpkgs.config.allowUnfree = true;}) + (./home + "/jonas@jroeger.de.nix") ]; # Optionally use extraSpecialArgs diff --git a/home/jonas.nix b/home/jonas@comfy-station.nix similarity index 100% rename from home/jonas.nix rename to home/jonas@comfy-station.nix diff --git a/home/jonas@jroeger.de.nix b/home/jonas@jroeger.de.nix new file mode 100644 index 0000000..47e9fd6 --- /dev/null +++ b/home/jonas@jroeger.de.nix @@ -0,0 +1,39 @@ +{...}: { + imports = [ + ../modules/home/ranger + ../modules/home/zsh + ]; + + # Home Manager needs a bit of information about you and the paths it should + # manage. + home.username = "jonas"; + home.homeDirectory = "/home/jonas"; + + # 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 = "24.11"; # Please read the comment before changing. + + home.sessionVariables = { + EDITOR = "vim"; + }; + + # Let Home Manager install and manage itself. + programs.home-manager.enable = true; + + # Git + programs.git = { + enable = true; + userName = "Jonas Röger"; + userEmail = "jonas.roeger@tu-dortmund.de"; + difftastic.enable = true; + signing = { + signByDefault = true; + key = "4000EB35E1AE0F07"; + }; + }; +} diff --git a/hosts/jroeger.de/configuration.nix b/hosts/jroeger.de/configuration.nix new file mode 100644 index 0000000..799675c --- /dev/null +++ b/hosts/jroeger.de/configuration.nix @@ -0,0 +1,73 @@ +{pkgs, ...}: { + imports = [ + # Include the results of the hardware scan. + # ./hardware-configuration.nix + ]; + + # Configure nix and garbage collection + nix = { + settings = { + experimental-features = ["nix-command" "flakes"]; + auto-optimise-store = true; + }; + gc = { + automatic = true; + dates = "weekly"; + options = "--delete-older-than 30d"; + }; + }; + + users.users.jonas = { + isNormalUser = true; + description = "Jonas"; + extraGroups = ["wheel" "docker"]; + openssh.authorizedKeys.keys = [ + "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCyCyYsMSiy7shcehlzJEbCyRiHk+cicFB35Bc2uc4PjjkCjswLh01fRAV2QcplrNkH/5F4GBTbOoZHHc7/AVLyUxgwDC9ffD2i7fevuGpfBFy9D30uz6jDekxXkmRmIlidXLdG1Fh4zwVejGlwdhUu/Zb7PonO/dktx3EFdf1SpnW+y75anN85zoGsld7KQk42wEd0zXtCgx4CKI6Vvt6heWCEiJ9wyw1sLpTJr4H8In236CUj1/r1qY9Gfa8n9NA0J9XCpcwSCEWGRKQNicoQIpnp5txrgzaUq4r6qBKHmImYXmSTVnDZ9dJLRYNu2lDvBtTXP4ztlR6Lpxs873fPg51qgaX9rRVMMo/gGjq8fOFWsDVaJZab9VY3hZYNCKIbWFqo4GKyCQs9Xfzr2AUACm09HWiYMTefwEypOzvUb4z+LF2B/0c5XmghLF/TOzLVgDXzAgWMH4mCnPh9EDLHTtoJaGNURler9VRV8yQyLH6oK9UpHZovCFs7HpFN+WPv2QVFfkK8aHg7tnklFsT78z154bjuspiEI/fFGmTxoQUGufmHlRy/9GQDusgNfe24ZEB2hHBVjKv29XdIfvFAhoPVpA6+O/N3feSlmVISaU+8QraVQEf/TuQjopDUWpJTmqSxKvQSTPwcyWDy6NtcJ85bGAu6jSUGC3ouH4Rb2Q== cardno:000609618602" + ]; + }; + users.defaultUserShell = pkgs.zsh; + + programs.zsh.enable = true; + + services.openssh = { + enable = true; + settings.PasswordAuthentication = false; + settings.KbdInteractiveAuthentication = false; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + # This value determines the NixOS release from which the default + # settings for stateful data, like file locations and database versions + # on your system were taken. It‘s perfectly fine and recommended to leave + # this value at the release version of the first install of this system. + # Before changing this value read the documentation for this option + # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). + system.stateVersion = "24.11"; # Did you read the comment? + + # Set your time zone. + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "de_DE.UTF-8"; + LC_IDENTIFICATION = "de_DE.UTF-8"; + LC_MEASUREMENT = "de_DE.UTF-8"; + LC_MONETARY = "de_DE.UTF-8"; + LC_NAME = "de_DE.UTF-8"; + LC_NUMERIC = "de_DE.UTF-8"; + LC_PAPER = "de_DE.UTF-8"; + LC_TELEPHONE = "de_DE.UTF-8"; + LC_TIME = "de_DE.UTF-8"; + }; + console.keyMap = "de"; + + networking.fqdn = "jroeger.de"; + + # Enable networking + networking.networkmanager.enable = true; + + networking.firewall.enable = false; +} diff --git a/modules/derivations/antlrworks.nix b/modules/derivations/antlrworks.nix deleted file mode 100644 index d8a3b18..0000000 --- a/modules/derivations/antlrworks.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - pkgs ? import {}, - version ? "1.5.2", - hash ? "sha256-Yy9x7cSQrRpk+Flt9+H7gdogUS4WR2q2fqdVXQgvd7Y=", - jre ? pkgs.jre, - ... -}: let - drv = pkgs.stdenv.mkDerivation { - pname = "antlrworks"; - inherit version; - - dontUnpack = true; - src = pkgs.fetchurl { - url = "https://github.com/antlr/website-antlr3/raw/refs/heads/gh-pages/download/antlrworks-${version}-complete.jar"; - inherit hash; - }; - - installPhase = '' - mkdir -p $out/share/java - cp $src $out/share/java/antlrworks-${version}-complete.jar - mkdir $out/bin - cat > $out/bin/antlrworks <