+/config

my dotfiles and nix configuration

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

Julia RyanEnable motd25665e9

main
2.9 KiB113 linesraw
1{ pkgs, lib, inputs, config, self, ... }: {
2  imports = [
3    inputs.home-manager.nixosModules.home-manager
4    inputs.ragenix.nixosModules.default
5    inputs.catppuccin.nixosModules.catppuccin
6    ./friends.nix
7  ];
8
9  users.users.julia = {
10    isNormalUser = true; uid = 1337;
11    extraGroups = [ "julia" "wheel" "wireshark" "dialout" "netdev" ];
12    initialPassword = "changethis";
13    openssh.authorizedKeys.keys = [
14      "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPCatP3klEjfQPSiJNUc3FRDdz927BG1IzektpouzOZR"
15    ];
16    linger = true;
17  };
18  users.defaultUserShell = pkgs.fish;
19
20  programs = {
21    fish = { enable = true; useBabelfish = true; };
22    zsh.enable = true;
23    command-not-found.enable = false;
24    bandwhich.enable = true;
25    trippy.enable = true;
26  };
27
28  services = {
29    atd.enable = true;
30    nixseparatedebuginfod2.enable = true;
31    avahi.enable = true;
32    # angrr = { enable = true; timer.enable = true; };
33    getty = {
34      autologinUser = "julia";
35      greetingLine = ''\l'';
36      helpLine = lib.mkForce "♥";
37    };
38    openssh.extraConfig = lib.mkBefore "PrintLastLog no";
39  };
40
41  environment.systemPackages = with pkgs; [
42    at
43    file
44    zip unzip
45    psmisc
46    usbutils
47    uhubctl
48    perf
49    kitty.terminfo kitty.kitten
50    cntr
51  ] ++ config.home-manager.users.julia.home.packages;
52
53  
54  networking = {
55    firewall = {
56      allowedTCPPorts = [
57        8000 8080
58      ];
59    };
60    dhcpcd.extraConfig = "slaac hwaddr"; # fixed ipv6 address
61  };
62
63  boot = {
64    extraModulePackages = [ pkgs.uwurandom ];
65    kernelModules = [ "uwurandom" ];
66    loader = {
67      systemd-boot = lib.mkDefault { enable = true;
68        configurationLimit = 5;
69        memtest86.enable = true;
70      };
71      efi.canTouchEfiVariables = true;
72    };
73    # fix systemd having one big cgroup
74    kernelParams = [ "cgroup_no_v1=all" "systemd.unified_cgroup_hierarchy=1" ];
75  };
76
77  age = {
78    ageBin = lib.getExe pkgs.rage;
79    identityPaths = [ "/home/julia/.ssh/id_ed25519" ];
80  };
81  home-manager.useGlobalPkgs = true;
82  security = {
83    sudo.extraConfig = ''Defaults env_keep += "path"'';
84    polkit.enable = true;
85    pam.services.sshd.rules.session.custom = {
86      order = 15000;
87      control = "optional";
88      modulePath = "${pkgs.pam}/lib/security/pam_exec.so";
89      args = [ "stdout" "/etc/motd" ];
90    };
91  };
92  catppuccin = { enable = true; autoEnable = true; flavor = "mocha"; };
93  console.useXkbConfig = true;
94  nixpkgs = {
95    overlays = [ self.overlays.default ];
96    config.allowUnfree = true;
97    hostPlatform = lib.mkDefault "x86_64-linux";
98  };
99  nix = {
100    settings = {
101      trusted-users = [ "root" "@wheel" ];
102      extra-experimental-features = [ "nix-command" "flakes" ];
103    };
104    registry.config.to = { type = "git";
105      url = "file://" + config.home-manager.users.julia.home.sessionVariables.CONF_DIR;
106    };
107  };
108  i18n.supportedLocales = [ "en_US.UTF-8/UTF-8" ];
109  system = {
110    stateVersion = "25.11";
111    nixos.distroName = "gay linux";
112  };
113}