+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanEnable motd25665e9

main
3.3 KiB98 linesraw
1{ pkgs, inputs, lib, config, self, ... } @ args: {
2  home.packages = with pkgs; [
3    # Utils
4    ripgrep fd eza sd doggo ouch xh dl rbw pinentry-curses hyperfine heh tokei
5    zellij zeco tty-share teamtype rsync magic-wormhole-rs bore-cli cached-path
6    zstd pv sshping mdcat rage exiftool resvg get-keys vivid
7    ascii unicode-paracode sequin tty-share micro chafa pipe-rename osc # scooter
8    # Munge
9    jq pup choose datamash numbat lowcharts d-rs mawk csvlens fx # xan tabiew
10    # System info
11    btop procs smartmontools duf gdu diskus dust
12    # Nix
13    nix home-manager nh nix-output-monitor nix-tree nix-diff nil comma ragenix
14    # Scripting tools
15    stylua lua-language-server shfmt shellcheck fish-lsp
16    # Fun
17    blahaj gay lolcat fortune cowsay neo tmatrix sl pipes ascii-rain pastel tab
18    pokedex ttyper solitaire-tui nethack
19  ];
20
21  programs = {
22    helix = { enable = true; settings = lib.mkForce {}; };
23    bat = { enable = true; };
24    direnv = { enable = true;
25      nix-direnv.enable = true;
26      config.global.hide_env_diff = true;
27    };
28    ssh = { enable = true;
29      includes = [ "extra-config" ];
30      enableDefaultConfig = false;
31      settings = {
32        "*" = {
33          serverAliveInterval = 30;
34          controlPersist = "15h";
35          controlMaster = "auto";
36          compression = true;
37        };
38        "pineapple.computer julia.blue Cortana" = {
39          hostname = "%h"; user = "julia"; port = 28;
40        };
41        "post.typ.dev" = { port = 34; };
42        "u662900.your-storagebox.de backups" = {
43          hostname = "u662900.your-storagebox.de"; user = "u662900"; port = 23;
44        };
45      };
46    };
47  };
48
49  imports = [
50    ./git.nix ./htop.nix ./shells.nix
51    (if builtins.hasAttr "osConfig" args then {} else
52      { nixpkgs = { overlays = [ self.overlays.default ]; config.allowUnfree = true; }; })
53    inputs.nix-index-database.homeModules.nix-index
54    inputs.ragenix.homeManagerModules.default
55    inputs.catppuccin.homeModules.catppuccin
56  ];
57
58  catppuccin = { enable = true; autoEnable = false;
59    flavor = "mocha"; accent = "blue";
60    bat.enable = true; cava.enable = true; helix.enable = true; btop.enable = true;
61    fish.enable = true; zellij.enable = true; # fzf.enable = true;
62  };
63
64  nix.registry = {
65    nixpkgs.flake = inputs.nixpkgs;
66    config.to = { type = "git"; url = "file://" + config.home.sessionVariables.CONF_DIR; };
67  };
68
69  systemd.user.startServices = "sd-switch"; # start/stop services to match config
70  age = {
71    package = pkgs.rage;
72    secrets.nix-conf = {
73      file = ../../secrets/nix-conf.age;
74      path = "${config.home.homeDirectory}/.config/nix/extra.conf";
75    };
76  };
77
78  home = {
79    username = lib.mkDefault "julia";
80    homeDirectory = lib.mkDefault "/home/julia";
81    stateVersion = "25.11";
82    preferXdgDirectories = true;
83
84    sessionVariables = {
85      NIX_PATH = "nixpkgs=flake:nixpkgs";
86      CONF_DIR = lib.mkDefault (config.home.homeDirectory + "/config");
87    };
88
89    file = builtins.listToAttrs (map (path: let
90        f = lib.strings.removePrefix ((inputs.self + "/dotfiles/")) ((toString path));
91      in {
92        name = f;
93        value.source = config.lib.file.mkOutOfStoreSymlink
94          (config.home.sessionVariables.CONF_DIR + "/dotfiles/" + f);
95      }) (lib.filesystem.listFilesRecursive ../../dotfiles)
96    );
97  };
98}