Merge branch 'framework/master' into zenix/master

This commit is contained in:
tristan 2025-04-19 11:51:42 +01:00
commit f3b154aeeb
9 changed files with 129 additions and 87 deletions

View file

@ -68,6 +68,19 @@
];
};
framework-13 = mkConf {
nixos-modules = [
./hardware/framework-13.nix
./nixos/workstation.nix
./nixos/modules/work.nix
./nixos/programs/hyprland.nix
];
home-modules = [
./home/programs/work.nix
./home/programs/graphical.nix
];
};
alpine = mkConf {
nixos-modules = [
./hardware/alpine.nix

88
hardware/framework-13.nix Normal file
View file

@ -0,0 +1,88 @@
{ 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.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=@root" ];
};
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/84ad0e15-0056-4d46-801d-7735c2c6a5f6";
fileSystems."/home" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
options = [ "subvol=@home" ];
};
fileSystems."/nix" =
{ device = "/dev/mapper/crypted";
fsType = "btrfs";
neededForBoot = true;
options = [ "subvol=@nix" "noatime" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-label/SWAP"; }
];
# 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";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
networking.hostName = "framework-13";
system.stateVersion = "24.11"; # do not change
home-manager.users.${config.user}.imports = [
{
home.stateVersion = "24.11";
wayland.windowManager.hyprland = {
settings = {
bind = [
"SUPER_SHIFT, Q, killactive,"
];
};
extraConfig = ''
device {
name = at-translated-set-2-keyboard
kb_variant = dvorak,
kb_layout = gb,gb
kb_options = grp:alt_shift_toggle,caps:escape
}
'';
};
}
];
stylix.fonts.sizes = {
applications = 12;
desktop = 10;
terminal = 15;
};
}

View file

@ -30,7 +30,7 @@ in {
enable = true;
settings = {
general = {
before_sleep_cmd = "rbw lock";
before_sleep_cmd = "rbw lock; hyprlock";
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "pidof ${lock_cmd} || ${lock_cmd}";
@ -193,6 +193,7 @@ in {
"XDG_SESSION_DESKTOP,Hyprland"
"QT_AUTO_SCREEN_SCALE_FACTOR,1"
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
"NIXOS_OZONE_WL,1"
];
windowrule = [
"float, title:wlogout"

View file

@ -1,25 +0,0 @@
{pkgs, ...}: {
wayland.windowManager.hyprland = {
plugins = with pkgs; [
hycov
];
settings.plugin.hycov = {
overview_gappo = 20;
};
settings.bind = [
# bind key to toggle overview(normal mode)
"ALT,tab,hycov:toggleoverview"
# bind key to toggle overview(force mode,no affected by `only_active_workspace` and `only_active_monitor`)
"ALT,grave,hycov:toggleoverview,forceall" #grave key is the '~' key
# The direction switch shortcut key binding.
# calculate the window closest to the direction to switch focus.
# This keybind is applicable not only to the overview but also to the general layout
"ALT,h,hycov:movefocus,l"
"ALT,l,hycov:movefocus,r"
"ALT,k,hycov:movefocus,u"
"ALT,j,hycov:movefocus,d"
];
};
}

View file

@ -28,7 +28,6 @@
# other
element-desktop
brave
bitwarden
];
@ -55,4 +54,9 @@
"file:///home/tristan/Downloads"
];
};
programs.chromium = {
enable = true;
package = pkgs.brave;
};
}

View file

@ -1,6 +1,7 @@
{
config,
pkgs,
lib,
...
}: let
modifier = config.windowManager.modifierKey;
@ -9,6 +10,7 @@
my-deps = {
notify-send = "${pkgs.libnotify}/bin/notify-send";
playerctl = "${pkgs.playerctl}/bin/playerctl";
brightnessctl = lib.getExe pkgs.brightnessctl;
grim = "${pkgs.grim}/bin/grim";
slurp = "${pkgs.slurp}/bin/slurp";
amixer = "${pkgs.alsa-utils}/bin/amixer";
@ -103,44 +105,35 @@ in {
];
}
{
name = "brightness-down";
name = "brightness";
text = ''
light -U $1
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-down -t 1000
percent=$(${my-deps.brightnessctl} set $1 -m | awk -F, '{print $4}')
${my-deps.notify-send} "Brightness" -h "int:value:$percent" -h string:x-canonical-private-synchronous:brightness -t 3000
'';
hotkeys = [
{
modifier = "";
key = "XF86MonBrightnessDown";
args = "10";
args = "10%-";
}
{
modifier = "SHIFT";
key = "XF86MonBrightnessDown";
args = "1";
args = "1%-";
}
];
install = false;
}
{
name = "brightness-up";
text = ''
light -A $1
${my-deps.notify-send} "Brightness" -h int:value:$(light) -a brightness-up -t 1000
'';
hotkeys = [
{
modifier = "";
key = "XF86MonBrightnessUp";
args = "10";
args = "+10%";
}
{
modifier = "SHIFT";
key = "XF86MonBrightnessUp";
args = "1";
args = "+1%";
}
];
install = false;
install = true;
}
{
name = "picker";

View file

@ -4,11 +4,6 @@
...
}: let
modifier = config.windowManager.modifierKey;
browser = "${pkgs.brave}/opt/brave.com/brave/brave-browser";
pwa = {
slack = "mpagibdhafmlkgpemeicgogjnhclenoc";
teams = "cifhbcnohmdccbgoicgdjpfamggdegmo";
};
in {
roles.email = {
enable = true;
@ -26,16 +21,6 @@ in {
pkgs.thunderbird
pkgs.remmina
pkgs.postman
(import ../../lib/mkapp.nix "slack" {
inherit pkgs browser;
desktopName = "Slack";
app-id = pwa.slack;
})
(import ../../lib/mkapp.nix "teams" {
inherit pkgs browser;
app-id = pwa.teams;
desktopName = "Microsoft Teams";
})
pkgs.devcontainer
(pkgs.writeShellScriptBin "devcontainer-open" (
let
@ -77,8 +62,12 @@ in {
wayland.windowManager.hyprland.settings = {
bind = [
"${modifier}, e, focuswindow, thunderbird"
"${modifier}, t, focuswindow, brave-${pwa.teams}-Profile_2"
"${modifier}, s, focuswindow, brave-${pwa.slack}-Profile_2"
];
};
programs.chromium = {
extensions = [
{id = "bfogiafebfohielmmehodmfbbebbbpei";}
];
};
}

View file

@ -48,30 +48,6 @@
}
]
'';
xdg.configFile."pipewire/pipewire.conf.d/raop-sink.conf".text = ''
context.modules = [
{ name = libpipewire-module-raop-sink
args = {
# Set the remote address to tunnel to
raop.ip = "127.0.0.1"
raop.port = 8190
raop.name = "my-raop-device"
raop.hostname = "My Service"
#raop.transport = "udp"
raop.encryption.type = "RSA"
#raop.audio.codec = "PCM"
#raop.password = "****"
#audio.format = "S16"
#audio.rate = 44100
#audio.channels = 2
#audio.position = [ FL FR ]
stream.props = {
# extra sink properties
}
}
}
]
'';
services.gnome-keyring.enable = true;
}

View file

@ -29,7 +29,10 @@ in {
boot.loader.efi.canTouchEfiVariables = true;
networking.networkmanager.enable = true;
programs.nm-applet.enable = true;
programs.nm-applet = {
enable = true;
indicator = true;
};
# fix nixos-containers
networking.nat.enable = true;