Compare commits
5 Commits
862829c57c
...
a7f3754d25
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a7f3754d25 | ||
![]() |
54c8459fa1 | ||
![]() |
e26118af4f | ||
![]() |
764a8c58ce | ||
![]() |
8f89f1c6c1 |
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@ -15,7 +20,6 @@
|
|||||||
|
|
||||||
# efibootmgr -c -d /dev/sda -p 1 -L NixOS-boot -l '\EFI\NixOS-boot\grubx64.efi'
|
# efibootmgr -c -d /dev/sda -p 1 -L NixOS-boot -l '\EFI\NixOS-boot\grubx64.efi'
|
||||||
|
|
||||||
|
|
||||||
# Text-only:
|
# Text-only:
|
||||||
# sudo cp "$(nix-build '<nixpkgs>' --no-out-link -A 'refind')/share/refind/refind_x64.efi" /boot/EFI/boot/bootx64.efi
|
# sudo cp "$(nix-build '<nixpkgs>' --no-out-link -A 'refind')/share/refind/refind_x64.efi" /boot/EFI/boot/bootx64.efi
|
||||||
|
|
||||||
|
@ -1,11 +1,22 @@
|
|||||||
{ config, lib, pkgs, pkgs-unstable, home-manager, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
pkgs-unstable,
|
||||||
|
home-manager,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[
|
|
||||||
./roles/reset
|
./roles/reset
|
||||||
./hosts/odo
|
./hosts/odo
|
||||||
"${builtins.fetchTarball {url="https://github.com/nix-community/disko/archive/refs/tags/v1.9.0.tar.gz";sha256="0j76ar4qz320fakdii4659w5lww8wiz6yb7g47npywqvf2lbp388";}}/module.nix"
|
"${
|
||||||
|
builtins.fetchTarball {
|
||||||
|
url = "https://github.com/nix-community/disko/archive/refs/tags/v1.9.0.tar.gz";
|
||||||
|
sha256 = "0j76ar4qz320fakdii4659w5lww8wiz6yb7g47npywqvf2lbp388";
|
||||||
|
}
|
||||||
|
}/module.nix"
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./zfs.nix
|
./zfs.nix
|
||||||
./network.nix
|
./network.nix
|
||||||
@ -13,6 +24,7 @@
|
|||||||
./roles/graphics
|
./roles/graphics
|
||||||
./roles/sound
|
./roles/sound
|
||||||
./roles/sway
|
./roles/sway
|
||||||
|
./roles/alacritty
|
||||||
./roles/firefox
|
./roles/firefox
|
||||||
./roles/emacs
|
./roles/emacs
|
||||||
./roles/git
|
./roles/git
|
||||||
@ -20,7 +32,10 @@
|
|||||||
./roles/gpg
|
./roles/gpg
|
||||||
];
|
];
|
||||||
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [
|
||||||
|
"nix-command"
|
||||||
|
"flakes"
|
||||||
|
];
|
||||||
nix.settings.trusted-users = [ "@wheel" ];
|
nix.settings.trusted-users = [ "@wheel" ];
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_6_11;
|
boot.kernelPackages = pkgs.linuxPackages_6_11;
|
||||||
@ -45,8 +60,13 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
users.groups.talexander.gid = 11235;
|
users.groups.talexander.gid = 11235;
|
||||||
home-manager.users.talexander = { pkgs, ... }: {
|
home-manager.users.talexander =
|
||||||
home.packages = [ pkgs.atool pkgs.httpie ];
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = [
|
||||||
|
pkgs.atool
|
||||||
|
pkgs.httpie
|
||||||
|
];
|
||||||
programs.bash.enable = true;
|
programs.bash.enable = true;
|
||||||
|
|
||||||
# The state version is required and should stay at the version you
|
# The state version is required and should stay at the version you
|
||||||
@ -66,11 +86,13 @@
|
|||||||
security.doas.enable = true;
|
security.doas.enable = true;
|
||||||
security.doas.wheelNeedsPassword = false;
|
security.doas.wheelNeedsPassword = false;
|
||||||
security.sudo.enable = false;
|
security.sudo.enable = false;
|
||||||
security.doas.extraRules = [{
|
security.doas.extraRules = [
|
||||||
|
{
|
||||||
# Retain environment (for example NIX_PATH)
|
# Retain environment (for example NIX_PATH)
|
||||||
keepEnv = true;
|
keepEnv = true;
|
||||||
persist = true; # Only ask for a password the first time.
|
persist = true; # Only ask for a password the first time.
|
||||||
}];
|
}
|
||||||
|
];
|
||||||
|
|
||||||
# Do not use default packages (nixos includes some defaults like nano)
|
# Do not use default packages (nixos includes some defaults like nano)
|
||||||
environment.defaultPackages = lib.mkForce [ ];
|
environment.defaultPackages = lib.mkForce [ ];
|
||||||
@ -170,8 +192,6 @@
|
|||||||
# })
|
# })
|
||||||
# ];
|
# ];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Copy the NixOS configuration file and link it from the resulting system
|
# Copy the NixOS configuration file and link it from the resulting system
|
||||||
# (/run/current-system/configuration.nix). This is useful in case you
|
# (/run/current-system/configuration.nix). This is useful in case you
|
||||||
# accidentally delete configuration.nix.
|
# accidentally delete configuration.nix.
|
||||||
|
@ -12,7 +12,17 @@
|
|||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-b93b4e9b5, impermanence, home-manager, ... }@inputs: let
|
outputs =
|
||||||
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
nixpkgs-b93b4e9b5,
|
||||||
|
impermanence,
|
||||||
|
home-manager,
|
||||||
|
...
|
||||||
|
}@inputs:
|
||||||
|
let
|
||||||
base-system = { };
|
base-system = { };
|
||||||
odoqemu = nixpkgs.lib.nixosSystem rec {
|
odoqemu = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
@ -34,7 +44,9 @@
|
|||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
}
|
}
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
({lib, ...}: {
|
(
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
imports = [ <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix> ];
|
imports = [ <nixpkgs/nixos/modules/virtualisation/qemu-vm.nix> ];
|
||||||
virtualisation.qemu.options = [
|
virtualisation.qemu.options = [
|
||||||
"-device virtio-vga"
|
"-device virtio-vga"
|
||||||
@ -52,7 +64,8 @@
|
|||||||
boot.loader.efi.canTouchEfiVariables = lib.mkForce true;
|
boot.loader.efi.canTouchEfiVariables = lib.mkForce true;
|
||||||
# doas nixos-rebuild build-vm --flake .#odoqemu
|
# doas nixos-rebuild build-vm --flake .#odoqemu
|
||||||
#./result/bin/run-nixos-vm
|
#./result/bin/run-nixos-vm
|
||||||
})
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
odo = nixpkgs.lib.nixosSystem rec {
|
odo = nixpkgs.lib.nixosSystem rec {
|
||||||
@ -104,11 +117,14 @@
|
|||||||
home-manager.useUserPackages = true;
|
home-manager.useUserPackages = true;
|
||||||
}
|
}
|
||||||
./configuration.nix
|
./configuration.nix
|
||||||
({lib, ...}: {
|
(
|
||||||
|
{ lib, ... }:
|
||||||
|
{
|
||||||
networking.dhcpcd.enable = lib.mkForce true;
|
networking.dhcpcd.enable = lib.mkForce true;
|
||||||
networking.useDHCP = lib.mkForce true;
|
networking.useDHCP = lib.mkForce true;
|
||||||
boot.loader.efi.canTouchEfiVariables = lib.mkForce true;
|
boot.loader.efi.canTouchEfiVariables = lib.mkForce true;
|
||||||
})
|
}
|
||||||
|
)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -14,7 +14,11 @@
|
|||||||
type = "filesystem";
|
type = "filesystem";
|
||||||
format = "vfat";
|
format = "vfat";
|
||||||
mountpoint = "/boot";
|
mountpoint = "/boot";
|
||||||
mountOptions = [ "umask=0077" "noatime" "discard" ];
|
mountOptions = [
|
||||||
|
"umask=0077"
|
||||||
|
"noatime"
|
||||||
|
"discard"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
zfs = {
|
zfs = {
|
||||||
|
@ -1,14 +1,24 @@
|
|||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
# and may be overwritten by future invocations. Please make changes
|
# and may be overwritten by future invocations. Please make changes
|
||||||
# to /etc/nixos/configuration.nix instead.
|
# to /etc/nixos/configuration.nix instead.
|
||||||
{ config, lib, pkgs, modulesPath, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports = [
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
];
|
||||||
boot.initrd.kernelModules = [ ];
|
boot.initrd.kernelModules = [ ];
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
@ -1,11 +1,19 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
networking.dhcpcd.enable = false;
|
networking.dhcpcd.enable = false;
|
||||||
networking.useDHCP = false;
|
networking.useDHCP = false;
|
||||||
networking.nameservers = [ "194.242.2.2#doh.mullvad.net" "2a07:e340::2#doh.mullvad.net" ];
|
networking.nameservers = [
|
||||||
|
"194.242.2.2#doh.mullvad.net"
|
||||||
|
"2a07:e340::2#doh.mullvad.net"
|
||||||
|
];
|
||||||
services.resolved = {
|
services.resolved = {
|
||||||
enable = true;
|
enable = true;
|
||||||
dnssec = "true";
|
dnssec = "true";
|
||||||
@ -14,7 +22,6 @@
|
|||||||
dnsovertls = "true";
|
dnsovertls = "true";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# Without this, systemd-resolved will send DNS requests for <X>.home.arpa to the per-link DNS server (172.16.0.1) which does not support DNS-over-TLS. This leads to the connection anging and timing out. This causes firefox startup to take an extra 10+ seconds.
|
# Without this, systemd-resolved will send DNS requests for <X>.home.arpa to the per-link DNS server (172.16.0.1) which does not support DNS-over-TLS. This leads to the connection anging and timing out. This causes firefox startup to take an extra 10+ seconds.
|
||||||
#
|
#
|
||||||
# Test with: drill @127.0.0.53 odo.home.arpa
|
# Test with: drill @127.0.0.53 odo.home.arpa
|
||||||
|
24
nix/configuration/roles/alacritty/default.nix
Normal file
24
nix/configuration/roles/alacritty/default.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [ ];
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
alacritty
|
||||||
|
xdg-utils # for xdg-open
|
||||||
|
];
|
||||||
|
|
||||||
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.file.".config/alacritty/alacritty.toml" = {
|
||||||
|
source = ./files/alacritty.toml;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
44
nix/configuration/roles/alacritty/files/alacritty.toml
Normal file
44
nix/configuration/roles/alacritty/files/alacritty.toml
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
[colors]
|
||||||
|
draw_bold_text_with_bright_colors = true
|
||||||
|
indexed_colors = []
|
||||||
|
|
||||||
|
[colors.bright]
|
||||||
|
black = "0x666666"
|
||||||
|
blue = "0x7aa6da"
|
||||||
|
cyan = "0x54ced6"
|
||||||
|
green = "0x9ec400"
|
||||||
|
magenta = "0xb77ee0"
|
||||||
|
red = "0xff3334"
|
||||||
|
white = "0xffffff"
|
||||||
|
yellow = "0xe7c547"
|
||||||
|
|
||||||
|
[colors.normal]
|
||||||
|
black = "0x000000"
|
||||||
|
blue = "0x7aa6da"
|
||||||
|
cyan = "0x70c0ba"
|
||||||
|
green = "0xb9ca4a"
|
||||||
|
magenta = "0xc397d8"
|
||||||
|
red = "0xd54e53"
|
||||||
|
white = "0xeaeaea"
|
||||||
|
yellow = "0xe6c547"
|
||||||
|
|
||||||
|
[colors.primary]
|
||||||
|
background = "0x000000"
|
||||||
|
foreground = "0xeaeaea"
|
||||||
|
|
||||||
|
[font]
|
||||||
|
size = 11.0
|
||||||
|
|
||||||
|
[[hints.enabled]]
|
||||||
|
command = "xdg-open"
|
||||||
|
post_processing = true
|
||||||
|
regex = "(ipfs:|ipns:|magnet:|mailto:|gemini:|gopher:|https:|http:|news:|file:|git:|ssh:|ftp:)[^\u0000-\u001F\u007F-<>\"\\s{-}\\^⟨⟩`]+"
|
||||||
|
|
||||||
|
[hints.enabled.mouse]
|
||||||
|
enabled = false
|
||||||
|
mods = "None"
|
||||||
|
|
||||||
|
[scrolling]
|
||||||
|
history = 10000
|
||||||
|
# Lines moved per scroll.
|
||||||
|
multiplier = 3
|
@ -1,7 +1,11 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
plainmacs = pkgs.writeShellScriptBin "plainmacs" ''
|
plainmacs = pkgs.writeShellScriptBin "plainmacs" ''
|
||||||
@ -31,18 +36,25 @@ EOF
|
|||||||
|
|
||||||
exec ${pkgs.emacs29-pgtk}/bin/emacs -q --eval "$INIT_SCRIPT" "''${@}"
|
exec ${pkgs.emacs29-pgtk}/bin/emacs -q --eval "$INIT_SCRIPT" "''${@}"
|
||||||
'';
|
'';
|
||||||
|
e_shorthand = pkgs.writeShellScriptBin "e" ''
|
||||||
|
exec ${pkgs.emacs29-pgtk}/bin/emacs "''${@}"
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
plainmacs
|
plainmacs
|
||||||
|
e_shorthand
|
||||||
emacs29-pgtk
|
emacs29-pgtk
|
||||||
clang # To compile tree-sitter grammars
|
clang # To compile tree-sitter grammars
|
||||||
nixd # nix language server
|
nixd # nix language server
|
||||||
|
nixfmt-rfc-style # auto-formatting nix files through nixd
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.talexander = { pkgs, ... }: {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.file.".config/emacs" = {
|
home.file.".config/emacs" = {
|
||||||
source = ./files/emacs;
|
source = ./files/emacs;
|
||||||
recursive = true;
|
recursive = true;
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@ -52,7 +57,8 @@
|
|||||||
"privacy.fingerprintingProtection" = true;
|
"privacy.fingerprintingProtection" = true;
|
||||||
# Allow sending dark mode preference to websites.
|
# Allow sending dark mode preference to websites.
|
||||||
# Allow sending timezone to websites.
|
# Allow sending timezone to websites.
|
||||||
"privacy.fingerprintingProtection.overrides" = "+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked";
|
"privacy.fingerprintingProtection.overrides" =
|
||||||
|
"+AllTargets,-CSSPrefersColorScheme,-JSDateTimeUTC,-CanvasExtractionBeforeUserInputIsBlocked";
|
||||||
# Disable weather on new tab page
|
# Disable weather on new tab page
|
||||||
"browser.newtabpage.activity-stream.showWeather" = false;
|
"browser.newtabpage.activity-stream.showWeather" = false;
|
||||||
};
|
};
|
||||||
@ -82,7 +88,12 @@
|
|||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
users.talexander = {
|
users.talexander = {
|
||||||
directories = [
|
directories = [
|
||||||
{ directory = ".mozilla"; user = "talexander"; group = "talexander"; mode = "0700"; }
|
{
|
||||||
|
directory = ".mozilla";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@ -90,7 +101,12 @@
|
|||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
users.talexander = {
|
users.talexander = {
|
||||||
directories = [
|
directories = [
|
||||||
{ directory = ".cache/mozilla"; user = "talexander"; group = "talexander"; mode = "0700"; }
|
{
|
||||||
|
directory = ".cache/mozilla";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0700";
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@ -7,7 +12,9 @@
|
|||||||
git
|
git
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.talexander = { pkgs, ... }: {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.file.".gitconfig" = {
|
home.file.".gitconfig" = {
|
||||||
source = ./files/gitconfig_home;
|
source = ./files/gitconfig_home;
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@ -17,7 +22,12 @@
|
|||||||
hideMounts = true;
|
hideMounts = true;
|
||||||
users.talexander = {
|
users.talexander = {
|
||||||
directories = [
|
directories = [
|
||||||
{ directory = ".gnupg"; user = "talexander"; group = "talexander"; mode = "0700"; } # Local keyring
|
{
|
||||||
|
directory = ".gnupg";
|
||||||
|
user = "talexander";
|
||||||
|
group = "talexander";
|
||||||
|
mode = "0700";
|
||||||
|
} # Local keyring
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
sway-config = pkgs.writeTextFile {
|
sway-config = pkgs.writeTextFile {
|
||||||
@ -37,8 +42,8 @@ include ${display-configs}
|
|||||||
include ${window-management}
|
include ${window-management}
|
||||||
include ${movement}
|
include ${movement}
|
||||||
include ${disable-focus-follows-mouse}
|
include ${disable-focus-follows-mouse}
|
||||||
include ~/.config/sway/config.d/*.conf
|
include ${background}
|
||||||
include /etc/sway/config.d/*
|
include ${touchpad_input}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
base-hotkeys = pkgs.writeTextFile {
|
base-hotkeys = pkgs.writeTextFile {
|
||||||
@ -205,6 +210,46 @@ bindsym $mod+r mode "resize"
|
|||||||
focus_follows_mouse no
|
focus_follows_mouse no
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
background = pkgs.writeTextFile {
|
||||||
|
name = "background.conf";
|
||||||
|
text = ''
|
||||||
|
output * bg ${./files/bliss.jpg} fill
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
touchpad_input = pkgs.writeTextFile {
|
||||||
|
name = "touchpad_input.conf";
|
||||||
|
text = ''
|
||||||
|
input * xkb_rules "evdev"
|
||||||
|
|
||||||
|
# All touchpads
|
||||||
|
input type:touchpad {
|
||||||
|
dwt enabled
|
||||||
|
click_method clickfinger
|
||||||
|
tap enabled
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
start_screen_share = pkgs.writeShellScriptBin "start_screen_share" ''
|
||||||
|
# Disable displaying notifications. This is useful for video conference screen sharing.
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "''${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
makoctl set-mode do-not-disturb
|
||||||
|
|
||||||
|
swaymsg output "'Dell Inc. DELL U3014 P1V6N35M329L'" scale 2
|
||||||
|
'';
|
||||||
|
stop_screen_share = pkgs.writeShellScriptBin "stop_screen_share" ''
|
||||||
|
# Allow mako to show notifications again.
|
||||||
|
set -euo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
DIR="$( cd "$( dirname "''${BASH_SOURCE [ 0 ]}" )" && pwd )"
|
||||||
|
|
||||||
|
makoctl set-mode default
|
||||||
|
|
||||||
|
swaymsg output "'Dell Inc. DELL U3014 P1V6N35M329L'" scale 1
|
||||||
|
'';
|
||||||
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
@ -212,10 +257,13 @@ in
|
|||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
alacritty
|
alacritty
|
||||||
pcmanfm
|
pcmanfm
|
||||||
|
start_screen_share
|
||||||
|
stop_screen_share
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.sessionVariables = {
|
environment.sessionVariables = {
|
||||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
# WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||||
|
WLR_RENDERER = "vulkan";
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.sway = {
|
programs.sway = {
|
||||||
@ -225,7 +273,7 @@ in
|
|||||||
"--debug"
|
"--debug"
|
||||||
"--config"
|
"--config"
|
||||||
"${sway-config}"
|
"${sway-config}"
|
||||||
"--unsupported-gpu"
|
# "--unsupported-gpu"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
BIN
nix/configuration/roles/sway/files/bliss.jpg
Normal file
BIN
nix/configuration/roles/sway/files/bliss.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 638 KiB |
@ -1,4 +1,9 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [ ];
|
imports = [ ];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user