v1
This commit is contained in:
parent
62df62c3aa
commit
db11846811
27 changed files with 887 additions and 64 deletions
61
flake.lock
generated
61
flake.lock
generated
|
|
@ -40,11 +40,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1739757849,
|
"lastModified": 1742655702,
|
||||||
"narHash": "sha256-Gs076ot1YuAAsYVcyidLKUMIc4ooOaRGO0PqTY7sBzA=",
|
"narHash": "sha256-jbqlw4sPArFtNtA1s3kLg7/A4fzP4GLk9bGbtUJg0JQ=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "9d3d080aec2a35e05a15cedd281c2384767c2cfe",
|
"rev": "0948aeedc296f964140d9429223c7e4a0702a1ff",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -128,13 +128,29 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"nixos-hardware": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1742631601,
|
||||||
|
"narHash": "sha256-yJ3OOAmsGAxSl0bTmKUp3+cEYtSS+V6hUPK2rYhIPr8=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"rev": "380ed15bcd6440606c6856db44a99140d422b46f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "master",
|
||||||
|
"repo": "nixos-hardware",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1741862977,
|
"lastModified": 1742512142,
|
||||||
"narHash": "sha256-prZ0M8vE/ghRGGZcflvxCu40ObKaB+ikn74/xQoNrGQ=",
|
"narHash": "sha256-8XfURTDxOm6+33swQJu/hx6xw1Tznl8vJJN5HwVqckg=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "cdd2ef009676ac92b715ff26630164bb88fec4e0",
|
"rev": "7105ae3957700a9646cc4b766f5815b23ed0c682",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -146,11 +162,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs-master": {
|
"nixpkgs-master": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742049485,
|
"lastModified": 1742738698,
|
||||||
"narHash": "sha256-M7oK+JK7qH1wW103KOPeY/VX8ZTnCM+BGF5kojzdY2g=",
|
"narHash": "sha256-KCtAXWwQs03JmEhP4ss59QVzT+rHZkhQO85KjNy8Crc=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "7c5d41a85cd9050bcd071856d0d17ab6e1fd79e9",
|
"rev": "f3a2a0601e9669a6e38af25b46ce6c4563bcb6da",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
@ -160,28 +176,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1735471104,
|
|
||||||
"narHash": "sha256-0q9NGQySwDQc7RhAV2ukfnu7Gxa5/ybJ2ANT8DQrQrs=",
|
|
||||||
"owner": "nixos",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "88195a94f390381c6afcdaa933c2f6ff93959cb4",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nixos",
|
|
||||||
"ref": "nixos-unstable",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"kmonad": "kmonad",
|
"kmonad": "kmonad",
|
||||||
"lix-module": "lix-module",
|
"lix-module": "lix-module",
|
||||||
"nix-flatpak": "nix-flatpak",
|
"nix-flatpak": "nix-flatpak",
|
||||||
|
"nixos-hardware": "nixos-hardware",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-master": "nixpkgs-master",
|
"nixpkgs-master": "nixpkgs-master",
|
||||||
"zen-browser": "zen-browser"
|
"zen-browser": "zen-browser"
|
||||||
|
|
@ -204,14 +205,16 @@
|
||||||
},
|
},
|
||||||
"zen-browser": {
|
"zen-browser": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742044866,
|
"lastModified": 1742736106,
|
||||||
"narHash": "sha256-h6bj9ieT8EohsVgHL/vkhy5H5SB+1k3J/kZ2jx6sIl8=",
|
"narHash": "sha256-wzdYoYASPlITYBiw2xDyE56DnOcLNsO6QHRGUDj6kq4=",
|
||||||
"owner": "0xc000022070",
|
"owner": "0xc000022070",
|
||||||
"repo": "zen-browser-flake",
|
"repo": "zen-browser-flake",
|
||||||
"rev": "0cac41e1916436fc8734caacb8843f93e336212b",
|
"rev": "7c3008fcc5a436c885d3faaf6d058afc41ae3762",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
||||||
14
flake.nix
14
flake.nix
|
|
@ -7,6 +7,7 @@
|
||||||
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
|
nix-flatpak.url = "github:gmodena/nix-flatpak?ref=latest";
|
||||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
||||||
|
|
||||||
# software
|
# software
|
||||||
lix-module = {
|
lix-module = {
|
||||||
|
|
@ -14,6 +15,7 @@
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
zen-browser.url = "github:0xc000022070/zen-browser-flake";
|
||||||
|
zen-browser.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
kmonad = {
|
kmonad = {
|
||||||
url = "git+https://github.com/jokesper/kmonad?dir=nix&ref=feat-tap-overlap";
|
url = "git+https://github.com/jokesper/kmonad?dir=nix&ref=feat-tap-overlap";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
@ -52,11 +54,13 @@
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
nixosConfigurations = lib.xyno.loadInstances ./instances [
|
nixosConfigurations =
|
||||||
inputs.lix-module.nixosModules.default
|
lib.xyno.loadInstances ./instances ([
|
||||||
inputs.kmonad.nixosModules.default
|
inputs.lix-module.nixosModules.default
|
||||||
inputs.home-manager.nixosModules.default
|
inputs.kmonad.nixosModules.default
|
||||||
];
|
inputs.home-manager.nixosModules.default
|
||||||
|
]
|
||||||
|
++ (import ./modules/module-list.nix));
|
||||||
devShell."x86_64-linux" =
|
devShell."x86_64-linux" =
|
||||||
let
|
let
|
||||||
pkgs = genPkgs "x86_64-linux";
|
pkgs = genPkgs "x86_64-linux";
|
||||||
|
|
|
||||||
51
hm-modules/alacritty.nix
Normal file
51
hm-modules/alacritty.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.alacritty;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.alacritty.enable = lib.mkOption { default = false; };
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.alacritty = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
font.normal.family = "JetBrainsMono NerdFont";
|
||||||
|
colors = {
|
||||||
|
primary = {
|
||||||
|
# hard contrast
|
||||||
|
background = "#1d2021";
|
||||||
|
# normal background = "#282828";
|
||||||
|
# soft contrast background = = "#32302f"
|
||||||
|
foreground = "#ebdbb2";
|
||||||
|
};
|
||||||
|
normal = {
|
||||||
|
black = "#282828";
|
||||||
|
red = "#cc241d";
|
||||||
|
green = "#98971a";
|
||||||
|
yellow = "#d79921";
|
||||||
|
blue = "#458588";
|
||||||
|
magenta = "#b16286";
|
||||||
|
cyan = "#689d6a";
|
||||||
|
white = "#a89984";
|
||||||
|
};
|
||||||
|
bright = {
|
||||||
|
black = "#928374";
|
||||||
|
red = "#fb4934";
|
||||||
|
green = "#b8bb26";
|
||||||
|
yellow = "#fabd2f";
|
||||||
|
blue = "#83a598";
|
||||||
|
magenta = "#d3869b";
|
||||||
|
cyan = "#8ec07c";
|
||||||
|
white = "#ebdbb2";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
48
hm-modules/borgmatic.nix
Normal file
48
hm-modules/borgmatic.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
osConfig,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.borgmatic;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.borgmatic.enable = lib.mkOption { default = false; };
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.borgmatic = {
|
||||||
|
enable = true;
|
||||||
|
backups.system =
|
||||||
|
let
|
||||||
|
notify = "${pkgs.libnotify}/bin/notify-send";
|
||||||
|
in
|
||||||
|
{
|
||||||
|
location.sourceDirectories = [ "/home" "/var" ];
|
||||||
|
location.repositories = [ { path = "ssh://ragon@ds9//backups/${osConfig.networking.hostName}"; } ];
|
||||||
|
location.extraConfig.exclude_if_present = [ ".nobackup" ];
|
||||||
|
storage.encryptionPasscommand = "${pkgs.libsecret}/bin/secret-tool lookup borg-repository system";
|
||||||
|
location.extraConfig.before_backup = [
|
||||||
|
"${notify} -u low -a borgmatic borgmatic \"starting backup\" -t 10000"
|
||||||
|
];
|
||||||
|
location.extraConfig.after_backup = [
|
||||||
|
"${notify} -u low -a borgmatic borgmatic \"finished backup\" -t 10000"
|
||||||
|
];
|
||||||
|
location.extraConfig.on_error = [
|
||||||
|
"${notify} -u critical -a borgmatic borgmatic \"backup failed<br>maybe unlock keepass\""
|
||||||
|
];
|
||||||
|
location.extraConfig.ssh_command = "ssh -o IdentityAgent=/run/user/1000/ssh-agent";
|
||||||
|
location.extraConfig.one_file_system = true;
|
||||||
|
retention = {
|
||||||
|
keepHourly = 24;
|
||||||
|
keepDaily = 7;
|
||||||
|
keepWeekly = 4;
|
||||||
|
keepMonthly = 12;
|
||||||
|
keepYearly = 2;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
services.borgmatic.enable = true;
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
28
hm-modules/dark-theme.nix
Normal file
28
hm-modules/dark-theme.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.dark-theme;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.dark-theme.enable = lib.mkOption { default = false; };
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
dconf = {
|
||||||
|
settings = {
|
||||||
|
"org/gnome/desktop/interface" = {
|
||||||
|
color-scheme = "prefer-dark";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
gtk = {
|
||||||
|
enable = true;
|
||||||
|
gtk4.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||||
|
gtk3.extraConfig.gtk-application-prefer-dark-theme = 1;
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
35
hm-modules/git.nix
Normal file
35
hm-modules/git.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.git;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.git.enable = lib.mkEnableOption "xynos git config";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
lfs.enable = true;
|
||||||
|
|
||||||
|
# Default configs
|
||||||
|
extraConfig = {
|
||||||
|
commit.gpgSign = true;
|
||||||
|
gpg.format = "ssh";
|
||||||
|
|
||||||
|
user.name = "Lucy Hochkamp";
|
||||||
|
user.email = "git@xyno.systems";
|
||||||
|
user.signingKey = # TODO: don't hardcode a computer
|
||||||
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAID/oMAi5jyQsNohfhcSH2ItisTpBGB0WtYTVxJYKKqhj"; # theseus
|
||||||
|
|
||||||
|
# Set default "git pull" behaviour so it doesn't try to default to
|
||||||
|
# either "git fetch; git merge" (default) or "git fetch; git rebase".
|
||||||
|
pull.ff = "only";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ let
|
||||||
cfg = config.xyno.helix;
|
cfg = config.xyno.helix;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.ragon.xyno.enable = lib.mkOption { default = false; };
|
options.xyno.helix.enable = lib.mkOption { default = false; };
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
jsonnet-language-server
|
jsonnet-language-server
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
[
|
[
|
||||||
|
./alacritty.nix
|
||||||
|
./borgmatic.nix
|
||||||
|
# ./git.nix
|
||||||
./helix.nix
|
./helix.nix
|
||||||
|
./dark-theme.nix
|
||||||
]
|
]
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [ ./hardware-configuration.nix ];
|
||||||
|
hardware.keyboard.zsa.enable = true;
|
||||||
|
home-manager.users.${config.xyno.system.user.name} = (
|
||||||
|
{ ... }:
|
||||||
|
{
|
||||||
|
home.packages = [ # work
|
||||||
|
pkgs.unstable.jetbrains.rider
|
||||||
|
(pkgs.unstable.firefox-devedition.overrideAttrs (super: self: { meta.priority = 1; }))
|
||||||
|
];
|
||||||
|
services.flatpak.update.auto.enable = true;
|
||||||
|
services.flatpak = {
|
||||||
|
enable = true;
|
||||||
|
packages = [
|
||||||
|
"com.unicornsonlsd.finamp"
|
||||||
|
"io.github.softfever.OrcaSlicer"
|
||||||
|
"io.anytype.anytype"
|
||||||
|
"org.bionus.Grabber"
|
||||||
|
"org.getmonero.Monero"
|
||||||
|
{
|
||||||
|
appId = "org.gimp.GIMP";
|
||||||
|
origin = "flathub-beta";
|
||||||
|
}
|
||||||
|
"org.kicad.KiCad"
|
||||||
|
"org.pencil2d.Pencil2D"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
xyno.desktop.common-programs.enable = true;
|
||||||
|
xyno.hardware.kmonad.enable = true;
|
||||||
|
xyno.presets.cli.enable = true;
|
||||||
|
xyno.presets.gui.enable = true;
|
||||||
|
xyno.presets.home-manager.enable = true;
|
||||||
|
xyno.system.user.enable = true;
|
||||||
|
xyno.networking.networkd = {
|
||||||
|
enable = true;
|
||||||
|
enableWifi = true;
|
||||||
|
};
|
||||||
|
hardware.bluetooth.enable = true;
|
||||||
|
services.blueman.enable = true;
|
||||||
|
services.power-profiles-daemon.enable = true;
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
system.stateVersion = "24.11";
|
||||||
|
}
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, lib, ... }: {
|
{
|
||||||
modules = [ ./configuration.nix ];
|
modules = [ ./configuration.nix ];
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
hostName = "theseus";
|
hostName = "theseus";
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,68 @@
|
||||||
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
modulesPath,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
|
"${inputs.nixos-hardware}/framework/13-inch/7040-amd"
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [
|
||||||
|
"nvme"
|
||||||
|
"xhci_pci"
|
||||||
|
"thunderbolt"
|
||||||
|
"usb_storage"
|
||||||
|
"usbhid"
|
||||||
|
"sd_mod"
|
||||||
|
];
|
||||||
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
boot.initrd.luks.devices.cryptroot.device =
|
||||||
|
"/dev/disk/by-uuid/4cd8dbb3-8eea-48ff-87b1-92945be291ac";
|
||||||
|
|
||||||
|
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||||
|
boot.kernelModules = [ "kvm-amd" ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
boot.supportedFilesystems = {
|
||||||
|
xfs = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" = {
|
||||||
|
device = "/dev/disk/by-uuid/ca79f433-163a-4c5c-b176-8e694a674dda";
|
||||||
|
fsType = "xfs";
|
||||||
|
neededForBoot = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/boot" = {
|
||||||
|
device = "/dev/disk/by-uuid/DA11-68A6";
|
||||||
|
fsType = "vfat";
|
||||||
|
options = [
|
||||||
|
"fmask=0022"
|
||||||
|
"dmask=0022"
|
||||||
|
"noauto"
|
||||||
|
"x-systemd.automount"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
swapDevices = [
|
||||||
|
{ device = "/dev/disk/by-uuid/96c380b3-4498-4eb8-8a18-5eebe2a41428"; }
|
||||||
|
];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
# networking.interfaces.enp195s0f3u1u3.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.eth0.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||||
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
}
|
||||||
|
|
@ -1,18 +1,31 @@
|
||||||
{ lib, nixpkgs, inputs, self, ... }: rec {
|
{
|
||||||
getDirs = parentDir: lib.mapAttrs (n: v: import v) (lib.filterAttrs (n: v: v == "directory") (builtins.readDir parentDir));
|
lib,
|
||||||
loadInstances = dir: extraModules: lib.mapAttrs
|
nixpkgs,
|
||||||
(n: v: loadInstance v extraModules)
|
inputs,
|
||||||
(getDirs dir);
|
self,
|
||||||
loadInstance = extraModules: instance:
|
...
|
||||||
|
}:
|
||||||
|
rec {
|
||||||
|
getDirs =
|
||||||
|
parentDir:
|
||||||
|
lib.mapAttrs (n: v: (import "${parentDir}/${n}")) (
|
||||||
|
lib.filterAttrs (n: v: v == "directory") (builtins.readDir parentDir)
|
||||||
|
);
|
||||||
|
loadInstances = dir: extraModules: lib.mapAttrs (n: v: loadInstance extraModules v) (getDirs dir);
|
||||||
|
loadInstance =
|
||||||
|
extraModules: instance:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
system = instance.system;
|
system = instance.system;
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = instance.modules ++ extraModules ++ [
|
modules =
|
||||||
{
|
instance.modules
|
||||||
nixpkgs.overlays = [ self.overlays.default ];
|
++ extraModules
|
||||||
nixpkgs.config.allowUnfree = true;
|
++ [
|
||||||
networking.hostName = instance.hostName;
|
{
|
||||||
}
|
nixpkgs.overlays = [ self.overlays.default ];
|
||||||
];
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
networking.hostName = instance.hostName;
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
modules/desktop/audio.nix
Normal file
35
modules/desktop/audio.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.desktop.audio;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.desktop.audio.enable = lib.mkEnableOption "enable pipewire and stuff";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.pipewire = {
|
||||||
|
enable = true;
|
||||||
|
# raopOpenFirewall = true; # airplay
|
||||||
|
pulse.enable = true;
|
||||||
|
extraConfig.pipewire = {
|
||||||
|
"9-clock-allow-higher" = {
|
||||||
|
"context.properties" = {
|
||||||
|
"default.clock.allowed-rates" = [ "44100" "48000" "96000" "192000" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
# "10-raop-discover" = {
|
||||||
|
# "context.modules" = [
|
||||||
|
# {
|
||||||
|
# name = "libpipewire-module-raop-discover";
|
||||||
|
# args = { };
|
||||||
|
# }
|
||||||
|
# ];
|
||||||
|
# };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
53
modules/desktop/common-programs.nix
Normal file
53
modules/desktop/common-programs.nix
Normal file
|
|
@ -0,0 +1,53 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.desktop.common-programs;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.desktop.common-programs.enable =
|
||||||
|
lib.mkEnableOption "install some commonly used programs";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home-manager.users.${config.xyno.system.user.name} = lib.mkIf config.xyno.presets.home-manager.enable ({...}: {
|
||||||
|
xyno.alacritty.enable = true;
|
||||||
|
xyno.helix.enable = true;
|
||||||
|
});
|
||||||
|
programs.steam = {
|
||||||
|
enable = true;
|
||||||
|
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
|
||||||
|
# dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
|
||||||
|
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
|
||||||
|
};
|
||||||
|
programs.evolution.enable = true;
|
||||||
|
services.gnome.evolution-data-server.enable = true;
|
||||||
|
services.flatpak.enable = true;
|
||||||
|
programs.fuse.userAllowOther = true;
|
||||||
|
programs.sway.enable = true;
|
||||||
|
programs.nix-ld.enable = true;
|
||||||
|
programs.gamescope.enable = true;
|
||||||
|
programs.wireshark.enable = true;
|
||||||
|
programs.kdeconnect.enable = true;
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
element-desktop # this is not a place of honor
|
||||||
|
discord # shitcord
|
||||||
|
unstable.signal-desktop
|
||||||
|
obsidian
|
||||||
|
diebahn
|
||||||
|
vlc
|
||||||
|
lutris
|
||||||
|
libreoffice-qt6-fresh
|
||||||
|
inkscape
|
||||||
|
easyeffects
|
||||||
|
dune3d
|
||||||
|
appimage-run
|
||||||
|
unstable.keepassxc
|
||||||
|
inputs.zen-browser.packages."${pkgs.system}".default
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -26,9 +26,13 @@ in
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
systemd.user.services.mako = {
|
systemd.user.services.mako = {
|
||||||
|
unitConfig.PartOf = "graphical-session.target";
|
||||||
|
unitConfig.After = "graphical-session.target";
|
||||||
|
unitConfig.Requisite = "graphical-session.target";
|
||||||
|
serviceConfig.Restart = "on-failure";
|
||||||
wantedBy = [ cfg.wantedBy ];
|
wantedBy = [ cfg.wantedBy ];
|
||||||
script = "${cfg.package}/bin/mako -c ${makoConf}";
|
script = "${cfg.package}/bin/mako -c ${makoConf}";
|
||||||
restartTrigers = makoConf;
|
restartTriggers = [makoConf];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ let
|
||||||
"KeePassXC"
|
"KeePassXC"
|
||||||
"org.gnome.NautilusPreviewer"
|
"org.gnome.NautilusPreviewer"
|
||||||
];
|
];
|
||||||
matchFloat = lib.concatStringSep "\n" (
|
matchFloat = lib.concatStringsSep "\n" (
|
||||||
map (x: ''
|
map (x: ''
|
||||||
window-rule {
|
window-rule {
|
||||||
match app-id="${x}"
|
match app-id="${x}"
|
||||||
|
|
@ -29,12 +29,55 @@ in
|
||||||
waybar.enable = lib.mkDefault true;
|
waybar.enable = lib.mkDefault true;
|
||||||
mako.enable = lib.mkDefault true;
|
mako.enable = lib.mkDefault true;
|
||||||
};
|
};
|
||||||
|
home-manager.users.${config.xyno.system.user.name} = lib.mkIf config.xyno.presets.home-manager.enable ({...}: {
|
||||||
|
xyno.dark-theme.enable = true;
|
||||||
|
});
|
||||||
|
|
||||||
|
# xdg.portal = {
|
||||||
|
# enable = true;
|
||||||
|
# wlr.enable = true;
|
||||||
|
# };
|
||||||
programs.niri.enable = true;
|
programs.niri.enable = true;
|
||||||
environment.etc."niri/config.kdl".text = ''
|
environment.etc."niri/config.kdl".text = ''
|
||||||
// xwayland
|
// xwayland
|
||||||
spawn-at-startup "${pkgs.xwayland-sattelite}/bin/xwayland-sattelite"
|
spawn-at-startup "${pkgs.xwayland-satellite}/bin/xwayland-satellite"
|
||||||
|
|
||||||
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
|
screenshot-path "~/Pictures/screenshots/screenshot-%Y-%m-%d %H-%M-%S.png"
|
||||||
|
// Indicate screencasted windows with red colors.
|
||||||
|
window-rule {
|
||||||
|
match is-window-cast-target=true
|
||||||
|
|
||||||
|
focus-ring {
|
||||||
|
active-color "#f38ba8"
|
||||||
|
inactive-color "#7d0d2d"
|
||||||
|
}
|
||||||
|
|
||||||
|
border {
|
||||||
|
inactive-color "#7d0d2d"
|
||||||
|
}
|
||||||
|
|
||||||
|
shadow {
|
||||||
|
color "#7d0d2d70"
|
||||||
|
}
|
||||||
|
|
||||||
|
tab-indicator {
|
||||||
|
active-color "#f38ba8"
|
||||||
|
inactive-color "#7d0d2d"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Block out password managers from screencasts.
|
||||||
|
window-rule {
|
||||||
|
match app-id=r#"^org\.keepassxc\.KeePassXC$"#
|
||||||
|
match app-id=r#"^org\.gnome\.World\.Secrets$"#
|
||||||
|
|
||||||
|
block-out-from "screencast"
|
||||||
|
}
|
||||||
|
// Block out mako notifications from screencasts.
|
||||||
|
layer-rule {
|
||||||
|
match namespace="^notifications$"
|
||||||
|
|
||||||
|
block-out-from "screencast"
|
||||||
|
}
|
||||||
input {
|
input {
|
||||||
workspace-auto-back-and-forth
|
workspace-auto-back-and-forth
|
||||||
focus-follows-mouse max-scroll-amount="10%"
|
focus-follows-mouse max-scroll-amount="10%"
|
||||||
|
|
|
||||||
48
modules/desktop/swayidle.nix
Normal file
48
modules/desktop/swayidle.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.desktop.swayidle;
|
||||||
|
makoConf = pkgs.writeText "mako.conf" ''
|
||||||
|
font=Source Sans Pro Nerd Font 11
|
||||||
|
background-color=#1d2021ff
|
||||||
|
border-color=#3c3836FF
|
||||||
|
text-color=#ebdbb2ff
|
||||||
|
progress-color=over #928374FF
|
||||||
|
'';
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.desktop.swayidle.enable = lib.mkEnableOption "enable swayidle and swaylock and stuff";
|
||||||
|
options.xyno.desktop.swayidle.wantedBy = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "niri.service";
|
||||||
|
};
|
||||||
|
options.xyno.desktop.swayidle.package = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = pkgs.swayidle;
|
||||||
|
};
|
||||||
|
options.xyno.desktop.swayidle.swaylockPackage = lib.mkOption {
|
||||||
|
type = lib.types.package;
|
||||||
|
default = pkgs.swaylock-effects;
|
||||||
|
};
|
||||||
|
options.xyno.desktop.swayidle.swaylockArgs = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "--fade-in 2 --clock --timestr %T%z --datestr %F";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.systemPackages = with cfg; [ package swaylockPackage ];
|
||||||
|
systemd.user.services.mako = {
|
||||||
|
unitConfig.PartOf = "graphical-session.target";
|
||||||
|
unitConfig.After = "graphical-session.target";
|
||||||
|
unitConfig.Requisite = "graphical-session.target";
|
||||||
|
serviceConfig.Restart = "on-failure";
|
||||||
|
wantedBy = [ cfg.wantedBy ];
|
||||||
|
script = "${cfg.package}/bin/mako -c ${makoConf}";
|
||||||
|
restartTrigers = makoConf;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -15,7 +15,7 @@ in
|
||||||
};
|
};
|
||||||
options.xyno.desktop.waybar.package = lib.mkOption {
|
options.xyno.desktop.waybar.package = lib.mkOption {
|
||||||
type = lib.types.package;
|
type = lib.types.package;
|
||||||
default = pkgs.waybar;
|
default = pkgs.unstable.waybar;
|
||||||
};
|
};
|
||||||
options.xyno.desktop.waybar.mode = lib.mkOption {
|
options.xyno.desktop.waybar.mode = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.str;
|
||||||
|
|
@ -23,24 +23,27 @@ in
|
||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
||||||
|
programs.light.enable = true;
|
||||||
|
|
||||||
|
systemd.user.services.waybar.wantedBy = lib.mkForce [ cfg.wantedBy ];
|
||||||
environment.etc."xdg/waybar/config".text = builtins.toJSON {
|
environment.etc."xdg/waybar/config".text = builtins.toJSON {
|
||||||
mainBar = {
|
mainBar = {
|
||||||
layer = "top";
|
layer = "top";
|
||||||
position = "top";
|
position = "top";
|
||||||
height = 15;
|
height = 15;
|
||||||
modules-left =
|
modules-left =
|
||||||
(lib.mkIf (cfg.mode == "river") [
|
(lib.optional (cfg.mode == "river") [
|
||||||
"river/tags"
|
"river/tags"
|
||||||
"river/layout"
|
"river/layout"
|
||||||
"river/window"
|
"river/window"
|
||||||
])
|
])
|
||||||
++ (lib.mkIf (cfg.mode == "niri") [
|
++ (lib.optional (cfg.mode == "niri") [
|
||||||
"niri/workspaces"
|
"niri/workspaces"
|
||||||
"niri/window"
|
"niri/window"
|
||||||
]);
|
]);
|
||||||
modules-right = [
|
modules-right = [
|
||||||
"tray"
|
"tray"
|
||||||
"power_profiles_daemon"
|
"power-profiles-daemon"
|
||||||
"idle_inhibitor"
|
"idle_inhibitor"
|
||||||
"wireplumber"
|
"wireplumber"
|
||||||
"battery"
|
"battery"
|
||||||
|
|
|
||||||
29
modules/hardware/kmonad.nix
Normal file
29
modules/hardware/kmonad.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
lib,
|
||||||
|
config,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.hardware.kmonad;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.hardware.kmonad.enable = lib.mkEnableOption "kmonad with xynos brain damage";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
services.kmonad = {
|
||||||
|
enable = true;
|
||||||
|
keyboards = {
|
||||||
|
builtin = {
|
||||||
|
device = "/dev/input/by-path/platform-i8042-serio-0-event-kbd";
|
||||||
|
config = builtins.readFile ./kmonad/builtin.kbd;
|
||||||
|
};
|
||||||
|
k70-office = {
|
||||||
|
device = "/dev/input/by-id/usb-Corsair_CORSAIR_K70_CORE_RGB_TKL_Mechanical_Gaming_Keyboard_599A4D472DCAC05584072AFB922E3BFB-event-kbd";
|
||||||
|
config = builtins.readFile ./kmonad/k70.kbd;
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
89
modules/hardware/kmonad/builtin.kbd
Normal file
89
modules/hardware/kmonad/builtin.kbd
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
(defcfg
|
||||||
|
;; ** For Linux **
|
||||||
|
input (device-file "/dev/input/by-id/usb-04d9_USB-HID_Keyboard-event-kbd")
|
||||||
|
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
||||||
|
output (uinput-sink "KMonad output")
|
||||||
|
|
||||||
|
;; ** For Windows **
|
||||||
|
;; input (low-level-hook)
|
||||||
|
;; output (send-event-sink)
|
||||||
|
|
||||||
|
;; ** For MacOS **
|
||||||
|
;; input (iokit-name "my-keyboard-product-string")
|
||||||
|
;; output (kext)
|
||||||
|
|
||||||
|
fallthrough true
|
||||||
|
)
|
||||||
|
|
||||||
|
(defsrc
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w e r t y u i o p [ ]
|
||||||
|
caps a s d f g h j k l ; ' \ ret
|
||||||
|
lsft 102d z x c v b n m , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet cmp rctl
|
||||||
|
)
|
||||||
|
|
||||||
|
(defalias
|
||||||
|
ext (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
|
||||||
|
)
|
||||||
|
|
||||||
|
(defalias
|
||||||
|
cpy C-c
|
||||||
|
pst C-v
|
||||||
|
cut C-x
|
||||||
|
udo C-z
|
||||||
|
all C-a
|
||||||
|
fnd C-f
|
||||||
|
bk Back
|
||||||
|
fw Forward
|
||||||
|
)
|
||||||
|
(defalias
|
||||||
|
num (layer-toggle num)
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer colemak-dh
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w f p b j l u y ; [ ]
|
||||||
|
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
|
||||||
|
lsft z x c d v 102d k h , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet _ _
|
||||||
|
)
|
||||||
|
(deflayer num
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w f p b j l u y ; [ ]
|
||||||
|
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
|
||||||
|
lsft z x c d v 102d k h , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer colemak-dhk
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w f p b j l u y ; [ ]
|
||||||
|
@ext a r s t g k n e i o ' \\ ret
|
||||||
|
lsft z x c d v 102d m h , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer extend
|
||||||
|
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
|
||||||
|
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
|
||||||
|
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
|
||||||
|
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
|
||||||
|
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
|
||||||
|
_ _ _ ret _ _ _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(deflayer empty
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _
|
||||||
|
)
|
||||||
|
|
||||||
89
modules/hardware/kmonad/k70.kbd
Normal file
89
modules/hardware/kmonad/k70.kbd
Normal file
|
|
@ -0,0 +1,89 @@
|
||||||
|
(defcfg
|
||||||
|
;; ** For Linux **
|
||||||
|
input (device-file "/dev/input/by-id/usb-Corsair_CORSAIR_K70_CORE_RGB_TKL_Mechanical_Gaming_Keyboard_599A4D472DCAC05584072AFB922E3BFB-event-kbd")
|
||||||
|
;; input (device-file "/dev/input/by-path/platform-i8042-serio-0-event-kbd")
|
||||||
|
output (uinput-sink "KMonad output razer")
|
||||||
|
|
||||||
|
;; ** For Windows **
|
||||||
|
;; input (low-level-hook)
|
||||||
|
;; output (send-event-sink)
|
||||||
|
|
||||||
|
;; ** For MacOS **
|
||||||
|
;; input (iokit-name "my-keyboard-product-string")
|
||||||
|
;; output (kext)
|
||||||
|
|
||||||
|
fallthrough true
|
||||||
|
)
|
||||||
|
|
||||||
|
(defsrc
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w e r t y u i o p [ ]
|
||||||
|
caps a s d f g h j k l ; ' \ ret
|
||||||
|
lsft 102d z x c v b n m , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet cmp rctl
|
||||||
|
)
|
||||||
|
|
||||||
|
(defalias
|
||||||
|
ext (layer-toggle extend) ;; Bind 'ext' to the Extend Layer
|
||||||
|
)
|
||||||
|
|
||||||
|
(defalias
|
||||||
|
cpy C-c
|
||||||
|
pst C-v
|
||||||
|
cut C-x
|
||||||
|
udo C-z
|
||||||
|
all C-a
|
||||||
|
fnd C-f
|
||||||
|
bk Back
|
||||||
|
fw Forward
|
||||||
|
)
|
||||||
|
(defalias
|
||||||
|
num (layer-toggle num)
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer colemak-dh
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
z 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab (tap-hold-next-release 200 q @num) w f p b j l u y (tap-hold-next-release 200 ; @num) [ ]
|
||||||
|
esc (tap-hold-next-release 200 a lctrl) (tap-hold-next-release 200 r ralt) (tap-hold-next-release 200 s lmet) t g m n (tap-hold-next-release 200 e rmet) (tap-hold-next-release 200 i lalt) (tap-hold-next-release 200 o rctrl) ' \\ ret
|
||||||
|
lsft z x c d v 102d k h , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet _ _
|
||||||
|
)
|
||||||
|
(deflayer num
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w f p b j l u y ; [ ]
|
||||||
|
esc 1 2 3 4 5 6 7 8 9 0 ' \\ ret
|
||||||
|
lsft z x c d v 102d k h , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer colemak-dhk
|
||||||
|
esc f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12
|
||||||
|
grv 1 2 3 4 5 6 7 8 9 0 - = bspc
|
||||||
|
tab q w f p b j l u y ; [ ]
|
||||||
|
@ext a r s t g k n e i o ' \\ ret
|
||||||
|
lsft z x c d v 102d m h , . / rsft
|
||||||
|
lctl lmet lalt spc ralt rmet _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
(deflayer extend
|
||||||
|
_ play rewind previoussong nextsong ejectcd refresh brdn brup www mail prog1 prog2
|
||||||
|
_ f1 f2 f3 f4 f5 f6 f7 f8 f9 f10 f11 f12 _
|
||||||
|
_ esc @bk @fnd @fw ins pgup home up end menu prnt slck
|
||||||
|
_ lalt lmet lsft lctl ralt pgdn lft down rght del caps _ _
|
||||||
|
_ @udo @cut @cpy tab @pst _ pgdn bks lsft lctl comp _
|
||||||
|
_ _ _ ret _ _ _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
(deflayer empty
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _ _ _ _ _ _
|
||||||
|
_ _ _ _ _ _ _ _
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -1,8 +1,16 @@
|
||||||
[
|
[
|
||||||
./desktop/niri.nix
|
|
||||||
./desktop/waybar.nix
|
|
||||||
./desktop/mako.nix
|
|
||||||
./cli/fish.nix
|
./cli/fish.nix
|
||||||
./cli/starship.nix
|
./cli/starship.nix
|
||||||
|
./desktop/audio.nix
|
||||||
|
./desktop/common-programs.nix
|
||||||
|
./desktop/mako.nix
|
||||||
|
./desktop/niri.nix
|
||||||
|
./desktop/waybar.nix
|
||||||
|
./hardware/kmonad.nix
|
||||||
|
./networking/networkd.nix
|
||||||
|
./presets/cli.nix
|
||||||
|
./presets/gui.nix
|
||||||
|
./presets/home-manager.nix
|
||||||
|
./system/user.nix
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
||||||
18
modules/networking/networkd.nix
Normal file
18
modules/networking/networkd.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.networking.networkd;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.networking.networkd.enable = lib.mkEnableOption "enable systemd networkd";
|
||||||
|
options.xyno.networking.networkd.enableWifi = lib.mkEnableOption "enable iwd";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
systemd.network.enable = true;
|
||||||
|
networking.useNetworkd = true;
|
||||||
|
networking.wireless.iwd.enable = cfg.enableWifi;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
@ -13,6 +13,7 @@ in
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
xyno.cli.fish.enable = true;
|
xyno.cli.fish.enable = true;
|
||||||
xyno.cli.starship.enable = true;
|
xyno.cli.starship.enable = true;
|
||||||
|
security.sudo.enable = false;
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
jq
|
jq
|
||||||
bottom
|
bottom
|
||||||
|
|
@ -27,6 +28,7 @@ in
|
||||||
yt-dlp
|
yt-dlp
|
||||||
helix
|
helix
|
||||||
];
|
];
|
||||||
|
programs.mosh.enable = true;
|
||||||
environment.variables.EDITOR = "hx";
|
environment.variables.EDITOR = "hx";
|
||||||
environment.variables.VISUAL = "hx";
|
environment.variables.VISUAL = "hx";
|
||||||
|
|
||||||
|
|
@ -42,6 +44,7 @@ in
|
||||||
gl = "git log --graph";
|
gl = "git log --graph";
|
||||||
p = "cd ~/proj";
|
p = "cd ~/proj";
|
||||||
ytl = ''yt-dlp -f "bv*+mergeall[vcodec=none]" --audio-multistreams'';
|
ytl = ''yt-dlp -f "bv*+mergeall[vcodec=none]" --audio-multistreams'';
|
||||||
|
sudo = "run0";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,47 @@ let
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.xyno.presets.gui.enable = lib.mkEnableOption "enables xynos gui config";
|
options.xyno.presets.gui.enable = lib.mkEnableOption "enables xynos gui config";
|
||||||
config = cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
xyno.desktop.niri.enable = true;
|
xyno.desktop.niri.enable = true;
|
||||||
|
xyno.desktop.audio.enable = lib.mkDefault true;
|
||||||
|
xyno.hardware.kmonad.enable = true;
|
||||||
|
# wayland on electron
|
||||||
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
environment.sessionVariables.NIXOS_OZONE_WL = "1";
|
||||||
services.displayManager.defaultSession = "niri";
|
services.displayManager.defaultSession = "niri";
|
||||||
services.displayManager.sddm = {
|
# gdm
|
||||||
settings.General.DisplayServer = "wayland";
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
services.xserver.enable = true;
|
||||||
|
services.xserver.displayManager.gdm.wayland = true;
|
||||||
|
# ssh agent
|
||||||
|
programs.ssh.startAgent = true;
|
||||||
|
|
||||||
|
# setup printing
|
||||||
|
services.avahi = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wayland.enable = true;
|
nssmdns4 = true;
|
||||||
|
nssmdns6 = true;
|
||||||
|
openFirewall = true;
|
||||||
};
|
};
|
||||||
|
services.printing.enable = true;
|
||||||
|
|
||||||
|
# enable the gnome shit
|
||||||
|
services.gnome.gnome-keyring.enable = true;
|
||||||
|
services.gnome.gnome-online-accounts.enable = true;
|
||||||
|
services.gnome.core-utilities.enable = true;
|
||||||
|
services.gnome.sushi.enable = true;
|
||||||
|
services.gnome.gnome-settings-daemon.enable = true;
|
||||||
|
services.gvfs.enable = true;
|
||||||
|
|
||||||
|
# fonts
|
||||||
|
fonts.packages = with pkgs; [
|
||||||
|
nerdfonts
|
||||||
|
cantarell-fonts
|
||||||
|
dejavu_fonts
|
||||||
|
source-code-pro # Default monospace font in 3.32
|
||||||
|
source-sans
|
||||||
|
b612
|
||||||
|
|
||||||
|
];
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
22
modules/presets/home-manager.nix
Normal file
22
modules/presets/home-manager.nix
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
inputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.presets.home-manager;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.presets.home-manager.enable =
|
||||||
|
lib.mkEnableOption "enables home manager on the default user";
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
home-manager.useGlobalPkgs = true;
|
||||||
|
home-manager.sharedModules = (import ../../hm-modules/module-list.nix) ++ [
|
||||||
|
inputs.nix-flatpak.homeManagerModules.nix-flatpak
|
||||||
|
];
|
||||||
|
home-manager.users.${config.xyno.system.user.name} = {pkgs, ... }: {
|
||||||
|
home.stateVersion = lib.mkDefault "24.11";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
38
modules/system/user.nix
Normal file
38
modules/system/user.nix
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
{
|
||||||
|
pkgs,
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
cfg = config.xyno.system.user;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.xyno.system.user.enable = lib.mkEnableOption "enable a user with xynos config";
|
||||||
|
options.xyno.system.user.name = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "xyno";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
environment.homeBinInPath = true;
|
||||||
|
users.users.${cfg.name} = {
|
||||||
|
isNormalUser = true;
|
||||||
|
uid = 1000;
|
||||||
|
extraGroups = [
|
||||||
|
"wheel"
|
||||||
|
"cdrom"
|
||||||
|
"networkmanager"
|
||||||
|
"video"
|
||||||
|
"netdev"
|
||||||
|
"plugdev"
|
||||||
|
"dialout"
|
||||||
|
"tape"
|
||||||
|
"uucp"
|
||||||
|
"wireshark"
|
||||||
|
];
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue