1 Commits

Author SHA1 Message Date
1d205d39c3 users/jordan: add niri config 2025-12-26 23:09:37 +00:00
44 changed files with 1894 additions and 773 deletions

View File

@@ -5,7 +5,7 @@ System and user configuration for NixOS-based systems.
| | |
|-|-|
| **Shell:** | zsh |
| **WM:** | Niri |
| **WM:** | Hyprland |
| **Theme:** | Adwaita |
| **Terminal:** | kitty |

761
flake.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -34,6 +34,13 @@
inputs.nixpkgs.follows = "nixpkgs";
};
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
};
firefox-gnome-theme = {
url = "github:rafaelmardojai/firefox-gnome-theme";
flake = false;
@@ -53,13 +60,13 @@
flake = false;
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
niri = {
url = "github:sodiboo/niri-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url = "github:NixOS/nixos-hardware";
nixos-mailserver = {
url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.11";
inputs.nixpkgs.follows = "nixpkgs";
@@ -79,11 +86,7 @@
nix-topology = {
url = "github:oddlama/nix-topology";
inputs.nixpkgs.follows = "nixpkgs";
};
noctalia = {
url = "github:noctalia-dev/noctalia-shell";
inputs.nixpkgs.follows = "nixpkgs";
inputs.pre-commit-hooks.follows = "pre-commit-hooks";
};
pre-commit-hooks = {
@@ -105,11 +108,6 @@
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:youwen5/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
@@ -143,7 +141,7 @@
perSystem =
{ pkgs, ... }:
{
formatter = pkgs.nixfmt;
formatter = pkgs.nixfmt-rfc-style;
legacyPackages = pkgs.lib.packagesFromDirectoryRecursive {
callPackage = pkgs.callPackage;
@@ -175,7 +173,7 @@
no-lambda-arg = true;
};
mdformat.enable = true;
nixfmt.enable = true;
nixfmt-rfc-style.enable = true;
shellcheck.enable = true;
};
};

View File

@@ -103,6 +103,10 @@ in
enable = true;
interfaces = [ "wlp11s0" ];
};
desktop = {
gnome.enable = lib.mkForce false;
hyprland.enable = false;
};
};
};

View File

