Switch framework to awesomewm

framework
Stef Dunlap 8 months ago
parent bb1ff0bb4b
commit 4add0af2ed
  1. 1
      box/framework.nix
  2. 59
      box/framework2.nix
  3. 19
      conf/awesome_workstation.nix
  4. 46
      conf/darwin.nix
  5. 43
      conf/darwin_link_apps.nix
  6. 8
      conf/kde_workstation.nix
  7. 13
      conf/workstation.nix
  8. 12
      flake.lock
  9. 36
      flake.nix

@ -42,4 +42,5 @@
hardware.bluetooth.enable = true;
services.fprintd.enable = true;
services.fwupd.enable = true;
}

@ -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;
}

@ -1,7 +1,3 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, ... }:
{
@ -35,8 +31,6 @@
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
# Configure keymap in X11
services.xserver = {
@ -85,6 +79,8 @@
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
gnome3.gnome-tweaks
byobu
chromium
firefox
@ -107,6 +103,11 @@
unzip
vlc
xsel
dmenu mpc-cli mpd scrot unclutter xsel slock acpilight
roboto
terminus_font_ttf
];
# Some programs need SUID wrappers, can be configured further or are

@ -8,11 +8,11 @@
"utils": "utils"
},
"locked": {
"lastModified": 1668332334,
"narHash": "sha256-YT1qcE/MCqBO1Bi/Yr6GcFpNKsvmzrBKh8juyXDbxQc=",
"lastModified": 1673737886,
"narHash": "sha256-hNTqD0uIgpbtTI2Nuj/Q1lEFOOdZqqXpxoc8rMno2F0=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "bc90de24d898655542589237cc0a6ada7564cb6c",
"rev": "2827b5306462d91edec16a3d069b2d6e54c3079f",
"type": "github"
},
"original": {
@ -23,11 +23,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1668087632,
"narHash": "sha256-T/cUx44aYDuLMFfaiVpMdTjL4kpG7bh0VkN6JEM78/E=",
"lastModified": 1673631141,
"narHash": "sha256-AprpYQ5JvLS4wQG/ghm2UriZ9QZXvAwh1HlgA/6ZEVQ=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "5f588eb4a958f1a526ed8da02d6ea1bea0047b9f",
"rev": "befc83905c965adfd33e5cae49acb0351f6e0404",
"type": "github"
},
"original": {

@ -15,7 +15,7 @@
({ config, pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
./conf/workstation.nix
./conf/kde_workstation.nix
./box/tacotuesday.nix
./app/k3s.nix
./conf/1710_k8s.nix
@ -30,36 +30,14 @@
}
];
};
nixosConfigurations.flippy = nixpkgs.lib.nixosSystem {
nixosConfigurations.framework2 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ config, pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
./conf/workstation.nix
./conf/1710_k8s.nix
./box/flippy.nix
./app/virtualbox.nix
./app/teamviewer.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.kindrobot.imports = [
./home/kindrobot.nix
./home/kindrobot-linux.nix
./home/email_accounts.nix
];
}
];
};
nixosConfigurations.framework = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ config, pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
./conf/workstation.nix
./box/framework.nix
./conf/awesome_workstation.nix
./box/framework2.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
@ -77,7 +55,7 @@
({ config, pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
./conf/workstation.nix
./conf/kde_workstation.nix
./box/y500.nix
home-manager.nixosModules.home-manager {
home-manager.useGlobalPkgs = true;
@ -96,7 +74,7 @@
({ config, pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
./conf/workstation.nix
./conf/kde_workstation.nix
./box/wmft16.nix
./app/minikube.nix
./conf/1710_k8s.nix
@ -118,7 +96,7 @@
({ config, pkgs, ... }: {
nixpkgs.config.allowUnfreePredicate = (pkg: true);
})
./conf/workstation.nix
./conf/kde_workstation.nix
./box/revenge.nix
./app/k3s.nix
./conf/1710_k8s.nix

Loading…
Cancel
Save