parent
bb1ff0bb4b
commit
4add0af2ed
@ -0,0 +1,59 @@ |
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’ |
||||
# and may be overwritten by future invocations. Please make changes |
||||
# to /etc/nixos/configuration.nix instead. |
||||
{ config, lib, pkgs, modulesPath, ... }: |
||||
|
||||
{ |
||||
imports = |
||||
[ (modulesPath + "/installer/scan/not-detected.nix") |
||||
]; |
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; |
||||
boot.initrd.kernelModules = [ ]; |
||||
boot.kernelModules = [ "kvm-intel" ]; |
||||
boot.kernelPackages = pkgs.linuxPackages_latest; |
||||
boot.kernelParams = ["module_blacklist=hid_sensor_hub"]; |
||||
boot.extraModulePackages = [ ]; |
||||
|
||||
networking.hostName = "framework2"; |
||||
fileSystems."/" = |
||||
{ device = "/dev/disk/by-uuid/2c63d302-5165-4501-a2c3-f7d4c85c9e02"; |
||||
fsType = "ext4"; |
||||
}; |
||||
|
||||
fileSystems."/boot/efi" = |
||||
{ device = "/dev/disk/by-uuid/3AF6-0385"; |
||||
fsType = "vfat"; |
||||
}; |
||||
|
||||
swapDevices = [ ]; |
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking |
||||
# (the default) this is the recommended approach. When using systemd-networkd it's |
||||
# still possible to use this option, but it's recommended to use it in conjunction |
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. |
||||
networking.useDHCP = lib.mkDefault true; |
||||
# networking.interfaces.wlp166s0.useDHCP = lib.mkDefault true; |
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; |
||||
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; |
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; |
||||
|
||||
services.fwupd.enable = true; |
||||
hardware.bluetooth.enable = true; |
||||
services.fprintd.enable = true; |
||||
environment.systemPackages = with pkgs; [ |
||||
terminus_font |
||||
]; |
||||
console = { |
||||
earlySetup = true; |
||||
font = "${pkgs.terminus_font}/share/consolefonts/ter-132n.psf.gz"; |
||||
packages = with pkgs; [ terminus_font ]; |
||||
keyMap = "us"; |
||||
}; |
||||
services.xserver.synaptics = { |
||||
enable = true; |
||||
twoFingerScroll = true; |
||||
accelFactor = "0.075"; |
||||
}; |
||||
} |
@ -0,0 +1,19 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
{ |
||||
imports = [./workstation.nix]; |
||||
services.xserver.displayManager.startx.enable = true; |
||||
services.xserver.windowManager.awesome = { |
||||
enable = true; |
||||
luaModules = with pkgs.luaPackages; [ |
||||
luarocks # is the package manager for Lua modules |
||||
luadbi-mysql # Database abstraction layer |
||||
]; |
||||
}; |
||||
services.xserver.dpi = 180; |
||||
environment.variables = { |
||||
GDK_SCALE = "2"; |
||||
GDK_DPI_SCALE = "0.5"; |
||||
_JAVA_OPTIONS = "-Dsun.java2d.uiScale=2"; |
||||
}; |
||||
} |
@ -1,46 +0,0 @@ |
||||
{ config, pkgs, inputs, ... }: |
||||
|
||||
{ |
||||
# List packages installed in system profile. To search by name, run: |
||||
# $ nix-env -qaP | grep wget |
||||
environment.systemPackages = |
||||
[ |
||||
pkgs.alacritty |
||||
pkgs.neovim |
||||
pkgs.vim |
||||
pkgs.gnupg |
||||
]; |
||||
|
||||
# Use a custom configuration.nix location. |
||||
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix |
||||
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix"; |
||||
|
||||
# Auto upgrade nix package and the daemon service. |
||||
services.nix-daemon.enable = true; |
||||
|
||||
nix = { |
||||
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ]; # Enables use of `nix-shell -p ...` etc |
||||
registry.nixpkgs.flake = inputs.nixpkgs; # Make `nix shell` etc use pinned nixpkgs |
||||
extraOptions = '' |
||||
extra-platforms = aarch64-darwin |
||||
experimental-features = nix-command flakes |
||||
''; |
||||
}; |
||||
|
||||
# For home-manager to work. |
||||
users.users.kindrobot.name = "kindrobot"; |
||||
users.users.kindrobot.home = "/Users/kindrobot"; |
||||
|
||||
# Create /etc/zshrc that loads the nix-darwin environment. |
||||
programs.zsh.enable = true; # default shell on catalina |
||||
programs.fish.enable = true; |
||||
|
||||
programs.gnupg.agent = { |
||||
enable = true; |
||||
enableSSHSupport = true; |
||||
}; |
||||
|
||||
# Used for backwards compatibility, please read the changelog before changing. |
||||
# $ darwin-rebuild changelog |
||||
system.stateVersion = 4; |
||||
} |
@ -1,43 +0,0 @@ |
||||
{ config |
||||
, lib |
||||
, ... |
||||
}: |
||||
|
||||
{ |
||||
# Nix-darwin does not link installed applications to the user environment. This means apps will not show up |
||||
# in spotlight, and when launched through the dock they come with a terminal window. This is a workaround. |
||||
# Upstream issue: https://github.com/LnL7/nix-darwin/issues/214 |
||||
system.activationScripts.applications.text = lib.mkForce '' |
||||
echo "setting up ~/Applications..." >&2 |
||||
applications="$HOME/Applications" |
||||
nix_apps="$applications/Nix Apps" |
||||
|
||||
# Needs to be writable by the user so that home-manager can symlink into it |
||||
# if ! test -d "$applications"; then |
||||
mkdir -p "$applications" |
||||
chown kindrobot: "$applications" |
||||
chmod u+w "$applications" |
||||
# fi |
||||
|
||||
# Delete the directory to remove old links |
||||
rm -rf "$nix_apps" |
||||
mkdir -p "$nix_apps" |
||||
|
||||
find ${config.system.build.applications}/Applications -maxdepth 1 -type l -exec readlink '{}' + | |
||||
while read src; do |
||||
# Spotlight does not recognize symlinks, it will ignore directory we link to the applications folder. |
||||
# It does understand MacOS aliases though, a unique filesystem feature. Sadly they cannot be created |
||||
# from bash (as far as I know), so we use the oh-so-great Apple Script instead. |
||||
/usr/bin/osascript -e " |
||||
set fileToAlias to POSIX file \"$src\" |
||||
set applicationsFolder to POSIX file \"$nix_apps\" |
||||
|
||||
tell application \"Finder\" |
||||
make alias file to fileToAlias at applicationsFolder |
||||
# This renames the alias; 'mpv.app alias' -> 'mpv.app' |
||||
set name of result to \"$(rev <<< "$src" | cut -d'/' -f1 | rev)\" |
||||
end tell |
||||
" 1>/dev/null |
||||
done |
||||
''; |
||||
} |
@ -0,0 +1,8 @@ |
||||
{ config, pkgs, ... }: |
||||
|
||||
{ |
||||
imports = [./workstation.nix]; |
||||
# Enable the KDE Plasma Desktop Environment. |
||||
services.xserver.displayManager.sddm.enable = true; |
||||
services.xserver.desktopManager.plasma5.enable = true; |
||||
} |
Loading…
Reference in new issue