Reformat all nix files.
This commit is contained in:
parent
764a8c58ce
commit
e26118af4f
@ -1,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
# Use the systemd-boot EFI boot loader.
|
# Use the systemd-boot EFI boot loader.
|
||||||
@ -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
|
||||||
@ -21,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;
|
||||||
@ -46,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
|
||||||
@ -67,14 +86,16 @@
|
|||||||
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 [ ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
wget
|
wget
|
||||||
@ -171,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,8 +12,18 @@
|
|||||||
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 =
|
||||||
base-system = {};
|
{
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
nixpkgs-unstable,
|
||||||
|
nixpkgs-b93b4e9b5,
|
||||||
|
impermanence,
|
||||||
|
home-manager,
|
||||||
|
...
|
||||||
|
}@inputs:
|
||||||
|
let
|
||||||
|
base-system = { };
|
||||||
odoqemu = nixpkgs.lib.nixosSystem rec {
|
odoqemu = nixpkgs.lib.nixosSystem rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
@ -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
|
||||||
|
@ -1,14 +1,21 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
alacritty
|
alacritty
|
||||||
xdg-utils # for xdg-open
|
xdg-utils # for xdg-open
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.users.talexander = { pkgs, ... }: {
|
home-manager.users.talexander =
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
home.file.".config/alacritty/alacritty.toml" = {
|
home.file.".config/alacritty/alacritty.toml" = {
|
||||||
source = ./files/alacritty.toml;
|
source = ./files/alacritty.toml;
|
||||||
};
|
};
|
||||||
|
@ -1,7 +1,11 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
programs.firefox = {
|
programs.firefox = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = (pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true;}) {});
|
package = (pkgs.wrapFirefox (pkgs.firefox-unwrapped.override { pipewireSupport = true; }) { });
|
||||||
languagePacks = [ "en-US" ];
|
languagePacks = [ "en-US" ];
|
||||||
preferences = {
|
preferences = {
|
||||||
# "identity.sync.tokenserver.uri": "https://ffsync.fizz.buzz/token/1.0/sync/1.5";
|
# "identity.sync.tokenserver.uri": "https://ffsync.fizz.buzz/token/1.0/sync/1.5";
|
||||||
@ -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,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
# Open ports in the firewall.
|
# Open ports in the firewall.
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
fonts = {
|
fonts = {
|
||||||
enableDefaultPackages = true;
|
enableDefaultPackages = true;
|
||||||
@ -13,9 +18,9 @@
|
|||||||
|
|
||||||
fontconfig = {
|
fontconfig = {
|
||||||
localConf = ''
|
localConf = ''
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
|
||||||
<fontconfig>
|
<fontconfig>
|
||||||
<!-- reject all bitmap fonts, with the exception of 'terminus' -->
|
<!-- reject all bitmap fonts, with the exception of 'terminus' -->
|
||||||
<selectfont>
|
<selectfont>
|
||||||
<!-- <acceptfont> -->
|
<!-- <acceptfont> -->
|
||||||
@ -111,7 +116,7 @@
|
|||||||
<const>lcddefault</const>
|
<const>lcddefault</const>
|
||||||
</edit>
|
</edit>
|
||||||
</match>
|
</match>
|
||||||
</fontconfig>
|
</fontconfig>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -1,13 +1,20 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
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,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
# Fetch public keys:
|
# Fetch public keys:
|
||||||
# gpg --locate-keys tom@fizz.buzz
|
# gpg --locate-keys tom@fizz.buzz
|
||||||
@ -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,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
hardware.graphics.enable = true;
|
hardware.graphics.enable = true;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
# Reset some defaults to start from a minimal more-arch-linux-like state. Think of this like a CSS reset sheet.
|
# Reset some defaults to start from a minimal more-arch-linux-like state. Think of this like a CSS reset sheet.
|
||||||
|
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
pavucontrol
|
pavucontrol
|
||||||
|
@ -1,53 +1,58 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
sway-config = pkgs.writeTextFile {
|
sway-config = pkgs.writeTextFile {
|
||||||
name = "config";
|
name = "config";
|
||||||
text = ''
|
text = ''
|
||||||
# Default config for sway
|
# Default config for sway
|
||||||
#
|
#
|
||||||
# Copy this to ~/.config/sway/config and edit it to your liking.
|
# Copy this to ~/.config/sway/config and edit it to your liking.
|
||||||
#
|
#
|
||||||
# Read `man 5 sway` for a complete reference.
|
# Read `man 5 sway` for a complete reference.
|
||||||
|
|
||||||
### Variables
|
### Variables
|
||||||
#
|
#
|
||||||
# Logo key. Use Mod1 for Alt.
|
# Logo key. Use Mod1 for Alt.
|
||||||
set $mod Mod4
|
set $mod Mod4
|
||||||
# set $mod Mod1
|
# set $mod Mod1
|
||||||
# Home row direction keys, like vim
|
# Home row direction keys, like vim
|
||||||
set $left h
|
set $left h
|
||||||
set $down j
|
set $down j
|
||||||
set $up k
|
set $up k
|
||||||
set $right l
|
set $right l
|
||||||
# Your preferred terminal emulator
|
# Your preferred terminal emulator
|
||||||
set $term ${pkgs.alacritty}/bin/alacritty
|
set $term ${pkgs.alacritty}/bin/alacritty
|
||||||
# Your preferred application launcher
|
# Your preferred application launcher
|
||||||
# Note: it's recommended that you pass the final command to sway
|
# Note: it's recommended that you pass the final command to sway
|
||||||
# set $menu dmenu_path | dmenu | xargs swaymsg exec
|
# set $menu dmenu_path | dmenu | xargs swaymsg exec
|
||||||
set $menu ${pkgs.wofi}/bin/wofi --show drun --gtk-dark
|
set $menu ${pkgs.wofi}/bin/wofi --show drun --gtk-dark
|
||||||
|
|
||||||
# Do not show a title bar on windows
|
# Do not show a title bar on windows
|
||||||
default_border pixel 2
|
default_border pixel 2
|
||||||
|
|
||||||
bindsym $mod+grave exec $term
|
bindsym $mod+grave exec $term
|
||||||
|
|
||||||
include ${base-hotkeys}
|
include ${base-hotkeys}
|
||||||
include ${display-configs}
|
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 ~/.config/sway/config.d/*.conf
|
||||||
include /etc/sway/config.d/*
|
include /etc/sway/config.d/*
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
base-hotkeys = pkgs.writeTextFile {
|
base-hotkeys = pkgs.writeTextFile {
|
||||||
name = "base-hotkeys.conf";
|
name = "base-hotkeys.conf";
|
||||||
text = ''
|
text = ''
|
||||||
### Key bindings
|
### Key bindings
|
||||||
#
|
#
|
||||||
# Basics:
|
# Basics:
|
||||||
#
|
#
|
||||||
# kill focused window
|
# kill focused window
|
||||||
bindsym $mod+Shift+q kill
|
bindsym $mod+Shift+q kill
|
||||||
|
|
||||||
@ -66,22 +71,22 @@ include /etc/sway/config.d/*
|
|||||||
|
|
||||||
# exit sway (logs you out of your Wayland session)
|
# exit sway (logs you out of your Wayland session)
|
||||||
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
display-configs = pkgs.writeTextFile {
|
display-configs = pkgs.writeTextFile {
|
||||||
name = "display-configs.conf";
|
name = "display-configs.conf";
|
||||||
text = ''
|
text = ''
|
||||||
output 'Unknown 0x095F 0x00000000' scale 1.5
|
output 'Unknown 0x095F 0x00000000' scale 1.5
|
||||||
output 'BOE 0x095F Unknown' scale 1.5
|
output 'BOE 0x095F Unknown' scale 1.5
|
||||||
output 'BOE 0x0BCA Unknown' scale 1.5
|
output 'BOE 0x0BCA Unknown' scale 1.5
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
window-management = pkgs.writeTextFile {
|
window-management = pkgs.writeTextFile {
|
||||||
name = "window-management.conf";
|
name = "window-management.conf";
|
||||||
text = ''
|
text = ''
|
||||||
#
|
#
|
||||||
# Layout stuff:
|
# Layout stuff:
|
||||||
#
|
#
|
||||||
# You can "split" the current object of your focus with
|
# You can "split" the current object of your focus with
|
||||||
# $mod+b or $mod+v, for horizontal and vertical splits
|
# $mod+b or $mod+v, for horizontal and vertical splits
|
||||||
# respectively.
|
# respectively.
|
||||||
@ -104,9 +109,9 @@ output 'BOE 0x0BCA Unknown' scale 1.5
|
|||||||
|
|
||||||
# move focus to the parent container
|
# move focus to the parent container
|
||||||
bindsym $mod+a focus parent
|
bindsym $mod+a focus parent
|
||||||
#
|
#
|
||||||
# Scratchpad:
|
# Scratchpad:
|
||||||
#
|
#
|
||||||
# Sway has a "scratchpad", which is a bag of holding for windows.
|
# Sway has a "scratchpad", which is a bag of holding for windows.
|
||||||
# You can send windows there and get them back later.
|
# You can send windows there and get them back later.
|
||||||
|
|
||||||
@ -116,10 +121,10 @@ output 'BOE 0x0BCA Unknown' scale 1.5
|
|||||||
# Show the next scratchpad window or hide the focused scratchpad window.
|
# Show the next scratchpad window or hide the focused scratchpad window.
|
||||||
# If there are multiple scratchpad windows, this command cycles through them.
|
# If there are multiple scratchpad windows, this command cycles through them.
|
||||||
bindsym $mod+minus scratchpad show
|
bindsym $mod+minus scratchpad show
|
||||||
#
|
#
|
||||||
# Resizing containers:
|
# Resizing containers:
|
||||||
#
|
#
|
||||||
mode "resize" {
|
mode "resize" {
|
||||||
# left will shrink the containers width
|
# left will shrink the containers width
|
||||||
# right will grow the containers width
|
# right will grow the containers width
|
||||||
# up will shrink the containers height
|
# up will shrink the containers height
|
||||||
@ -138,16 +143,16 @@ mode "resize" {
|
|||||||
# return to default mode
|
# return to default mode
|
||||||
bindsym Return mode "default"
|
bindsym Return mode "default"
|
||||||
bindsym Escape mode "default"
|
bindsym Escape mode "default"
|
||||||
}
|
}
|
||||||
bindsym $mod+r mode "resize"
|
bindsym $mod+r mode "resize"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
movement = pkgs.writeTextFile {
|
movement = pkgs.writeTextFile {
|
||||||
name = "movement.conf";
|
name = "movement.conf";
|
||||||
text = ''
|
text = ''
|
||||||
#
|
#
|
||||||
# Moving around:
|
# Moving around:
|
||||||
#
|
#
|
||||||
# Move your focus around
|
# Move your focus around
|
||||||
# bindsym $mod+$left focus left
|
# bindsym $mod+$left focus left
|
||||||
# bindsym $mod+$down focus down
|
# bindsym $mod+$down focus down
|
||||||
@ -169,9 +174,9 @@ bindsym $mod+r mode "resize"
|
|||||||
bindsym $mod+Shift+Down move down
|
bindsym $mod+Shift+Down move down
|
||||||
bindsym $mod+Shift+Up move up
|
bindsym $mod+Shift+Up move up
|
||||||
bindsym $mod+Shift+Right move right
|
bindsym $mod+Shift+Right move right
|
||||||
#
|
#
|
||||||
# Workspaces:
|
# Workspaces:
|
||||||
#
|
#
|
||||||
# switch to workspace
|
# switch to workspace
|
||||||
bindsym $mod+1 workspace 1
|
bindsym $mod+1 workspace 1
|
||||||
bindsym $mod+2 workspace 2
|
bindsym $mod+2 workspace 2
|
||||||
@ -196,18 +201,18 @@ bindsym $mod+r mode "resize"
|
|||||||
bindsym $mod+Shift+0 move container to workspace 10
|
bindsym $mod+Shift+0 move container to workspace 10
|
||||||
# Note: workspaces can have any name you want, not just numbers.
|
# Note: workspaces can have any name you want, not just numbers.
|
||||||
# We just use 1-10 as the default.
|
# We just use 1-10 as the default.
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
disable-focus-follows-mouse = pkgs.writeTextFile {
|
disable-focus-follows-mouse = pkgs.writeTextFile {
|
||||||
name = "disable-focus-follows-mouse.conf";
|
name = "disable-focus-follows-mouse.conf";
|
||||||
text = ''
|
text = ''
|
||||||
# Disable focus following mouse
|
# Disable focus following mouse
|
||||||
focus_follows_mouse no
|
focus_follows_mouse no
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
alacritty
|
alacritty
|
||||||
|
@ -1,7 +1,12 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [];
|
imports = [ ];
|
||||||
|
|
||||||
boot.zfs.devNodes = "/dev/disk/by-partuuid";
|
boot.zfs.devNodes = "/dev/disk/by-partuuid";
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user