@@ -68,9 +68,8 @@ in
"amdgpu.sched_hw_submission=4"
"audit=0"
];
kernelPackages = pkgs.linuxPackages_6_18;
kernelPackages = pkgs.linuxPackages_6_17;
supportedFilesystems = [ "ntfs" ];
zfs.package = pkgs.zfs_2_4;
};
hardware = {

View File

@@ -30,7 +30,7 @@
config = {
allowUnfree = true;
};
system = final.stdenv.hostPlatform.system;
system = final.system;
};
})
(import ../overlays/default.nix)
@@ -80,10 +80,9 @@
nix = {
package = pkgs.nixVersions.stable;
settings.extra-experimental-features = [
"flakes"
"nix-command"
];
extraOptions = ''
experimental-features = nix-command flakes
'';
buildMachines = [
{
hostName = "10.0.1.235";

View File

@@ -51,6 +51,7 @@
systemd.services.NetworkManager-wait-online.enable = false;
modules = {
system.desktop.gnome.enable = true;
services.tailscale.enable = true;
};

View File

@@ -1,8 +1,12 @@
{
pkgs,
lib,
...
}:
let
inherit (lib) mkForce;
in
{
imports = [
./hardware-configuration.nix
@@ -41,6 +45,10 @@
repoPath = "ssh://b9cjl9hq@b9cjl9hq.repo.borgbase.com/./repo";
};
};
system.desktop = {
gnome.enable = mkForce false;
hyprland.enable = true;
};
};
system.stateVersion = "22.11";

View File

@@ -0,0 +1,101 @@
From d310ddee0fb8e7a5a8b89668c6cb8f9dc863ce94 Mon Sep 17 00:00:00 2001
From: Jordan Holt <jordan@vimium.com>
Date: Sun, 28 Apr 2024 15:59:52 +0100
Subject: [PATCH] Add apple_set_os EFI boot service
---
drivers/firmware/efi/libstub/x86-stub.c | 59 +++++++++++++++++++++++++
include/linux/efi.h | 1 +
2 files changed, 60 insertions(+)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index d5a8182cf..be722c43a 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -449,6 +449,63 @@ static void setup_graphics(struct boot_params *boot_params)
}
}
+typedef struct {
+ u64 version;
+ void (*set_os_version) (const char *os_version);
+ void (*set_os_vendor) (const char *os_vendor);
+} apple_set_os_interface_t;
+
+static efi_status_t apple_set_os()
+{
+ apple_set_os_interface_t *set_os;
+ efi_guid_t set_os_guid = APPLE_SET_OS_PROTOCOL_GUID;
+ efi_status_t status;
+ void **handles;
+ unsigned long i, nr_handles, size = 0;
+
+ status = efi_bs_call(locate_handle, EFI_LOCATE_BY_PROTOCOL,
+ &set_os_guid, NULL, &size, handles);
+
+ if (status == EFI_BUFFER_TOO_SMALL) {
+ status = efi_bs_call(allocate_pool, EFI_LOADER_DATA,
+ size, &handles);
+
+ if (status != EFI_SUCCESS)
+ return status;
+
+ status = efi_bs_call(locate_handle, EFI_LOCATE_BY_PROTOCOL,
+ &set_os_guid, NULL, &size, handles);
+ }
+
+ if (status != EFI_SUCCESS)
+ goto free_handle;
+
+ nr_handles = size / sizeof(void *);
+ for (i = 0; i < nr_handles; i++) {
+ void *h = handles[i];
+
+ status = efi_bs_call(handle_protocol, h,
+ &set_os_guid, &set_os);
+
+ if (status != EFI_SUCCESS || !set_os)
+ continue;
+
+ if (set_os->version > 0) {
+ efi_bs_call((unsigned long)set_os->set_os_version,
+ "Mac OS X 10.9");
+ }
+
+ if (set_os->version >= 2) {
+ efi_bs_call((unsigned long)set_os->set_os_vendor,
+ "Apple Inc.");
+ }
+ }
+
+free_handle:
+ efi_bs_call(free_pool, uga_handle);
+
+ return status;
+}
static void __noreturn efi_exit(efi_handle_t handle, efi_status_t status)
{
@@ -951,6 +1008,8 @@ void __noreturn efi_stub_entry(efi_handle_t handle,
setup_unaccepted_memory();
+ apple_set_os();
+
status = exit_boot(boot_params, handle);
if (status != EFI_SUCCESS) {
efi_err("exit_boot() failed!\n");
diff --git a/include/linux/efi.h b/include/linux/efi.h
index d59b0947f..81158014f 100644
--- a/include/linux/efi.h
+++ b/include/linux/efi.h
@@ -385,6 +385,7 @@ void efi_native_runtime_setup(void);
#define EFI_MEMORY_ATTRIBUTES_TABLE_GUID EFI_GUID(0xdcfa911d, 0x26eb, 0x469f, 0xa2, 0x20, 0x38, 0xb7, 0xdc, 0x46, 0x12, 0x20)
#define EFI_CONSOLE_OUT_DEVICE_GUID EFI_GUID(0xd3b36f2c, 0xd551, 0x11d4, 0x9a, 0x46, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d)
#define APPLE_PROPERTIES_PROTOCOL_GUID EFI_GUID(0x91bd12fe, 0xf6c3, 0x44fb, 0xa5, 0xb7, 0x51, 0x22, 0xab, 0x30, 0x3a, 0xe0)
+#define APPLE_SET_OS_PROTOCOL_GUID EFI_GUID(0xc5c5da95, 0x7d5c, 0x45e6, 0xb2, 0xf1, 0x3f, 0xd5, 0x2b, 0xb1, 0x00, 0x77)
#define EFI_TCG2_PROTOCOL_GUID EFI_GUID(0x607f766c, 0x7455, 0x42be, 0x93, 0x0b, 0xe4, 0xd7, 0x6d, 0xb2, 0x72, 0x0f)
#define EFI_TCG2_FINAL_EVENTS_TABLE_GUID EFI_GUID(0x1e2ed096, 0x30e2, 0x4254, 0xbd, 0x89, 0x86, 0x3b, 0xbe, 0xf8, 0x23, 0x25)
#define EFI_LOAD_FILE_PROTOCOL_GUID EFI_GUID(0x56ec3091, 0x954c, 0x11d2, 0x8e, 0x3f, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x3b)
--
2.42.0

View File

@@ -24,24 +24,16 @@ Apple SSD SM0512F | `/dev/sda1` (EFI, 256 MiB, NixOS Boot) <br> `/dev/sda2` (ZFS
rpool/
├── local
│ ├── nix
│ └── tmp
├── system
│ ├── root
│ └── state
└── safe
└── persist
│ └── var
└── user
└── home
```
See [Graham Christensen's article](https://grahamc.com/blog/nixos-on-zfs/#datasets) for the motivation behind these datasets.
#### Impermanence
This machine uses [impermanence](https://github.com/nix-community/impermanence) and is rolled back to a clean state on each reboot.
Mountpoint | Persists across reboots? | Backed up?
--- | --- | ---
`/` | No | Yes
`/state` | Yes | No
`/persist` | Yes | Yes
### Networks
- DHCP on `10.0.1.0/24` subnet.

View File

@@ -4,113 +4,50 @@
pkgs,
...
}:
let
inherit (lib)
mkForce
;
in
{
imports = [
inputs.disko.nixosModules.disko
./hardware-configuration.nix
./disko-config.nix
../desktop.nix
../../modules/nixos/deterministic-ids.nix
../../users/jordan
];
nixpkgs = {
hostPlatform = "x86_64-linux";
config = {
permittedInsecurePackages = [ "broadcom-sta-6.30.223.271-59-6.12.63" ];
nvidia.acceptLicense = true;
permittedInsecurePackages = [ "broadcom-sta-6.30.223.271-57-6.12.41" ];
};
};
age.rekey.hostPubkey = ./ssh_host_ed25519_key.pub;
boot = {
loader = {
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
initrd.systemd = {
enable = true;
extraBin.cryptsetup = "${pkgs.cryptsetup}/bin/cryptsetup";
services."zfs-import-rpool".after = [ "cryptsetup.target" ];
};
tmp.useTmpfs = true;
};
console.earlySetup = true;
networking.hostId = "cf791898";
systemd.network.enable = true;
systemd.network.wait-online.enable = false;
networking = {
hostId = "cf791898";
useNetworkd = true;
dhcpcd.enable = false;
firewall = {
enable = true;
allowedTCPPorts = [
22 # SSH
];
# nvidia 470 driver doesn't work with Wayland
services = {
xserver = {
displayManager.gdm.wayland = lib.mkForce false;
videoDrivers = [ "nvidia" ];
};
displayManager = {
defaultSession = "gnome-xorg";
};
services.resolved = {
enable = true;
dnssec = "false";
fallbackDns = [
"9.9.9.9"
"2620:fe::fe"
"1.1.1.1"
"2606:4700:4700::1111"
];
llmnr = "false";
extraConfig = ''
MulticastDNS=false
'';
};
# Workaround for label rendering bug in GTK4 with nvidia 470 driver
environment.sessionVariables.GSK_RENDERER = "gl";
environment.persistence."/persist".enable = mkForce true;
environment.persistence."/state".enable = mkForce true;
modules = {
system.desktop.gnome.enable = mkForce false;
};
services.openssh.settings.PermitRootLogin = mkForce "prohibit-password";
users = {
users = {
root = {
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILVHTjsyMIV4THNw6yz0OxAxGnC+41gX72UrPqTzR+OS jordan@vimium.com"
environment.systemPackages = [
pkgs.moonlight-qt
];
};
};
};
users.deterministicIds =
let
uidGid = id: {
uid = id;
gid = id;
};
in
{
systemd-oom = uidGid 999;
systemd-coredump = uidGid 998;
sshd = uidGid 997;
nscd = uidGid 996;
polkituser = uidGid 995;
rtkit = uidGid 994;
lpadmin = uidGid 993;
};
system.stateVersion = "22.11";
}

View File

@@ -8,28 +8,17 @@
content = {
type = "gpt";
partitions = {
efi = {
ESP = {
size = "256M";
type = "ef00";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
swap = {
size = "8G";
content = {
type = "swap";
randomEncryption = true;
};
};
rpool = {
zfs = {
size = "100%";
content = {
type = "luks";
name = "rpool_ata-APPLE_SSD_SM0512F_S1K5NYBF736152";
settings.allowDiscards = true;
content = {
type = "zfs";
pool = "rpool";
@@ -39,7 +28,6 @@
};
};
};
};
zpool = {
rpool = {
type = "zpool";
@@ -47,59 +35,87 @@
ashift = "12";
};
rootFsOptions = {
compression = "zstd";
acltype = "posix";
atime = "off";
xattr = "sa";
dnodesize = "auto";
mountpoint = "none";
canmount = "off";
devices = "off";
exec = "off";
setuid = "off";
mountpoint = "none";
dnodesize = "auto";
xattr = "sa";
};
postCreateHook = "zfs snapshot rpool@blank";
datasets = {
"local" = {
local = {
type = "zfs_fs";
};
"local/root" = {
type = "zfs_fs";
mountpoint = "/";
options = {
canmount = "noauto";
mountpoint = "/";
exec = "on";
setuid = "on";
mountpoint = "none";
};
postCreateHook = "zfs snapshot rpool/local/root@blank";
};
"local/nix" = {
type = "zfs_fs";
mountpoint = "/nix";
options = {
canmount = "noauto";
mountpoint = "/nix";
exec = "on";
setuid = "on";
atime = "off";
mountpoint = "legacy";
};
};
"local/state" = {
"local/tmp" = {
type = "zfs_fs";
mountpoint = "/state";
mountpoint = "/tmp";
options = {
canmount = "noauto";
mountpoint = "/state";
setuid = "off";
devices = "off";
mountpoint = "legacy";
};
};
"safe" = {
system = {
type = "zfs_fs";
};
"safe/persist" = {
type = "zfs_fs";
mountpoint = "/persist";
mountpoint = "/";
options = {
canmount = "noauto";
mountpoint = "/persist";
mountpoint = "legacy";
};
};
"system/var" = {
type = "zfs_fs";
mountpoint = "/var";
options = {
mountpoint = "legacy";
};
};
"system/var/tmp" = {
type = "zfs_fs";
mountpoint = "/var/tmp";
options = {
devices = "off";
mountpoint = "legacy";
};
};
"system/var/log" = {
type = "zfs_fs";
mountpoint = "/var/log";
options = {
compression = "on";
acltype = "posix";
mountpoint = "legacy";
};
};
user = {
type = "zfs_fs";
options = {
mountpoint = "none";
encryption = "aes-256-gcm";
keyformat = "passphrase";
keylocation = "file:///tmp/secret.key";
};
# use this to read the key during boot
postCreateHook = ''
zfs set keylocation="prompt" "rpool/$name";
'';
};
"user/home" = {
type = "zfs_fs";
mountpoint = "/home";
options = {
setuid = "off";
devices = "off";
mountpoint = "legacy";
};
};
};

View File

@@ -30,6 +30,7 @@
];
extraModulePackages = [
config.boot.kernelPackages.broadcom_sta
config.boot.kernelPackages.nvidiaPackages.legacy_470
];
};
@@ -39,6 +40,11 @@
hardware = {
cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
nvidia = {
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
modesetting.enable = true;
powerManagement.enable = true;
};
graphics = {
enable = true;
extraPackages = with pkgs; [

View File

@@ -1,4 +1,5 @@
{
lib,
pkgs,
...
}:
@@ -82,12 +83,6 @@
};
};
# We actually use the home-manager module to add the actual portal config,
# but need this so relevant implementations are found
environment.pathsToLink = [
"/share/xdg-desktop-portal"
];
modules = {
hardware.presonus-studio.enable = true;
services = {
@@ -105,6 +100,10 @@
repoPath = "ssh://iqwu22oq@iqwu22oq.repo.borgbase.com/./repo";
};
};
system.desktop = {
gnome.enable = lib.mkForce false;
hyprland.enable = true;
};
};
system.stateVersion = "22.11";

View File

@@ -5,6 +5,8 @@
./services/borgmatic.nix
./services/postgresql.nix
./services/tailscale.nix
./system/desktop/gnome.nix
./system/desktop/hyprland.nix
./system/wireless.nix
];
}

View File

@@ -1,100 +0,0 @@
{
lib,
config,
...
}:
let
inherit (lib)
concatLists
flip
mapAttrsToList
mkDefault
mkIf
mkOption
types
;
cfg = config.users.deterministicIds;
in
{
options = {
users.deterministicIds = mkOption {
default = { };
description = ''
Maps a user or group name to its expected uid/gid values. If a user/group is
used on the system without specifying a uid/gid, this module will assign the
corresponding ids defined here, or show an error if the definition is missing.
'';
type = types.attrsOf (
types.submodule {
options = {
uid = mkOption {
type = types.nullOr types.int;
default = null;
description = "The uid to assign if it is missing in `users.users.<name>`.";
};
gid = mkOption {
type = types.nullOr types.int;
default = null;
description = "The gid to assign if it is missing in `users.groups.<name>`.";
};
};
}
);
};
users.users = mkOption {
type = types.attrsOf (
types.submodule (
{ name, ... }:
{
config.uid =
let
deterministicUid = cfg.${name}.uid or null;
in
mkIf (deterministicUid != null) (mkDefault deterministicUid);
}
)
);
};
users.groups = mkOption {
type = types.attrsOf (
types.submodule (
{ name, ... }:
{
config.gid =
let
deterministicGid = cfg.${name}.gid or null;
in
mkIf (deterministicGid != null) (mkDefault deterministicGid);
}
)
);
};
};
config = {
assertions =
concatLists (
flip mapAttrsToList config.users.users (
name: user: [
{
assertion = user.uid != null;
message = "non-deterministic uid detected for '${name}', please assign one via `users.deterministicIds`";
}
{
assertion = !user.autoSubUidGidRange;
message = "non-deterministic subUids/subGids detected for: ${name}";
}
]
)
)
++ flip mapAttrsToList config.users.groups (
name: group: {
assertion = group.gid != null;
message = "non-deterministic gid detected for '${name}', please assign one via `users.deterministicIds`";
}
);
};
}

View File

@@ -1,14 +1,21 @@
{
config,
pkgs,
lib,
...
}:
let
inherit (lib)
attrNames
flip
isAttrs
mapAttrs
mkIf
mkMerge
mkOption
optionals
types
;
zfsPkg = config.boot.zfs.package;
in
{
boot.zfs.forceImportRoot = false;
@@ -24,7 +31,7 @@ in
unitConfig.DefaultDependencies = "no";
serviceConfig = {
Type = "oneshot";
ExecStart = "${zfsPkg}/bin/zfs rollback -r rpool/local/root@blank";
ExecStart = "${pkgs.zfs}/bin/zfs rollback -r rpool/local/root@blank";
};
};
@@ -81,4 +88,60 @@ in
};
users.mutableUsers = !config.environment.persistence."/persist".enable;
# For each user that has a home-manager config, merge the locally defined
# persistence options that we defined above.
imports =
let
mkUserFiles = map (
x: { parentDirectory.mode = "700"; } // (if isAttrs x then x else { file = x; })
);
mkUserDirs = map (x: { mode = "700"; } // (if isAttrs x then x else { directory = x; }));
in
[
{
environment.persistence = mkMerge (
flip map (attrNames config.home-manager.users) (
user:
let
hmUserCfg = config.home-manager.users.${user};
in
flip mapAttrs hmUserCfg.home.persistence (
_: sourceCfg: {
users.${user} = {
files = mkUserFiles sourceCfg.files;
directories = mkUserDirs sourceCfg.directories;
};
}
)
)
);
}
];
home-manager.sharedModules = [
{
options.home.persistence = mkOption {
description = "Additional persistence config for the given source path";
default = { };
type = types.attrsOf (
types.submodule {
options = {
files = mkOption {
description = "Additional files to persist via NixOS impermanence.";
type = types.listOf (types.either types.attrs types.str);
default = [ ];
};
directories = mkOption {
description = "Additional directories to persist via NixOS impermanence.";
type = types.listOf (types.either types.attrs types.str);
default = [ ];
};
};
}
);
};
}
];
}

View File

@@ -1,4 +1,5 @@
{
pkgs,
lib,
config,
...
@@ -8,7 +9,6 @@ with lib;
let
cfg = config.modules.podman;
zfsPkg = config.boot.zfs.package;
in
{
options.modules.podman = {
@@ -29,7 +29,7 @@ in
dates = "weekly";
flags = [ "--all" ];
};
extraPackages = [ zfsPkg ];
extraPackages = [ pkgs.zfs ];
};
containers.storage.settings.storage = {

View File

@@ -0,0 +1,79 @@
{
config,
lib,
pkgs,
...
}:
let
cfg = config.modules.system.desktop.gnome;
in
{
options.modules.system.desktop.gnome = {
enable = lib.mkOption {
default = false;
example = true;
};
};
config = lib.mkIf cfg.enable {
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
};
services.flatpak.enable = true;
services.fwupd.enable = true;
programs.dconf.enable = true;
environment.systemPackages = with pkgs.unstable; [
adw-gtk3
adwaita-fonts
libsForQt5.qtstyleplugin-kvantum
morewaita-icon-theme
nautilus-python
qadwaitadecorations
qadwaitadecorations-qt6
## Shell extensions
gnomeExtensions.appindicator
gnomeExtensions.arcmenu
gnomeExtensions.blur-my-shell
gnomeExtensions.burn-my-windows
gnomeExtensions.clipboard-indicator
gnomeExtensions.coverflow-alt-tab
gnomeExtensions.dash-to-panel
gnomeExtensions.desktop-cube
gnomeExtensions.easyScreenCast
gnomeExtensions.fly-pie
gnomeExtensions.forge
gnomeExtensions.gsconnect
gnomeExtensions.gsnap
gnomeExtensions.hide-top-bar
gnomeExtensions.just-perfection
gnomeExtensions.media-controls
gnomeExtensions.mouse-follows-focus
# gnomeExtensions.pano (disabled due to: https://github.com/NixOS/nixpkgs/issues/369438)
gnomeExtensions.paperwm
gnomeExtensions.pip-on-top
gnomeExtensions.search-light
gnomeExtensions.smart-auto-move
gnomeExtensions.space-bar
gnomeExtensions.tiling-assistant
gnomeExtensions.tiling-shell
gnomeExtensions.todotxt
gnomeExtensions.vitals
gnomeExtensions.window-is-ready-remover
gnomeExtensions.worksets
gnomeExtensions.workspace-matrix
];
environment.persistence."/persist".directories = [
"/etc/NetworkManager"
"/var/lib/AccountsService"
"/var/lib/NetworkManager"
];
};
}

View File

@@ -0,0 +1,25 @@
{
config,
lib,
...
}:
let
inherit (lib)
mkEnableOption
mkIf
;
cfg = config.modules.system.desktop.hyprland;
in
{
options.modules.system.desktop.hyprland.enable = mkEnableOption "hyprland";
config = mkIf cfg.enable {
networking.networkmanager.enable = true;
programs.hyprland = {
enable = true;
withUWSM = true;
};
};
}

View File

@@ -1,7 +0,0 @@
age-encryption.org/v1
-> ssh-ed25519 5PDipg VUUf0H5YtcvVIQGHWSRUjCCWJFC8uyifg9jb3dcKQEM
2u40LYxerTKD200Mkp/UhMFDwRQy/u74lpFa7JG783g
-> vSi-grease xC k Y9 7n3c
WC+dOm6hxAlN9zTouhlfHvZCHfJaGnqOMa5jSIw
--- 0ywtnNEFe21IGFUvzuzK0dO65YKZCymavaqHOmKB9iQ
Lš\_%£™ø%2{ÀˆSªžè eMî‡c¹8ˆÝHzÂ`zžà×<C3A0>LTJ1öð m6JE¡pñd`žÍÁMfÙâ5Äî½ü×ðKAØ<Vbù_¿ÉǬhæÖí¶o# “Ôa€ªóí¸ñ7j„„q>ùW.¤ C«ŸðÏ:Ü¿K•¸«©q]_U•–#/M=×-PÓ¦

View File

@@ -160,7 +160,7 @@ in
enable = true;
settings = {
default_session = {
command = "${pkgs.tuigreet}/bin/tuigreet --time --sessions ${desktops}/share/xsessions:${desktops}/share/wayland-sessions";
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --time --sessions ${desktops}/share/xsessions:${desktops}/share/wayland-sessions";
};
};
};

View File

@@ -7,6 +7,7 @@
imports = [
./common/optional/graphical/firefox.nix
./common/optional/graphical/fonts.nix
./common/optional/graphical/hyprland
./common/optional/graphical/mimeapps.nix
];

View File

@@ -6,7 +6,7 @@
{
imports = [
./common/optional/graphical/firefox.nix
./common/optional/graphical/niri.nix
./common/optional/graphical/gnome.nix
];
home.packages = with pkgs; [

View File

@@ -17,9 +17,6 @@
email = "jordan@vimium.com";
name = "Jordan Holt";
};
rebase.autosquash = true;
push.default = "current";
pull.rebase = true;
};
ignores = [
".Trash-*"
@@ -40,5 +37,10 @@
key = "B8CFFF61F1CCF520";
signByDefault = true;
};
extraConfig = {
rebase.autosquash = true;
push.default = "current";
pull.rebase = true;
};
};
}

View File

@@ -1,10 +0,0 @@
{
...
}:
{
xsession = {
enable = true;
windowManager.awesome.enable = true;
};
}

View File

@@ -0,0 +1,243 @@
{
inputs,
lib,
pkgs,
osConfig,
...
}:
let
inherit (lib)
mkForce
;
inherit (lib.generators)
toINI
;
in
{
dconf.settings = {
"io/github/celluloid-player/celluloid" = {
draggable-video-area-enable = true;
};
"org/gnome/Console" = {
font-scale = 1.4;
use-system-font = false;
custom-font = "ComicShannsMono Nerd Font 10";
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
cursor-theme = "Adwaita";
enable-hot-corners = false;
font-name = "Adwaita Sans 11";
gtk-theme = "adw-gtk3-dark";
icon-theme = "MoreWaita";
monospace-font-name = "Adwaita Mono 11";
toolbar-style = "both-horiz";
};
"org/gnome/desktop/peripherals/touchpad" = {
tap-to-click = true;
};
"org/gnome/desktop/sound" = {
theme-name = "freedesktop";
};
"org/gnome/desktop/search-providers" = {
disabled = [ "org.gnome.Epiphany.desktop" ];
};
"org/gnome/desktop/wm/keybindings" = {
switch-group = [ "<Super>grave" ];
switch-group-backward = [ "<Shift><Super>grave" ];
};
"org/gnome/desktop/wm/preferences" = {
button-layout = "appmenu:close";
};
"org/gnome/gnome-session" = {
auto-save-session = true;
};
"org/gnome/gnome-system-monitor" = {
show-dependencies = true;
};
"org/gnome/mutter" = {
center-new-windows = true;
edge-tiling = true;
experimental-features = [ "scale-monitor-framebuffer" ];
};
"org/gnome/settings-daemon/plugins/media-keys" = {
volume-up = [
"<Shift>F12"
"XF86AudioRaiseVolume"
];
volume-down = [
"<Shift>F11"
"XF86AudioLowerVolume"
];
};
"org/gnome/shell" = {
disable-user-extensions = false;
enabled-extensions = [
"appindicatorsupport@rgcjonas.gmail.com"
# "arcmenu@arcmenu.com"
"blur-my-shell@aunetx"
"burn-my-windows@schneegans.github.com"
"clipboard-indicator@tudmotu.com"
"CoverflowAltTab@palatis.blogspot.com"
# "dash-to-panel@jderose9.github.com"
# "desktop-cube@schneegans.github.com"
# "EasyScreenCast@iacopodeenosee.gmail.com"
"espresso@coadmunkee.github.com"
"flypie@schneegans.github.com"
# "forge@jmmaranan.com"
"gsconnect@andyholmes.github.io"
# "gSnap@micahosborne"
"hidetopbar@mathieu.bidon.ca"
"just-perfection-desktop@just-perfection"
# "mediacontrols@cliffniff.github.com"
# "mousefollowsfocus@matthes.biz"
# "pano@elhan.io"
# "paperwm@hedning:matrix.org"
"pip-on-top@rafostar.github.com"
# "search-light@icedman.github.com"
# "smart-auto-move@khimaros.com"
"space-bar@luchrioh"
# "tiling-assistant@leleat-on-github"
"tilingshell@ferrarodomenico.com"
"Vitals@CoreCoding.com"
"windowIsReady_Remover@nunofarruca@gmail.com"
# "worksets@blipk.xyz"
# "wsmatrix@martin.zurowietz.de"
];
favorite-apps = [
"firefox.desktop"
"org.gnome.Nautilus.desktop"
];
};
"org/gnome/shell/extensions/blur-my-shell/panel" = {
static-blur = true;
};
"org/gnome/shell/extensions/blur-my-shell/applications" = {
blur = false;
};
"org/gnome/shell/extensions/burn-my-windows" = {
fire-close-effect = false;
glide-open-effect = true;
glide-close-effect = true;
};
"org/gnome/shell/extensions/dash-to-panel" = {
intellihide = true;
panel-positions = ''
{"0":"TOP"}
'';
trans-panel-opacity = 0.3;
trans-use-custom-opacity = true;
trans-use-dynamic-opacity = true;
};
"org/gnome/shell/extensions/espresso" = {
enable-fullscreen = true;
show-indicator = true;
show-notifications = false;
inhibit-apps = [
"com.obsproject.Studio.desktop"
];
};
"org/gnome/shell/extensions/flypie" = {
preview-on-right-side = true;
};
"org/gnome/shell/extensions/forge" = {
window-gap-size = 8;
window-gap-hidden-on-single = false;
};
"org/gnome/shell/extensions/hidetopbar" = {
mouse-sensitive = true;
mouse-sensitive-fullscreen-window = true;
enable-active-window = false;
};
"org/gnome/shell/extensions/just-perfection" = {
activities-button = false;
window-demands-attention-focus = true;
workspace-wrap-around = true;
};
"org/gnome/shell/extensions/paperwm" = {
use-default-background = true;
};
"org/gnome/shell/extensions/pip-on-top" = {
stick = true;
};
"org/gnome/shell/extensions/search-light" = {
popup-at-cursor-monitor = true;
};
"org/gnome/shell/extensions/space-bar/behavior" = {
enable-activate-workspace-shortcuts = true;
show-empty-workspaces = true;
smart-workspace-names = false;
};
"org/gnome/shell/extensions/tiling-assistant" = {
screen-top-gap = 8;
screen-right-gap = 8;
screen-bottom-gap = 8;
screen-left-gap = 8;
window-gap = 8;
};
"org/gnome/shell/extensions/tilingshell" = {
inner-gaps = 16;
outer-gaps = 8;
enable-blur-snap-assistant = true;
};
"org/gtk/settings/file-chooser" = {
show-hidden = true;
sort-directories-first = true;
};
"org/gtk/gtk4/settings/file-chooser" = {
show-hidden = true;
sort-directories-first = true;
};
};
home.sessionVariables = {
QT_STYLE_OVERRIDE = mkForce "kvantum";
QT_WAYLAND_DECORATION = mkForce "adwaita";
};
xdg.configFile = {
"Kvantum/kvantum.kvconfig".text = toINI { } {
General.theme = "KvLibadwaitaDark";
};
"Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
};
home.packages =
with pkgs;
[
authenticator
# bottles
# bustle
celluloid
# d-spy
# drawing
# fragments
dconf-editor
ghex
ghostty
# gnome-builder
gnome-decoder
gnome-firmware
gnome-frog
# gnome-obfuscate
gnome-podcasts
identity
# mission-center
mousam
newsflash
# schemes
shortwave
sysprof
]
++ (
if osConfig.virtualisation.podman.enable then
[
pods
]
else
[ ]
);
services.gpg-agent.pinentry.package = pkgs.pinentry-gnome3;
}

View File

@@ -0,0 +1,332 @@
{
inputs,
lib,
pkgs,
osConfig,
...
}:
let
inherit (lib)
attrValues
concatStringsSep
elem
mapAttrs
mkIf
versionOlder
;
inherit (lib.generators)
toINI
;
concatMapAttrsStringSep =
sep: f: attrs:
concatStringsSep sep (attrValues (mapAttrs f attrs));
globalVariables = {
_JAVA_AWT_WM_NONREPARENTING = "1";
GDK_BACKEND = "wayland";
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
QT_QPA_PLATFORM = "wayland";
QT_STYLE_OVERRIDE = "kvantum";
QT_WAYLAND_DECORATION = "adwaita";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
SDL_VIDEODRIVER = "wayland";
XDG_SESSION_TYPE = "wayland";
}
// (
if elem "nvidia" osConfig.services.xserver.videoDrivers then
{
GBM_BACKEND = "nvidia-drm";
GSK_RENDERER =
if versionOlder osConfig.hardware.nvidia.package.version "570" then "ngl" else "vulkan";
LIBVA_DRIVER_NAME = "nvidia";
}
else
{ }
);
hyprVariables = {
AQ_DRM_DEVICES = "/dev/dri/card0:/dev/dri/card1";
};
in
{
imports = [
./hypridle.nix
./hyprlock.nix
./hyprpaper.nix
./waybar.nix
];
wayland.windowManager.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
plugins = [
# pkgs.unstable.hyprlandPlugins.hyprbars
# pkgs.unstable.hyprlandPlugins.hypr-dynamic-cursors
];
settings = {
general = {
gaps_in = 0;
gaps_out = 0;
border_size = 2;
allow_tearing = false;
layout = "dwindle";
};
plugin = {
dynamic-cursors = {
enabled = false;
mode = "none";
shake = {
enabled = true;
};
};
hyprbars = {
enabled = false;
bar_height = 20;
bar_blur = true;
};
};
dwindle = {
pseudotile = true;
preserve_split = true;
};
master = {
new_status = "master";
};
misc = {
force_default_wallpaper = 0;
disable_hyprland_logo = true;
};
ecosystem = {
no_donation_nag = true;
no_update_news = true;
};
experimental = {
xx_color_management_v4 = true;
};
decoration = {
rounding = 0;
active_opacity = 1.0;
inactive_opacity = 1.0;
shadow = {
enabled = true;
range = 4;
render_power = 3;
};
blur = {
enabled = true;
size = 3;
passes = 1;
vibrancy = 0.1696;
};
};
animations = {
enabled = true;
bezier = [
"easeOutQuint,0.23,1,0.32,1"
"easeInOutCubic,0.65,0.05,0.36,1"
"linear,0,0,1,1"
"almostLinear,0.5,0.5,0.75,1.0"
"quick,0.15,0,0.1,1"
];
animation = [
"global, 1, 10, default"
"border, 1, 5.39, easeOutQuint"
"windows, 1, 4.79, easeOutQuint"
"windowsIn, 1, 4.1, easeOutQuint, popin 87%"
"windowsOut, 1, 1.49, linear, popin 87%"
"fadeIn, 1, 1.73, almostLinear"
"fadeOut, 1, 1.46, almostLinear"
"fade, 1, 3.03, quick"
"layers, 1, 3.81, easeOutQuint"
"layersIn, 1, 4, easeOutQuint, fade"
"layersOut, 1, 1.5, linear, fade"
"fadeLayersIn, 1, 1.79, almostLinear"
"fadeLayersOut, 1, 1.39, almostLinear"
"workspaces, 1, 1.94, almostLinear, fade"
"workspacesIn, 1, 1.21, almostLinear, fade"
"workspacesOut, 1, 1.94, almostLinear, fade"
];
};
monitor = [
"desc:Dell Inc. DELL U3219Q HPTP413, preferred, auto, 1, vrr, 0, bitdepth, 10, cm, hdr"
"desc:LG Electronics LG TV SSCR2, 3840x2160@60, 0x0, 1, vrr, 0, bitdepth, 10, cm, hdr"
];
input = {
kb_layout = "us";
kb_options = "caps:super";
follow_mouse = 1;
sensitivity = 0;
};
device = {
name = "mx-anywhere-3s-mouse";
sensitivity = -0.5;
};
"$terminal" = "kitty";
"$fileManager" = "thunar";
"$menu" = "anyrun";
"$mainMod" = "SUPER";
bind = [
"$mainMod, Q, exec, $terminal"
"$mainMod, C, killactive,"
"$mainMod, M, exit,"
"$mainMod, E, exec, $fileManager"
"$mainMod, V, togglefloating,"
"$mainMod, R, exec, $menu"
"$mainMod, P, pseudo, # dwindle"
"$mainMod, J, togglesplit, # dwindle"
"$mainMod, left, movefocus, l"
"$mainMod, right, movefocus, r"
"$mainMod, up, movefocus, u"
"$mainMod, down, movefocus, d"
"$mainMod, 1, workspace, 1"
"$mainMod, 2, workspace, 2"
"$mainMod, 3, workspace, 3"
"$mainMod, 4, workspace, 4"
"$mainMod, 5, workspace, 5"
"$mainMod, 6, workspace, 6"
"$mainMod, 7, workspace, 7"
"$mainMod, 8, workspace, 8"
"$mainMod, 9, workspace, 9"
"$mainMod, 0, workspace, 10"
"$mainMod SHIFT, 1, movetoworkspace, 1"
"$mainMod SHIFT, 2, movetoworkspace, 2"
"$mainMod SHIFT, 3, movetoworkspace, 3"
"$mainMod SHIFT, 4, movetoworkspace, 4"
"$mainMod SHIFT, 5, movetoworkspace, 5"
"$mainMod SHIFT, 6, movetoworkspace, 6"
"$mainMod SHIFT, 7, movetoworkspace, 7"
"$mainMod SHIFT, 8, movetoworkspace, 8"
"$mainMod SHIFT, 9, movetoworkspace, 9"
"$mainMod SHIFT, 0, movetoworkspace, 10"
"$mainMod, S, togglespecialworkspace, magic"
"$mainMod SHIFT, S, movetoworkspace, special:magic"
"$mainMod, mouse_down, workspace, e+1"
"$mainMod, mouse_up, workspace, e-1"
];
bindm = [
"$mainMod, mouse:272, movewindow"
"$mainMod, mouse:273, resizewindow"
];
bindel = [
",XF86AudioRaiseVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%+"
",XF86AudioLowerVolume, exec, wpctl set-volume @DEFAULT_AUDIO_SINK@ 5%-"
",XF86AudioMute, exec, wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"
",XF86AudioMicMute, exec, wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle"
",XF86MonBrightnessUp, exec, brightnessctl s 10%+"
",XF86MonBrightnessDown, exec, brightnessctl s 10%-"
];
bindl = [
", XF86AudioNext, exec, playerctl next"
", XF86AudioPause, exec, playerctl play-pause"
", XF86AudioPlay, exec, playerctl play-pause"
", XF86AudioPrev, exec, playerctl previous"
];
windowrulev2 = [
"suppressevent maximize, class:.*"
"nofocus,class:^$,title:^$,xwayland:1,floating:1,fullscreen:0,pinned:0"
];
};
};
xdg.configFile = mkIf osConfig.programs.hyprland.withUWSM {
"Kvantum/kvantum.kvconfig".text = toINI { } {
General.theme = "KvLibadwaitaDark";
};
"Kvantum/KvLibadwaita".source = "${inputs.kvlibadwaita}/src/KvLibadwaita";
"uwsm/env".text = concatMapAttrsStringSep "\n" (
name: value: "export ${name}=${value}"
) globalVariables;
"uwsm/env-hyprland".text = concatMapAttrsStringSep "\n" (
name: value: "export ${name}=${value}"
) hyprVariables;
};
home.pointerCursor = {
enable = true;
gtk.enable = true;
name = "macOS";
package = pkgs.apple-cursor;
size = 28;
};
gtk = {
enable = true;
iconTheme = {
name = "MoreWaita";
package = pkgs.unstable.morewaita-icon-theme;
};
};
fonts.fontconfig = {
enable = true;
defaultFonts = {
sansSerif = [
"Adwaita Sans"
];
emoji = [
"Apple Color Emoji"
];
};
};
programs.kitty = {
enable = true;
settings = {
background = "#000000";
background_opacity = 0.8;
};
};
programs.neovide = {
enable = true;
package = pkgs.unstable.neovide;
settings = {
font.size = 16.0;
};
};
home.packages = with pkgs.unstable; [
anyrun
clipse
dunst
libsForQt5.qtstyleplugin-kvantum
loupe
mpv
qadwaitadecorations
qadwaitadecorations-qt6
wl-clipboard
];
services = {
flameshot.enable = true;
unclutter.enable = true;
};
services.gpg-agent.pinentry.package = pkgs.pinentry-gnome3;
}

View File

@@ -0,0 +1,28 @@
{
...
}:
{
services.hypridle = {
enable = true;
settings = {
general = {
after_sleep_cmd = "hyprctl dispatch dpms on";
ignore_dbus_inhibit = false;
lock_cmd = "hyprlock";
};
listener = [
{
timeout = 900;
on-timeout = "hyprlock";
}
{
timeout = 1200;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on";
}
];
};
};
}

View File

@@ -0,0 +1,51 @@
{
config,
lib,
...
}:
let
inherit (lib)
getExe
;
in
{
wayland.windowManager.hyprland.settings.bind = [
"$mainMod, L, exec, uwsm app -- ${getExe config.programs.hyprlock.package}"
];
programs.hyprlock = {
enable = true;
settings = {
general = {
disable_loading_bar = false;
grace = 3;
hide_cursor = true;
no_fade_in = false;
};
background = [
{
path = "screenshot";
blur_passes = 3;
blur_size = 8;
}
];
input-field = [
{
size = "200, 50";
position = "0, -80";
monitor = "";
dots_center = true;
fade_on_empty = false;
font_color = "rgb(202, 211, 245)";
inner_color = "rgb(91, 96, 120)";
outer_color = "rgb(24, 25, 38)";
outline_thickness = 5;
placeholder_text = "Password...";
shadow_passes = 2;
}
];
};
};
}

View File

@@ -0,0 +1,21 @@
{
...
}:
{
services.hyprpaper = {
enable = true;
settings = {
ipc = "on";
splash = false;
preload = [
"/home/jordan/Pictures/Aurora.png"
];
wallpaper = [
",/home/jordan/Pictures/Aurora.png"
];
};
};
}

View File

@@ -0,0 +1,96 @@
* {
font-family: sans-serif;
}
window#waybar {
background: linear-gradient(
to bottom,
rgba(118, 118, 118, 0.78) 0%,
rgba(50, 50, 50, 0.78) 50%,
rgba(0, 0, 0, 0.74) 50%,
rgba(0, 0, 0, 0.76) 100%
);
border-top: 1px solid rgba(71, 71, 71, 0.90);
border-bottom: 1px solid rgba(0, 0, 0, 0.97);
box-shadow: inset 0px 1px 0px 0px rgba(158, 158, 158, 0.90);
text-shadow: black 0px 0px 2px;
color: white;
}
#workspaces button {
margin: 2px;
background: linear-gradient(
to bottom,
rgba(255, 255, 255, 0.35) 0%,
rgba(255, 255, 255, 0.11) 50%,
rgba(255, 255, 255, 0) 50%
);
border: 1px solid rgba(0, 0, 0, 0.37);
border-radius: 4px;
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.25);
text-shadow: black 0px 0px 2px;
color: white;
}
#workspaces button:hover {
background:
linear-gradient(
to bottom,
rgba(255, 255, 255, 0.35) 0%,
rgba(255, 255, 255, 0.17) 50%,
rgba(255, 255, 255, 0) 50%
),
radial-gradient(
ellipse 80% 80% at 50% 110%,
rgba(44, 126, 204, 1) 0%,
rgba(44, 126, 204, 0) 80%
);
}
#workspaces button.active {
background: linear-gradient(
to bottom,
rgba(0, 0, 0, 0.40) 0%,
rgba(0, 0, 0, 0.38) 50%,
rgba(0, 0, 0, 0.55) 50%
);
box-shadow: inset 0px 1px 0px 0px rgb(0, 0, 0);
}
#workspaces button.active:hover {
background:
linear-gradient(
to bottom,
rgba(0, 0, 0, 0.40) 0%,
rgba(0, 0, 0, 0.38) 50%,
rgba(0, 0, 0, 0.55) 50%
),
radial-gradient(
ellipse 80% 80% at 50% 120%,
rgba(43, 143, 189, 1) 0%,
rgba(43, 143, 189, 0) 80%
);
}
#workspaces button.urgent {
background:
linear-gradient(
to bottom,
rgba(255, 255, 255, 0.35) 0%,
rgba(255, 255, 255, 0.11) 50%,
rgba(255, 255, 255, 0) 50%
),
radial-gradient(
ellipse 80% 80% at 50% 100%,
rgba(199, 128, 14, 1) 0%,
rgba(170, 75, 12, 0) 100%
);
}
.modules-left {
margin-left: 10px;
}
.modules-right {
margin-right: 10px;
}

View File

@@ -0,0 +1,53 @@
{
...
}:
{
programs.waybar = {
enable = true;
settings = [
{
layer = "top";
position = "bottom";
height = 30;
spacing = 10;
modules-left = [
"hyprland/workspaces"
];
modules-center = [
"hyprland/window"
];
modules-right = [
"disk"
"cpu"
"memory"
"privacy"
"clock"
];
clock = {
format = "{:%I:%M %p}";
};
disk = {
format = "{free}";
path = "/";
};
privacy = {
modules = [
{
type = "screenshare";
}
{
type = "audio-in";
}
];
};
}
];
style = ./waybar.css;
systemd.enable = true;
};
}

View File

@@ -1,8 +1,8 @@
{
lib,
pkgs,
config,
lib,
inputs,
pkgs,
...
}:
let
@@ -15,62 +15,38 @@ in
inputs.niri.homeModules.niri
];
services.gnome-keyring.enable = true;
xdg.portal = {
enable = true;
xdgOpenUsePortal = true;
config.niri = {
default = [
"gtk"
"gnome"
"gtk"
];
"org.freedesktop.impl.portal.Access" = [ "gtk" ];
"org.freedesktop.impl.portal.Notification" = [ "gtk" ];
"org.freedesktop.impl.portal.Secret" = [ "gnome-keyring" ];
"org.freedesktop.impl.portal.FileChooser" = [ "gtk" ];
"org.freedesktop.impl.portal.ScreenCast" = [ "xdg-desktop-portal-gnome" ];
"org.freedesktop.impl.portal.Screenshot" = [ "xdg-desktop-portal-gnome" ];
"org.freedesktop.impl.portal.Access" = "gtk";
"org.freedesktop.impl.portal.Notification" = "gtk";
"org.freedesktop.impl.portal.Secret" = "gnome-keyring";
"org.freedesktop.impl.portal.FileChooser" = "gtk";
"org.freedesktop.impl.portal.ScreenCast" = [ "gnome" ];
"org.freedesktop.impl.portal.Screenshot" = [ "gnome" ];
};
extraPortals = [
pkgs.gnome-keyring
pkgs.xdg-desktop-portal-gtk
pkgs.xdg-desktop-portal-gnome
extraPortals = with pkgs; [
xdg-desktop-portal-gtk
xdg-desktop-portal-gnome
];
};
programs.zsh.initContent = lib.mkOrder 9999 ''
if [[ -t 0 && "$(tty || true)" == /dev/tty1 && -z "$DISPLAY" && -z "$WAYLAND_DISPLAY" ]]; then
echo "Login shell detected. Starting wayland..."
niri-session
fi
'';
programs.niri = {
enable = true;
package = pkgs.niri-unstable;
settings = {
xwayland-satellite.path = getExe pkgs.xwayland-satellite-stable;
environment = {
"QT_QPA_PLATFORM" = "wayland";
"XDG_SESSION_TYPE" = "wayland";
"NIXOS_OZONE_WL" = "1";
"MOZ_ENABLE_WAYLAND" = "1";
"MOZ_WEBRENDER" = "1";
"_JAVA_AWT_WM_NONREPARENTING" = "1";
"QT_WAYLAND_DISABLE_WINDOWDECORATION" = "1";
"GDK_BACKEND" = "wayland";
"GBM_BACKEND" = "nvidia-drm";
"GSK_RENDERER" = "vulkan";
"LIBVA_DRIVER_NAME" = "nvidia";
};
input = {
keyboard = {
xkb = {
layout = "us";
options = "ctrl:nocaps";
variant = "intl";
};
repeat-delay = 235;
@@ -96,7 +72,6 @@ in
gestures.hot-corners.enable = false;
debug.honor-xdg-activation-with-invalid-serial = true;
binds = with config.lib.niri.actions; {
"Mod+T".action = spawn "kitty";
"Mod+b".action = spawn "firefox";
@@ -118,7 +93,6 @@ in
allow-when-locked = true;
};
"Mod+Q".action = close-window;
"Mod+Space".action = spawn "noctalia-shell" "ipc" "call" "launcher" "toggle";
"Mod+n".action = focus-column-left;
"Mod+left".action = focus-column-left;
@@ -197,18 +171,19 @@ in
"Mod+y".action = toggle-column-tabbed-display;
"Print".action.screenshot = { };
"Ctrl+Print".action.screenshot-screen = {
show-pointer = false;
};
"Alt+Print".action.screenshot-window = { };
#"Print".action = screenshot;
#"Ctrl+Print".action = screenshot-screen {};
#"Alt+Print".action = screenshot-window;
"Mod+Escape" = {
action = toggle-keyboard-shortcuts-inhibit;
allow-inhibiting = false;
};
# The quit action will show a confirmation dialog to avoid accidental exits.
"Mod+Ctrl+Escape".action = quit;
# Powers off the monitors. To turn them back on, do any input like
# moving the mouse or pressing any other key.
"Mod+Shift+P".action = power-off-monitors;
};
@@ -250,6 +225,7 @@ in
inactive.color = "#505050";
};
shadow = {
# on
softness = 30;
spread = 5;
offset = {
@@ -258,8 +234,10 @@ in
};
draw-behind-window = true;
color = "#00000070";
# inactive-color "#00000054"
};
tab-indicator = {
# off
hide-when-single-tab = true;
place-within-column = true;
gap = 5;
@@ -274,52 +252,10 @@ in
inactive.color = "gray";
};
insert-hint = {
# off
display.color = "#ffc87f80";
};
};
};
};
home.packages = [
pkgs.dconf
];
home.pointerCursor = {
enable = true;
gtk.enable = true;
name = "macOS";
package = pkgs.apple-cursor;
size = 28;
};
gtk = {
enable = true;
iconTheme = {
name = "MoreWaita";
package = pkgs.unstable.morewaita-icon-theme;
};
};
fonts.fontconfig = {
enable = true;
defaultFonts = {
sansSerif = [
"Adwaita Sans"
];
emoji = [
"Apple Color Emoji"
];
};
};
programs.kitty = {
enable = true;
settings = {
background = "#000000";
background_opacity = 0.8;
};
};
services.gpg-agent.pinentry.package = pkgs.pinentry-gnome3;
}

View File

@@ -1,172 +0,0 @@
{
inputs,
...
}:
{
imports = [
inputs.noctalia.homeModules.default
];
programs.niri.settings = {
overview.workspace-shadow.enable = false;
};
programs.noctalia-shell = {
enable = true;
systemd.enable = true;
settings = {
audio = {
cavaFrameRate = 60;
volumeOverdrive = true;
};
bar = {
density = "compact";
marginHorizontal = 0.2;
marginVertical = 0.1;
position = "bottom";
showCapsule = false;
showOutline = false;
transparent = false;
outerCorners = false;
widgets = {
center = [
{
id = "Tray";
blacklist = [ ];
colorizeIcons = false;
drawerEnabled = false;
hidePassive = false;
pinned = [ ];
}
{
id = "Workspace";
characterCount = 10;
colorizeIcons = false;
enableScrollWheel = false;
followFocusedScreen = false;
hideUnoccupied = false;
labelMode = "name";
showApplications = false;
showLabelsOnlyWhenOccupied = false;
}
];
left = [
{
id = "ControlCenter";
colorizeDistroLogo = false;
colorizeSystemIcon = "none";
customIconPath = "";
enableColorization = false;
icon = "noctalia";
useDistroLogo = true;
}
{ id = "WallpaperSelector"; }
{
id = "Spacer";
width = 20;
}
{
id = "SystemMonitor";
diskPath = "/persist";
showCpuTemp = true;
showCpuUsage = true;
showDiskUsage = true;
showGpuTemp = true;
showMemoryAsPercent = true;
showMemoryUsage = true;
showNetworkStats = true;
usePrimaryColor = false;
}
{
id = "AudioVisualizer";
colorName = "primary";
hideWhenIdle = false;
width = 200;
}
];
right = [
{
id = "MediaMini";
hideMode = "hidden";
hideWhenIdle = false;
maxWidth = 145;
scrollingMode = "hover";
showAlbumArt = false;
showArtistFirst = true;
showProgressRing = true;
showVisualizer = false;
useFixedWidth = false;
visualizerType = "linear";
}
{
id = "Spacer";
width = 20;
}
{
id = "Microphone";
displayMode = "alwaysShow";
}
{
id = "Volume";
displayMode = "alwaysShow";
}
{
id = "Brightness";
displayMode = "alwaysShow";
}
{
id = "Spacer";
width = 20;
}
{
id = "Battery";
displayMode = "alwaysShow";
showNoctaliaPerformance = false;
showPowerProfiles = false;
warningThreshold = 20;
}
{
id = "NotificationHistory";
hideWhenZero = true;
showUnreadBadge = true;
}
{
id = "Clock";
customFont = "";
formatHorizontal = "ddd dd.MM. HH:mm:ss";
formatVertical = "HH mm - dd MM";
useCustomFont = false;
usePrimaryColor = false;
}
];
};
};
colorSchemes = {
predefinedScheme = "Ayu";
};
general = {
animationSpeed = 1.5;
radiusRatio = 0.4;
shadowDirection = "center";
shadowOffsetX = 0;
shadowOffsetY = 0;
showSessionButtonsOnLockScreen = false;
};
location = {
firstDayOfWeek = 0;
name = "Manchester, UK";
};
systemMonitor = {
enableNvidiaGpu = true;
};
ui = {
fontDefault = "Adwaita Sans";
fontFixed = "Adwaita Mono";
panelBackgroundOpacity = 1;
};
notifications.enabled = true;
dock.enabled = false;
};
};
}

View File

@@ -1,7 +1,6 @@
{
lib,
pkgs,
config,
...
}:
let
@@ -20,7 +19,7 @@ in
strategy = [ "completion" ];
};
defaultKeymap = "viins";
dotDir = "${config.xdg.configHome}/zsh";
dotDir = ".config/zsh";
enableCompletion = true;
enableVteIntegration = true;

View File

@@ -5,24 +5,6 @@
{
programs.ssh = {
enable = true;
enableDefaultConfig = false;
matchBlocks."*" = {
forwardAgent = false;
addKeysToAgent = "yes";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
hashKnownHosts = false;
userKnownHostsFile = "~/.ssh/known_hosts";
controlMaster = "no";
controlPath = "~/.ssh/master-%r@%n:%p";
controlPersist = "no";
};
};
services.ssh-agent = {
enable = true;
enableZshIntegration = true;
};
home.persistence."/state".files = [

View File

@@ -15,20 +15,10 @@ in
{
age.secrets."passwords/users/jordan".file = "${inputs.secrets}/passwords/users/jordan.age";
age.secrets = {
open-webui-api-key = {
age.secrets.open-webui-api-key = {
rekeyFile = ./secrets/open-webui-api-key.age;
owner = "jordan";
};
nix-access-tokens = {
rekeyFile = ./secrets/nix-access-tokens.age;
};
};
# Increase rate limit with read-only token
nix.extraOptions = ''
!include ${config.age.secrets.nix-access-tokens.path}
'';
users.users.${name} = {
description = "Jordan Holt";
@@ -47,9 +37,7 @@ in
];
shell = pkgs.zsh;
uid = 1000;
createHome = true;
}
// lib.optionalAttrs (!config.users.mutableUsers) { autoSubUidGidRange = false; };
};
home-manager.users.${name} = {
imports = [
@@ -61,14 +49,12 @@ in
./common/ssh.nix
{
home.persistence."/state" = {
enable = false;
directories = [
"Downloads"
".local/state/wireplumber"
];
};
home.persistence."/persist" = {
enable = false;
directories = [
"Desktop"
"Documents"

View File

@@ -5,9 +5,9 @@
{
imports = [
./common/optional/graphical/awesome.nix
./common/optional/graphical/firefox.nix
./common/optional/graphical/fonts.nix
./common/optional/graphical/gnome.nix
];
home.packages = with pkgs; [

View File

@@ -1,5 +1,4 @@
{
inputs,
pkgs,
...
}:
@@ -8,18 +7,15 @@
imports = [
./common/optional/graphical/firefox.nix
./common/optional/graphical/fonts.nix
./common/optional/graphical/hyprland
./common/optional/graphical/libreoffice.nix
./common/optional/graphical/mimeapps.nix
./common/optional/graphical/niri.nix
./common/optional/graphical/noctalia.nix
./common/optional/graphical/thunderbird.nix
];
programs.nh.enable = true;
home.packages =
with pkgs;
[
home.packages = with pkgs; [
# ardour
audacity
blender
@@ -30,13 +26,9 @@
krita
unstable.lutris
mkvtoolnix
mpv
# obs-studio
pcsx2
qbittorrent
xemu
]
++ [
inputs.zen-browser.packages.${pkgs.stdenv.hostPlatform.system}.default
];
}