configuration.nix (3915B)
1 # Edit this configuration file to define what should be installed on 2 # your system. Help is available in the configuration.nix(5) man page 3 # and in the NixOS manual (accessible by running ‘nixos-help’). 4 5 { config, pkgs, ... }: 6 7 let machine = extra.private.machine; 8 isDesktop = machine != "purple"; 9 machinePath = p: let m = "/" + machine; 10 in ./machines + m + p; 11 machineConfig = import (machinePath "/config") pkgs; 12 userConfig = pkgs.callPackage ./nixpkgs/dotfiles.nix { 13 machineSessionCommands = machineConfig.sessionCommands; 14 }; 15 extra = { 16 is-minimal = false; 17 git-server = import ./misc/git-server.nix; 18 util = import ./misc/util.nix { inherit pkgs; }; 19 private = import ./private.nix { inherit pkgs; }; 20 machine = machineConfig; 21 }; 22 util = extra.util; 23 caches = [ "https://cache.nixos.org" ]; 24 composeKey = if machine == "quiver" then "ralt" else "prsc"; 25 home = "/home/jb55"; 26 isDark = true; 27 bash = "${pkgs.bashInteractive}/bin/bash"; 28 theme = if isDark then { 29 package = pkgs.theme-vertex; 30 name = "Vertex-Dark"; 31 } 32 else { 33 package = pkgs.arc-theme; 34 name = "Arc"; 35 }; 36 icon-theme = { 37 package = pkgs.numix-icon-theme; 38 name = "Numix"; 39 }; 40 user = { 41 name = "jb55"; 42 isNormalUser = true; 43 group = "users"; 44 uid = 1000; 45 extraGroups = [ "wheel" "dialout" ]; 46 createHome = true; 47 openssh.authorizedKeys.keys = [ 48 "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDAvMdnEEAd/ZQM+pYp6ZYG/1NPE/HSwIKoec0/QgGy4UlO0EvpWWhxPaV0HlNUFfwiHE0I2TwHc+KOKcG9jcbLAjCk5rvqU7K8UeZ0v/J83bQh78dr4le09WLyhczamJN0EkNddpCyUqIbH0q3ISGPmTiW4oQniejtkdJPn2bBwb3Za8jLzlh2UZ/ZJXhKvcGjQ/M1+fBmFUwCp5Lpvg0XYXrmp9mxAaO+fxY32EGItXcjYM41xr/gAcpmzL5rNQ9a9YBYFn2VzlpL+H7319tgdZa4L57S49FPQ748paTPDDqUzHtQD5FEZXe7DZZPZViRsPc370km/5yIgsEhMPKr jb55" 49 ]; 50 home = home; 51 shell = bash; 52 }; 53 in { 54 imports = 55 [ # Include the results of the hardware scan. 56 ./hardware-configuration.nix 57 ./certs 58 (import ./services extra) 59 (import ./environment extra) 60 (import ./networking machine) 61 (import (machinePath "") extra) 62 ] ++ (if isDesktop then [ 63 (import ./hardware/desktop extra) 64 # ./wayland 65 (import ./fonts extra) 66 (import ./environment/desktop { inherit userConfig theme icon-theme extra; }) 67 (import ./services/desktop { inherit extra util composeKey userConfig theme icon-theme; }) 68 ] else []); 69 70 # Use the GRUB 2 boot loader. 71 boot.loader.grub.enable = true; 72 #environment.ld-linux = false; 73 systemd.extraConfig = '' 74 DefaultTimeoutStopSec=10s 75 DefaultTimeoutStartSec=20s 76 ''; 77 78 i18n.inputMethod = { 79 enabled = "fcitx5"; 80 fcitx5.addons = with pkgs; [ 81 fcitx5-gtk 82 fcitx5-chinese-addons 83 fcitx5-mozc 84 fcitx5-nord 85 ]; 86 }; 87 88 i18n.extraLocaleSettings = { 89 LC_TIME="en_DK.UTF-8"; 90 }; 91 92 documentation.nixos.enable = false; 93 documentation.dev.enable = true; 94 #documentation.man.generateCaches = true; # list manpages 95 96 programs.ssh.startAgent = true; 97 98 time.timeZone = "America/Vancouver"; 99 system.stateVersion = "24.11"; 100 101 nixpkgs.config = import ./nixpkgs/config.nix; 102 103 nix.useSandbox = machine != "charon"; 104 nix.trustedUsers = [ "root" "jb55" ]; 105 106 nix.settings.experimental-features = [ "nix-command" "flakes" ]; 107 nix.settings.trusted-substituters = ["https://ai.cachix.org"]; 108 nix.settings.trusted-public-keys = ["ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc="]; 109 110 boot.blacklistedKernelModules = [ "pcspkr" ]; # STOP THE BEEPING 111 112 users.extraUsers.jb55 = user; 113 users.extraGroups.docker.members = [ "jb55" ]; 114 115 users.defaultUserShell = bash; 116 users.mutableUsers = true; 117 118 console.useXkbConfig = true; 119 120 programs.zsh.enable = false; 121 programs.direnv.enable = true; 122 123 }