Formatting + update
This commit is contained in:
parent
93de64c64e
commit
9c895e9cc0
61 changed files with 2350 additions and 2100 deletions
|
|
@ -1,5 +1,7 @@
|
|||
{ device, swapSize ? "16G" }:
|
||||
{
|
||||
device,
|
||||
swapSize ? "16G",
|
||||
}: {
|
||||
disko.devices = {
|
||||
disk.${device} = {
|
||||
type = "disk";
|
||||
|
|
@ -7,7 +9,8 @@
|
|||
content = {
|
||||
type = "gpt"; # Initialize the disk with a GPT partition table
|
||||
partitions = {
|
||||
ESP = { # Setup the EFI System Partition
|
||||
ESP = {
|
||||
# Setup the EFI System Partition
|
||||
type = "EF00"; # Set the partition type
|
||||
size = "1000M"; # Make the partition a gig
|
||||
content = {
|
||||
|
|
@ -16,7 +19,8 @@
|
|||
mountpoint = "/boot"; # Mount it to /boot
|
||||
};
|
||||
};
|
||||
primary = { # Setup the LVM partition
|
||||
primary = {
|
||||
# Setup the LVM partition
|
||||
size = "100%"; # Fill up the rest of the drive with it
|
||||
content = {
|
||||
type = "lvm_pv"; # pvcreate
|
||||
|
|
@ -26,17 +30,22 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
lvm_vg = { # vgcreate
|
||||
vg1 = { # /dev/vg1
|
||||
lvm_vg = {
|
||||
# vgcreate
|
||||
vg1 = {
|
||||
# /dev/vg1
|
||||
type = "lvm_vg";
|
||||
lvs = { # lvcreate
|
||||
swap = { # Logical Volume = "swap", /dev/vg1/swap
|
||||
lvs = {
|
||||
# lvcreate
|
||||
swap = {
|
||||
# Logical Volume = "swap", /dev/vg1/swap
|
||||
size = swapSize;
|
||||
content = {
|
||||
type = "swap";
|
||||
};
|
||||
};
|
||||
root = { # Logical Volume = "root", /dev/vg1/root
|
||||
root = {
|
||||
# Logical Volume = "root", /dev/vg1/root
|
||||
size = "100%FREE"; # Use the remaining space in the Volume Group
|
||||
content = {
|
||||
type = "filesystem";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
{ device, mountpoint ? "/run/extraDrive" }:
|
||||
{
|
||||
device,
|
||||
mountpoint ? "/run/extraDrive",
|
||||
}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
"${device}" = {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}: {
|
||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
inherit device;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
{
|
||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}:
|
||||
{
|
||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk = {
|
||||
main = {
|
||||
|
|
@ -73,10 +69,12 @@
|
|||
depends = ["/persist"];
|
||||
neededForBoot = true;
|
||||
};
|
||||
swapDevices = [{
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/persist/swapfile";
|
||||
size = 64 * 1024; # 64 GB
|
||||
}];
|
||||
}
|
||||
];
|
||||
|
||||
boot.resumeDevice = "/persist/swapfile";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,4 @@
|
|||
{
|
||||
device ? throw "Set this to your disk device, e.g. /dev/sda",
|
||||
...
|
||||
}: {
|
||||
{device ? throw "Set this to your disk device, e.g. /dev/sda", ...}: {
|
||||
disko.devices = {
|
||||
disk.main = {
|
||||
inherit device;
|
||||
|
|
|
|||
18
flake.lock
generated
18
flake.lock
generated
|
|
@ -333,11 +333,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753393138,
|
||||
"narHash": "sha256-mJp8QEFiVQNc3fZLf5zeKGIHeigMj33LYQ0EogcHz5g=",
|
||||
"lastModified": 1753476892,
|
||||
"narHash": "sha256-VZg9Oq9apTi2JEnlOSiCGl6iglwqNFr6A2u3CTWqGpQ=",
|
||||
"owner": "kylekrein",
|
||||
"repo": "emacs-config",
|
||||
"rev": "f3880c6f9f32661dfae8d10f2fd522561dc73f25",
|
||||
"rev": "1b0367dca5e6b37e2ca9c53f41f2316a5bf335eb",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -358,11 +358,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1753376867,
|
||||
"narHash": "sha256-FAPCW/szK3qvCUD+ThOX4sFyqz/MSadJ4SltA8lNamc=",
|
||||
"lastModified": 1753460825,
|
||||
"narHash": "sha256-MNu9l5nukxFpT5LzsT7Q83BqmO36EByn6/o/xA7hu7I=",
|
||||
"owner": "nix-community",
|
||||
"repo": "emacs-overlay",
|
||||
"rev": "b8df6094952273f3b7e5e7c99b96ed1bf9830034",
|
||||
"rev": "07c08ea0037b2fd7e0b5416361586d4552ac8255",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
@ -1233,11 +1233,11 @@
|
|||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1753468267,
|
||||
"narHash": "sha256-KnwZCY92VjKvGyjnsnNHOvG9mllpFbKyeUkDpD//nvs=",
|
||||
"lastModified": 1753473560,
|
||||
"narHash": "sha256-bT4abIU3eGDraRATwkdeJAeIvxt9e23dhpjjp2dsRqg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "dd386adc75a0061fbb9b1b62595dbc8c52330648",
|
||||
"rev": "a6b41ef5e0c274f96b1f1b52b3d382302763f62a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
|
|
|||
62
flake.nix
62
flake.nix
|
|
@ -78,17 +78,18 @@
|
|||
nixpkgs-unstable,
|
||||
...
|
||||
} @ inputs: let
|
||||
#systems = ["aarch64-linux" "x86_64-linux" ];
|
||||
#forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
#pkgs = import nixpkgs {
|
||||
# inherit system;
|
||||
# config = {
|
||||
# allowUnfree = true;
|
||||
# };
|
||||
#};
|
||||
systems = ["aarch64-linux" "x86_64-linux"];
|
||||
eachSystem = nixpkgs.lib.genAttrs systems;
|
||||
pkgsFor = eachSystem (system:
|
||||
import nixpkgs {
|
||||
localSystem = system;
|
||||
overlays = [
|
||||
];
|
||||
});
|
||||
arm = "aarch64-linux";
|
||||
x86 = "x86_64-linux";
|
||||
ladybirdMaster = self: super: { ladybird = super.ladybird.overrideAttrs(old: {
|
||||
ladybirdMaster = self: super: {
|
||||
ladybird = super.ladybird.overrideAttrs (old: {
|
||||
src = super.fetchFromGitHub {
|
||||
owner = "LadybirdWebBrowser";
|
||||
repo = "ladybird";
|
||||
|
|
@ -96,16 +97,22 @@
|
|||
hash = "sha256-hJkK7nag3Z9E8etPFCo0atUEJJnPjjkl7sle/UwkzbE=";
|
||||
};
|
||||
version = "0-unstable-2025-05-22";
|
||||
});};
|
||||
});
|
||||
};
|
||||
nativePackagesOverlay = self: super: {
|
||||
stdenv = super.impureUseNativeOptimizations super.stdenv;
|
||||
};
|
||||
kylekrein-homepc-pkgs = nixpkgs: import nixpkgs {
|
||||
kylekrein-homepc-pkgs = nixpkgs:
|
||||
import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
inputs.beeengine.overlays.${x86}
|
||||
(final: prev: { #https://github.com/NixOS/nixpkgs/issues/388681
|
||||
pythonPackagesExtensions = prev.pythonPackagesExtensions ++ [(
|
||||
(final: prev: {
|
||||
#https://github.com/NixOS/nixpkgs/issues/388681
|
||||
pythonPackagesExtensions =
|
||||
prev.pythonPackagesExtensions
|
||||
++ [
|
||||
(
|
||||
python-final: python-prev: {
|
||||
onnxruntime = python-prev.onnxruntime.overridePythonAttrs (
|
||||
oldAttrs: {
|
||||
|
|
@ -113,7 +120,8 @@
|
|||
}
|
||||
);
|
||||
}
|
||||
)];
|
||||
)
|
||||
];
|
||||
})
|
||||
#nativePackagesOverlay
|
||||
#ladybirdMaster
|
||||
|
|
@ -124,7 +132,8 @@
|
|||
cudaSupport = true;
|
||||
};
|
||||
};
|
||||
kylekrein-server-pkgs = nixpkgs: import nixpkgs {
|
||||
kylekrein-server-pkgs = nixpkgs:
|
||||
import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
(self: super: {
|
||||
|
|
@ -138,7 +147,8 @@
|
|||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
kylekrein-framework12-pkgs = nixpkgs: import nixpkgs {
|
||||
kylekrein-framework12-pkgs = nixpkgs:
|
||||
import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
inputs.beeengine.overlays.${x86}
|
||||
|
|
@ -148,7 +158,8 @@
|
|||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
kylekrein-mac-pkgs = nixpkgs: import nixpkgs {
|
||||
kylekrein-mac-pkgs = nixpkgs:
|
||||
import nixpkgs {
|
||||
system = arm;
|
||||
overlays = [
|
||||
inputs.beeengine.overlays.${arm}
|
||||
|
|
@ -162,7 +173,8 @@
|
|||
allowUnsupportedSystem = true;
|
||||
};
|
||||
};
|
||||
kylekrein-wsl-pkgs = nixpkgs: import nixpkgs {
|
||||
kylekrein-wsl-pkgs = nixpkgs:
|
||||
import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
#nativePackagesOverlay
|
||||
|
|
@ -171,7 +183,8 @@
|
|||
allowUnfree = true;
|
||||
};
|
||||
};
|
||||
andrej-pc-pkgs = nixpkgs: import nixpkgs {
|
||||
andrej-pc-pkgs = nixpkgs:
|
||||
import nixpkgs {
|
||||
system = x86;
|
||||
overlays = [
|
||||
inputs.beeengine.overlays.${x86}
|
||||
|
|
@ -186,6 +199,12 @@
|
|||
|
||||
first-nixos-install = "1729112485"; #stat -c %W /
|
||||
in {
|
||||
formatter = eachSystem (
|
||||
system: let
|
||||
pkgs = pkgsFor.${system};
|
||||
in
|
||||
pkgs.alejandra
|
||||
);
|
||||
nixOnDroidConfigurations.default = inputs.nix-on-droid.lib.nixOnDroidConfiguration {
|
||||
pkgs = import nixpkgs {
|
||||
system = "aarch64-linux";
|
||||
|
|
@ -329,7 +348,10 @@
|
|||
system = x86;
|
||||
pkgs = andrej-pc-pkgs nixpkgs;
|
||||
modules = [
|
||||
(import ./disko/ext4-swap.nix {device = "/dev/sda"; swapSize = "16G";})
|
||||
(import ./disko/ext4-swap.nix {
|
||||
device = "/dev/sda";
|
||||
swapSize = "16G";
|
||||
})
|
||||
(import ./disko/ext4.nix {device = "/dev/sdb";})
|
||||
./nixos/hosts/andrej-pc/configuration.nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -10,11 +10,10 @@
|
|||
inputs,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
}: let
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
inputs.home-manager.nixosModules.default
|
||||
|
|
@ -32,7 +31,8 @@ in
|
|||
./modules/gnupg
|
||||
./modules/direnv
|
||||
./hosts/${hwconfig.hostname}
|
||||
] ++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
]
|
||||
++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
facter.reportPath = ./hosts/${hwconfig.hostname}/facter.json;
|
||||
kylekrein.services.autoUpgrade = {
|
||||
enable = true;
|
||||
|
|
@ -45,7 +45,10 @@ in
|
|||
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_14;
|
||||
loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = if hwconfig.hostname != "kylekrein-mac" then true else false;
|
||||
efi.canTouchEfiVariables =
|
||||
if hwconfig.hostname != "kylekrein-mac"
|
||||
then true
|
||||
else false;
|
||||
};
|
||||
# Hide the OS choice for bootloaders.
|
||||
# It's still possible to open the bootloader list by pressing any key
|
||||
|
|
@ -63,7 +66,6 @@ in
|
|||
#flatpak
|
||||
#kk.services.flatpak.enable = hwconfig.system != "aarch64-linux";
|
||||
services.flatpak.packages = [
|
||||
|
||||
];
|
||||
|
||||
# Enable networking
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{pkgs, ...}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.firefox.profiles.default.settings = {
|
||||
"media.gmp-widevinecdm.version" = pkgs.widevinecdm-aarch64.version;
|
||||
"media.gmp-widevinecdm.visible" = true;
|
||||
|
|
@ -20,5 +19,4 @@
|
|||
'';
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
prev: final:
|
||||
{
|
||||
prev: final: {
|
||||
widevinecdm-aarch64 = import ./widevine.nix {
|
||||
inherit (final) stdenvNoCC fetchFromGitHub fetchurl python3 squashfsTools nspr;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{ stdenvNoCC
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, python3
|
||||
, squashfsTools
|
||||
, nspr
|
||||
}:
|
||||
let
|
||||
{
|
||||
stdenvNoCC,
|
||||
fetchFromGitHub,
|
||||
fetchurl,
|
||||
python3,
|
||||
squashfsTools,
|
||||
nspr,
|
||||
}: let
|
||||
widevine-installer = fetchFromGitHub {
|
||||
owner = "AsahiLinux";
|
||||
repo = "widevine-installer";
|
||||
|
|
@ -13,13 +13,11 @@ let
|
|||
sha256 = "sha256-XI1y4pVNpXS+jqFs0KyVMrxcULOJ5rADsgvwfLF6e0Y=";
|
||||
};
|
||||
lacros-image = fetchurl {
|
||||
url =
|
||||
let
|
||||
url = let
|
||||
distfiles_base = "https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles";
|
||||
lacros_name = "chromeos-lacros-arm64-squash-zstd";
|
||||
lacrosVersion = "120.0.6098.0";
|
||||
in
|
||||
"${distfiles_base}/${lacros_name}-${lacrosVersion}";
|
||||
in "${distfiles_base}/${lacros_name}-${lacrosVersion}";
|
||||
hash = "sha256-OKV8w5da9oZ1oSGbADVPCIkP9Y0MVLaQ3PXS3ZBLFXY=";
|
||||
};
|
||||
in
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
|
|
@ -49,5 +53,4 @@
|
|||
# settingsSha256 = "sha256-ZpuVZybW6CFN/gz9rx+UJvQ715FZnAOYfHn5jt5Z2C8=";
|
||||
# usePersistenced = false;
|
||||
#};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,10 +7,8 @@
|
|||
username,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
in
|
||||
{
|
||||
}: let
|
||||
in {
|
||||
imports =
|
||||
[
|
||||
#./modules/fastfetch
|
||||
|
|
@ -33,7 +31,14 @@ in
|
|||
# }
|
||||
#)
|
||||
++ lib.optional (builtins.pathExists ./homes/${username}) (
|
||||
import ./homes/${username} { inherit username; inherit config; inherit pkgs; inherit lib; inherit inputs; inherit hwconfig; }
|
||||
import ./homes/${username} {
|
||||
inherit username;
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
inherit hwconfig;
|
||||
}
|
||||
);
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
{pkgs, hwconfig, ...}:
|
||||
let
|
||||
battery-path = "/sys/class/power_supply/${if hwconfig.hostname == "kylekrein-mac" then "macsmc-battery" else "BAT0"}";
|
||||
{
|
||||
pkgs,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery-path = "/sys/class/power_supply/${
|
||||
if hwconfig.hostname == "kylekrein-mac"
|
||||
then "macsmc-battery"
|
||||
else "BAT0"
|
||||
}";
|
||||
get-battery-level = "${pkgs.writeShellScriptBin "get-battery-level" ''
|
||||
cat ${battery-path}/capacity 2>/dev/null || echo "N/A"
|
||||
''}/bin/get-battery-level";
|
||||
|
|
@ -63,8 +70,7 @@ else
|
|||
echo ""
|
||||
fi
|
||||
''}/bin/get-remaining-time";
|
||||
in
|
||||
{
|
||||
in {
|
||||
available = hwconfig.isLaptop;
|
||||
icon = get-icon;
|
||||
status = get-status;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,17 @@
|
|||
{config, username, pkgs, lib, inputs, hwconfig, ...}: {
|
||||
imports = [
|
||||
{
|
||||
config,
|
||||
username,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
hwconfig,
|
||||
...
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
./git.nix
|
||||
] ++ lib.optional (lib.strings.hasInfix "kylekrein" hwconfig.hostname) (
|
||||
]
|
||||
++ lib.optional (lib.strings.hasInfix "kylekrein" hwconfig.hostname) (
|
||||
import ./niri.nix {
|
||||
inherit pkgs;
|
||||
inherit config;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
profile-image = ./nixos-warbler.png;
|
||||
battery-level = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;}).labelPercent;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
profile-image = ./nixos-warbler.png;
|
||||
battery-level =
|
||||
(import ./battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
}).labelPercent;
|
||||
in {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -52,7 +59,8 @@ in
|
|||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
label = [
|
||||
label =
|
||||
[
|
||||
{
|
||||
text = "$USER";
|
||||
font_family = "Fira Code";
|
||||
|
|
@ -77,16 +85,15 @@ in
|
|||
halign = "right";
|
||||
valign = "bottom";
|
||||
}
|
||||
] ++ lib.optional (hwconfig.isLaptop) (
|
||||
{
|
||||
]
|
||||
++ lib.optional (hwconfig.isLaptop) {
|
||||
text = ''cmd[update:10000] ${battery-level}'';
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 28;
|
||||
position = "20, 20";
|
||||
halign = "left";
|
||||
valign = "bottom";
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,15 @@
|
|||
#https://github.com/sodiboo/niri-flake/blob/main/default-config.kdl.nix
|
||||
#https://github.com/sodiboo/niri-flake/blob/main/docs.md
|
||||
#https://github.com/sodiboo/system/blob/main/niri.mod.nix
|
||||
{config, pkgs, lib, inputs, hwconfig, username, ...}:
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
hwconfig,
|
||||
username,
|
||||
...
|
||||
}: {
|
||||
programs.fuzzel = {
|
||||
enable = true;
|
||||
settings.main.terminal = "kitty";
|
||||
|
|
@ -14,7 +21,8 @@
|
|||
./waybar
|
||||
./hyprlock.nix
|
||||
];
|
||||
home.packages = with pkgs;[
|
||||
home.packages = with pkgs;
|
||||
[
|
||||
nwg-drawer
|
||||
wlogout
|
||||
brightnessctl
|
||||
|
|
@ -24,7 +32,8 @@
|
|||
libnotify
|
||||
hyprlock
|
||||
networkmanagerapplet
|
||||
] ++ lib.optionals (hwconfig.hasTouchscreen) (with pkgs;[
|
||||
]
|
||||
++ lib.optionals (hwconfig.hasTouchscreen) (with pkgs; [
|
||||
wvkbd # https://github.com/jjsullivan5196/wvkbd
|
||||
]);
|
||||
programs.niri = {
|
||||
|
|
@ -106,8 +115,7 @@
|
|||
];
|
||||
default-column-width = {proportion = 1.0 / 2.0;};
|
||||
};
|
||||
binds = with config.lib.niri.actions;
|
||||
let
|
||||
binds = with config.lib.niri.actions; let
|
||||
sh = spawn "sh" "-c";
|
||||
emacs = action: sh "emacsclient -c --eval \"${action}\"";
|
||||
homedir = "/home/${username}/";
|
||||
|
|
@ -159,7 +167,6 @@
|
|||
"Mod+Shift+Ctrl+Left".action = move-column-to-monitor-left;
|
||||
"Mod+Shift+Ctrl+Right".action = move-column-to-monitor-right;
|
||||
|
||||
|
||||
"XF86AudioRaiseVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1+";
|
||||
"XF86AudioLowerVolume".action = sh "wpctl set-volume @DEFAULT_AUDIO_SINK@ 0.1-";
|
||||
"XF86AudioMute".action = sh "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle";
|
||||
|
|
@ -177,7 +184,13 @@
|
|||
warp-mouse-to-focus.enable = true;
|
||||
keyboard = {
|
||||
xkb.layout = "us, ru, de";
|
||||
xkb.options = "grp:lctrl_toggle, ctrl:nocaps" + (if hwconfig.hostname == "kylekrein-mac" then ", altwin:swap_alt_win" else "");
|
||||
xkb.options =
|
||||
"grp:lctrl_toggle, ctrl:nocaps"
|
||||
+ (
|
||||
if hwconfig.hostname == "kylekrein-mac"
|
||||
then ", altwin:swap_alt_win"
|
||||
else ""
|
||||
);
|
||||
track-layout = "window";
|
||||
numlock = true;
|
||||
};
|
||||
|
|
@ -199,7 +212,8 @@
|
|||
DISPLAY = ":0";
|
||||
};
|
||||
window-rules = [
|
||||
{ #active
|
||||
{
|
||||
#active
|
||||
matches = [
|
||||
{
|
||||
is-active = true;
|
||||
|
|
@ -207,7 +221,8 @@
|
|||
];
|
||||
opacity = 1.0;
|
||||
}
|
||||
{ #inactive
|
||||
{
|
||||
#inactive
|
||||
matches = [
|
||||
{
|
||||
is-active = false;
|
||||
|
|
@ -215,7 +230,8 @@
|
|||
];
|
||||
opacity = 1.0;
|
||||
}
|
||||
{ #opaque
|
||||
{
|
||||
#opaque
|
||||
matches = [
|
||||
{
|
||||
app-id = "emacs";
|
||||
|
|
@ -226,7 +242,8 @@
|
|||
];
|
||||
opacity = 1.0;
|
||||
}
|
||||
{ #app-launcher
|
||||
{
|
||||
#app-launcher
|
||||
matches = [
|
||||
{
|
||||
title = "emacs-run-launcher";
|
||||
|
|
@ -235,7 +252,8 @@
|
|||
open-floating = true;
|
||||
open-focused = true;
|
||||
}
|
||||
{ #PiP
|
||||
{
|
||||
#PiP
|
||||
matches = [
|
||||
{
|
||||
title = "Picture-in-Picture";
|
||||
|
|
@ -244,7 +262,11 @@
|
|||
open-floating = true;
|
||||
open-focused = false;
|
||||
opacity = 1.0;
|
||||
default-floating-position = { x = 0; y = 0; relative-to = "top-right"; };
|
||||
default-floating-position = {
|
||||
x = 0;
|
||||
y = 0;
|
||||
relative-to = "top-right";
|
||||
};
|
||||
}
|
||||
];
|
||||
debug = lib.mkIf (hwconfig.hostname == "kylekrein-mac") {
|
||||
|
|
@ -265,7 +287,8 @@
|
|||
systemctl = "${pkgs.systemd}/bin/systemctl";
|
||||
#locking-script = "${pkgs.swaylock}/bin/swaylock --daemonize";
|
||||
#unlocking-script = "pkill -SIGUSR1 swaylock";
|
||||
suspendScript = cmd: pkgs.writeShellScript "suspend-script" ''
|
||||
suspendScript = cmd:
|
||||
pkgs.writeShellScript "suspend-script" ''
|
||||
# check if any player has status "Playing"
|
||||
${lib.getExe pkgs.playerctl} -a status | ${lib.getExe pkgs.ripgrep} Playing -q
|
||||
# only suspend if nothing is playing
|
||||
|
|
@ -282,7 +305,8 @@ in{
|
|||
};
|
||||
settings.listener = let
|
||||
secondary = "${systemctl} suspend";
|
||||
in lib.mkIf (hwconfig.isLaptop) [
|
||||
in
|
||||
lib.mkIf (hwconfig.isLaptop) [
|
||||
#{
|
||||
# timeout = 30;
|
||||
# command = "pidof hyprlock && ${secondary}";
|
||||
|
|
@ -301,7 +325,6 @@ in{
|
|||
mako = {
|
||||
enable = false;
|
||||
settings = {
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
battery = (import ../battery-status.nix {inherit pkgs; inherit hwconfig;});
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery = import ../battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
};
|
||||
in {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
|
|
@ -14,7 +20,8 @@ in
|
|||
#${builtins.readFile "${pkgs.waybar}/etc/xdg/waybar/style.css"}
|
||||
style = ''
|
||||
${builtins.readFile ./waybarstyle.css}'';
|
||||
settings = [{
|
||||
settings = [
|
||||
{
|
||||
height = 36;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
|
@ -29,7 +36,8 @@ ${builtins.readFile ./waybarstyle.css}'';
|
|||
"niri/workspaces"
|
||||
"niri/window"
|
||||
];
|
||||
modules-right = lib.optional hwconfig.isLaptop "backlight"
|
||||
modules-right =
|
||||
lib.optional hwconfig.isLaptop "backlight"
|
||||
++ [
|
||||
"pulseaudio"
|
||||
#"network"
|
||||
|
|
@ -37,7 +45,8 @@ ${builtins.readFile ./waybarstyle.css}'';
|
|||
"memory"
|
||||
#"temperature"
|
||||
"niri/language"
|
||||
] ++ lib.optional battery.available "custom/battery"
|
||||
]
|
||||
++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
|
|
@ -191,6 +200,7 @@ ${builtins.readFile ./waybarstyle.css}'';
|
|||
fi
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,11 +10,11 @@
|
|||
inputs,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
programs.firefox.policies.Preferences."browser.startup.page" = lib.mkForce 1;
|
||||
|
||||
imports = [
|
||||
imports =
|
||||
[
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
inputs.stylix.nixosModules.stylix
|
||||
inputs.nixos-facter-modules.nixosModules.facter
|
||||
|
|
@ -30,7 +30,8 @@
|
|||
../../modules/sops
|
||||
#../../modules/emacs
|
||||
./default.nix
|
||||
] ++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
]
|
||||
++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
facter.reportPath = ./facter.json;
|
||||
kylekrein.services.autoUpgrade = {
|
||||
enable = true;
|
||||
|
|
@ -39,7 +40,6 @@
|
|||
user = "root";
|
||||
};
|
||||
|
||||
|
||||
boot = {
|
||||
kernelPackages = lib.mkDefault pkgs.linuxPackages_6_14;
|
||||
loader = {
|
||||
|
|
@ -62,7 +62,6 @@
|
|||
#flatpak
|
||||
kk.services.flatpak.enable = true;
|
||||
services.flatpak.packages = [
|
||||
|
||||
];
|
||||
|
||||
services.pipewire = {
|
||||
|
|
@ -190,7 +189,8 @@
|
|||
clean.extraArgs = "--keep-since 4d --keep 3";
|
||||
flake = "/etc/nixos-config";
|
||||
};
|
||||
fonts.packages = with unstable-pkgs; [ #TODO change to pkgs when 25.05 comes out
|
||||
fonts.packages = with unstable-pkgs; [
|
||||
#TODO change to pkgs when 25.05 comes out
|
||||
nerd-fonts.jetbrains-mono
|
||||
font-awesome
|
||||
nerd-fonts.symbols-only
|
||||
|
|
|
|||
|
|
@ -5,8 +5,7 @@
|
|||
}: {
|
||||
imports = [
|
||||
];
|
||||
environment.packages = with pkgs;
|
||||
[
|
||||
environment.packages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
fastfetch
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
{ pkgs, config, lib, ... }:
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
#../../modules/nixvim
|
||||
../../homes/kylekrein/git.nix
|
||||
|
|
@ -8,7 +12,8 @@
|
|||
copyFont = let
|
||||
font_src = "${pkgs.nerd-fonts.fira-code}/share/fonts/truetype/NerdFonts/FiraCode/FiraCodeNerdFont-Regular.ttf";
|
||||
font_dst = "${config.home.homeDirectory}/.termux/font.ttf";
|
||||
in lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
in
|
||||
lib.hm.dag.entryAfter ["writeBoundary"] ''
|
||||
( test ! -e "${font_dst}" || test $(sha1sum "${font_src}"|cut -d' ' -f1 ) != $(sha1sum "${font_dst}" |cut -d' ' -f1)) && $DRY_RUN_CMD install $VERBOSE_ARG -D "${font_src}" "${font_dst}"
|
||||
'';
|
||||
};
|
||||
|
|
|
|||
|
|
@ -106,13 +106,16 @@
|
|||
#forceSSL = true;
|
||||
#useACMEHost = "kylekrein.com";
|
||||
#acmeRoot = "/var/lib/acme/challenges-kylekrein";
|
||||
}; in {
|
||||
"chat.kylekrein.com" = (SSL // {
|
||||
};
|
||||
in {
|
||||
"chat.kylekrein.com" =
|
||||
SSL
|
||||
// {
|
||||
locations."/" = {
|
||||
proxyPass = "http://localhost:8080/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
systemd.network.wait-online.enable = lib.mkForce false;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "sd_mod"];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,15 @@
|
|||
# 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, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["usb_storage"];
|
||||
|
|
@ -18,8 +22,8 @@
|
|||
fsType = "tmpfs";
|
||||
options = ["defaults" "size=8G" "mode=755"];
|
||||
};
|
||||
fileSystems."/persist" =
|
||||
{ device = "/dev/disk/by-label/nixos";
|
||||
fileSystems."/persist" = {
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
depends = ["/"];
|
||||
neededForBoot = true;
|
||||
|
|
@ -34,8 +38,8 @@
|
|||
options = ["bind"];
|
||||
depends = ["/persist"];
|
||||
};
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/EFI\\x20-\\x20NIXOS";
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/EFI\\x20-\\x20NIXOS";
|
||||
fsType = "vfat";
|
||||
#options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
|
|
|
|||
|
|
@ -3,16 +3,14 @@
|
|||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
}: let
|
||||
cfg = config.kk.services.conduwuit;
|
||||
defaultUser = "conduwuit";
|
||||
defaultGroup = "conduwuit";
|
||||
|
||||
format = pkgs.formats.toml {};
|
||||
configFile = format.generate "conduwuit.toml" cfg.settings;
|
||||
in
|
||||
{
|
||||
in {
|
||||
meta.maintainers = with lib.maintainers; [niklaskorz];
|
||||
options.kk.services.conduwuit = {
|
||||
enable = lib.mkEnableOption "conduwuit";
|
||||
|
|
@ -323,10 +321,10 @@ in
|
|||
wantedBy = ["multi-user.target"];
|
||||
wants = ["network-online.target"];
|
||||
after = ["network-online.target"];
|
||||
environment = lib.mkMerge ([
|
||||
environment = lib.mkMerge [
|
||||
{CONDUWUIT_CONFIG = configFile;}
|
||||
cfg.extraEnvironment
|
||||
]);
|
||||
];
|
||||
startLimitBurst = 5;
|
||||
startLimitIntervalSec = 60;
|
||||
serviceConfig = {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,6 @@ users = {
|
|||
networking.firewall.allowedUDPPorts = [3478 5349];
|
||||
#sops.secrets."services/conduwuit" = {mode = "0755";};
|
||||
|
||||
|
||||
sops.secrets."services/gitlab/dbPassword" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/rootPassword" = {owner = "gitlab";};
|
||||
sops.secrets."services/gitlab/secret" = {owner = "gitlab";};
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = ["ahci" "xhci_pci" "virtio_pci" "virtio_scsi" "sd_mod" "sr_mod"];
|
||||
|
|
@ -10,8 +14,8 @@
|
|||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/4f7e141c-0fc7-415a-815d-944b36f93806";
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/4f7e141c-0fc7-415a-815d-944b36f93806";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,8 @@
|
|||
# This file was populated at runtime with the networking
|
||||
# details gathered from the active system.
|
||||
networking = {
|
||||
nameservers = [ "8.8.8.8"
|
||||
nameservers = [
|
||||
"8.8.8.8"
|
||||
];
|
||||
defaultGateway = "172.31.1.1";
|
||||
defaultGateway6 = {
|
||||
|
|
@ -14,15 +15,30 @@
|
|||
interfaces = {
|
||||
eth0 = {
|
||||
ipv4.addresses = [
|
||||
{ address="91.99.0.169"; prefixLength=32; }
|
||||
{
|
||||
address = "91.99.0.169";
|
||||
prefixLength = 32;
|
||||
}
|
||||
];
|
||||
ipv6.addresses = [
|
||||
{ address="fe80::9400:4ff:fe30:830e"; prefixLength=64; }
|
||||
{
|
||||
address = "fe80::9400:4ff:fe30:830e";
|
||||
prefixLength = 64;
|
||||
}
|
||||
];
|
||||
ipv4.routes = [
|
||||
{
|
||||
address = "172.31.1.1";
|
||||
prefixLength = 32;
|
||||
}
|
||||
];
|
||||
ipv6.routes = [
|
||||
{
|
||||
address = "";
|
||||
prefixLength = 128;
|
||||
}
|
||||
];
|
||||
ipv4.routes = [ { address = "172.31.1.1"; prefixLength = 32; } ];
|
||||
ipv6.routes = [ { address = ""; prefixLength = 128; } ];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
services.udev.extraRules = ''
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services.desktopManager.cosmic.enable = true;
|
||||
services.displayManager.cosmic-greeter.enable = true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ...}:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{ pkgs, inputs, hwconfig, unstable-pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
hwconfig,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}: {
|
||||
environment.systemPackages = with pkgs; [
|
||||
kdePackages.qtwayland
|
||||
kdePackages.qtsvg
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
{
|
||||
pkgs,
|
||||
emacs,
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
packages = with pkgs; [
|
||||
git
|
||||
gzip
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ hwconfig, first-nixos-install, ... }:
|
||||
{
|
||||
hwconfig,
|
||||
first-nixos-install,
|
||||
...
|
||||
}: {
|
||||
programs.fastfetch = {
|
||||
enable = true;
|
||||
|
||||
|
|
@ -90,9 +93,14 @@
|
|||
{
|
||||
type = "command";
|
||||
key = "│ ";
|
||||
text = #bash
|
||||
text =
|
||||
#bash
|
||||
''
|
||||
birth_install=${if hwconfig.useImpermanence then "${first-nixos-install}" else "$(stat -c %W /)"}
|
||||
birth_install=${
|
||||
if hwconfig.useImpermanence
|
||||
then "${first-nixos-install}"
|
||||
else "$(stat -c %W /)"
|
||||
}
|
||||
current=$(date +%s)
|
||||
delta=$((current - birth_install))
|
||||
delta_days=$((delta / 86400))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
nixpkgs = {
|
||||
overlays = [
|
||||
(final: prev: {
|
||||
|
|
@ -25,6 +24,7 @@
|
|||
--set MOZ_GMP_PATH "$out/gmp-widevinecdm/system-installed"
|
||||
'';
|
||||
});
|
||||
})];
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
{ lib, config, pkgs, hwconfig, ... }:
|
||||
|
||||
let
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
lock-false = {
|
||||
Value = false;
|
||||
Status = "locked";
|
||||
|
|
@ -9,8 +13,7 @@
|
|||
Value = true;
|
||||
Status = "locked";
|
||||
};
|
||||
in
|
||||
{
|
||||
in {
|
||||
imports = [] ++ lib.optional (hwconfig.system == "aarch64-linux") ./aarch64-linux.nix;
|
||||
programs = {
|
||||
firefox = {
|
||||
|
|
@ -18,7 +21,9 @@
|
|||
enable = true;
|
||||
languagePacks = ["de" "en-US" "ru"];
|
||||
|
||||
/* ---- POLICIES ---- */
|
||||
/*
|
||||
---- POLICIES ----
|
||||
*/
|
||||
# Check about:policies#documentation for options.
|
||||
policies = {
|
||||
DisableTelemetry = true;
|
||||
|
|
@ -44,7 +49,9 @@
|
|||
PasswordManagerEnabled = false;
|
||||
NoDefaultBookmarks = true;
|
||||
|
||||
/* ---- EXTENSIONS ---- */
|
||||
/*
|
||||
---- EXTENSIONS ----
|
||||
*/
|
||||
# Check about:support for extension/add-on ID strings.
|
||||
# Valid strings for installation_mode are "allowed", "blocked",
|
||||
# "force_installed" and "normal_installed".
|
||||
|
|
@ -88,12 +95,16 @@
|
|||
install_url = "https://addons.mozilla.org/firefox/downloads/latest/adguard-adblocker/latest.xpi";
|
||||
installation_mode = "force_installed";
|
||||
};
|
||||
|
||||
};
|
||||
/* ---- PREFERENCES ---- */
|
||||
/*
|
||||
---- PREFERENCES ----
|
||||
*/
|
||||
# Check about:config for options.
|
||||
Preferences = {
|
||||
"browser.contentblocking.category" = { Value = "strict"; Status = "locked"; };
|
||||
"browser.contentblocking.category" = {
|
||||
Value = "strict";
|
||||
Status = "locked";
|
||||
};
|
||||
"extensions.pocket.enabled" = lock-false;
|
||||
"extensions.screenshots.disabled" = lock-true;
|
||||
"browser.startup.page" = 3; # restore session on startup
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, lib,... }:
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -7,7 +10,8 @@
|
|||
};
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
(pass.withExtensions (exts: with exts;[
|
||||
(pass.withExtensions (exts:
|
||||
with exts; [
|
||||
pass-otp
|
||||
pass-import
|
||||
]))
|
||||
|
|
|
|||
|
|
@ -1,6 +1,13 @@
|
|||
{pkgs, hwconfig, ...}:
|
||||
let
|
||||
battery-path = "/sys/class/power_supply/${if hwconfig.hostname == "kylekrein-mac" then "macsmc-battery" else "BAT0"}";
|
||||
{
|
||||
pkgs,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery-path = "/sys/class/power_supply/${
|
||||
if hwconfig.hostname == "kylekrein-mac"
|
||||
then "macsmc-battery"
|
||||
else "BAT0"
|
||||
}";
|
||||
get-battery-level = "${pkgs.writeShellScriptBin "get-battery-level" ''
|
||||
cat ${battery-path}/capacity 2>/dev/null || echo "N/A"
|
||||
''}/bin/get-battery-level";
|
||||
|
|
@ -63,8 +70,7 @@ else
|
|||
echo ""
|
||||
fi
|
||||
''}/bin/get-remaining-time";
|
||||
in
|
||||
{
|
||||
in {
|
||||
available = hwconfig.isLaptop;
|
||||
icon = get-icon;
|
||||
status = get-status;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{ pkgs, inputs, hwconfig, unstable-pkgs, ... }:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
hwconfig,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}: {
|
||||
stylix = {
|
||||
enable = true;
|
||||
image = "${./wallpaper.jpg}";
|
||||
|
|
@ -129,6 +134,4 @@
|
|||
#platformTheme = "qt5ct";
|
||||
#style = "kvantum";
|
||||
# };
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}:
|
||||
{
|
||||
}: {
|
||||
imports = [
|
||||
(import ./hyprland.nix {
|
||||
inherit pkgs;
|
||||
|
|
|
|||
|
|
@ -1,20 +1,25 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
suspendScript = pkgs.writeShellScript "suspend-script" ''
|
||||
# check if any player has status "Playing"
|
||||
${lib.getExe pkgs.playerctl} -a status | ${lib.getExe pkgs.ripgrep} Playing -q
|
||||
# only suspend if nothing is playing
|
||||
if [ $? == 1 ]; then
|
||||
${if hwconfig.isLaptop then "${pkgs.systemd}/bin/systemctl suspend" else "loginctl lock-session"}
|
||||
${
|
||||
if hwconfig.isLaptop
|
||||
then "${pkgs.systemd}/bin/systemctl suspend"
|
||||
else "loginctl lock-session"
|
||||
}
|
||||
fi
|
||||
'';
|
||||
in
|
||||
{
|
||||
|
||||
in {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
lock_cmd = "pidof hyprlock || hyprlock";
|
||||
before_sleep_cmd = "pidof hyprlock || loginctl lock-session"; # lock before suspend.
|
||||
|
|
@ -23,7 +28,6 @@ general = {
|
|||
};
|
||||
|
||||
listener = [
|
||||
|
||||
#{
|
||||
# on-resume="brightnessctl -r"; # monitor backlight restore.
|
||||
# on-timeout="brightnessctl -s set 10"; # set monitor backlight to minimum, avoid 0 on OLED monitor.
|
||||
|
|
@ -57,9 +61,6 @@ listener = [
|
|||
# timeout=420;
|
||||
#}
|
||||
];
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,13 @@ in {
|
|||
};
|
||||
input = {
|
||||
kb_layout = "us, ru";
|
||||
kb_options = "grp:lctrl_toggle, ctrl:nocaps" + (if hwconfig.hostname == "kylekrein-mac" then ", altwin:swap_alt_win" else ""); # "ctrl:nocaps, grp:toggle"
|
||||
kb_options =
|
||||
"grp:lctrl_toggle, ctrl:nocaps"
|
||||
+ (
|
||||
if hwconfig.hostname == "kylekrein-mac"
|
||||
then ", altwin:swap_alt_win"
|
||||
else ""
|
||||
); # "ctrl:nocaps, grp:toggle"
|
||||
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
|
|
@ -173,7 +179,8 @@ in {
|
|||
allow_tearing = false;
|
||||
layout = "dwindle";
|
||||
};
|
||||
render = lib.mkIf (hwconfig.system == "aarch64-linux") { # Explicit sync breaks asahi driver https://github.com/hyprwm/Hyprland/issues/8158
|
||||
render = lib.mkIf (hwconfig.system == "aarch64-linux") {
|
||||
# Explicit sync breaks asahi driver https://github.com/hyprwm/Hyprland/issues/8158
|
||||
explicit_sync = 0;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,16 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
profile-image = ./profile-image.png;
|
||||
battery-level = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;}).labelPercent;
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
profile-image = ./profile-image.png;
|
||||
battery-level =
|
||||
(import ./battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
}).labelPercent;
|
||||
in {
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
|
@ -51,7 +58,8 @@ in
|
|||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
label = [
|
||||
label =
|
||||
[
|
||||
{
|
||||
text = "$USER";
|
||||
font_family = "Fira Code";
|
||||
|
|
@ -76,16 +84,15 @@ in
|
|||
halign = "right";
|
||||
valign = "bottom";
|
||||
}
|
||||
] ++ lib.optional (hwconfig.isLaptop) (
|
||||
{
|
||||
]
|
||||
++ lib.optional (hwconfig.isLaptop) {
|
||||
text = ''cmd[update:10000] ${battery-level}'';
|
||||
font_family = "JetBrains Mono";
|
||||
font_size = 28;
|
||||
position = "20, 20";
|
||||
halign = "left";
|
||||
valign = "bottom";
|
||||
});
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,14 @@
|
|||
{ pkgs, lib, hwconfig, ... }:
|
||||
let
|
||||
battery = (import ./battery-status.nix {inherit pkgs; inherit hwconfig;});
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
battery = import ./battery-status.nix {
|
||||
inherit pkgs;
|
||||
inherit hwconfig;
|
||||
};
|
||||
in {
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
#systemd.enable = true;
|
||||
|
|
@ -19,7 +25,8 @@ in
|
|||
font-size: 15px;
|
||||
}
|
||||
'';
|
||||
settings = [{
|
||||
settings = [
|
||||
{
|
||||
height = 36;
|
||||
layer = "top";
|
||||
position = "top";
|
||||
|
|
@ -32,7 +39,8 @@ in
|
|||
"hyprland/workspaces"
|
||||
# "hyprland/window"
|
||||
];
|
||||
modules-right = lib.optional hwconfig.isLaptop "backlight"
|
||||
modules-right =
|
||||
lib.optional hwconfig.isLaptop "backlight"
|
||||
++ [
|
||||
"pulseaudio"
|
||||
#"network"
|
||||
|
|
@ -40,7 +48,8 @@ in
|
|||
"memory"
|
||||
#"temperature"
|
||||
"hyprland/language"
|
||||
] ++ lib.optional battery.available "custom/battery"
|
||||
]
|
||||
++ lib.optional battery.available "custom/battery"
|
||||
++ [
|
||||
"tray"
|
||||
"custom/notification"
|
||||
|
|
@ -184,6 +193,7 @@ in
|
|||
fi
|
||||
'';
|
||||
};
|
||||
}];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
{ ... }:
|
||||
let folder = ".config/kando";
|
||||
in
|
||||
{
|
||||
{...}: let
|
||||
folder = ".config/kando";
|
||||
in {
|
||||
home.file = {
|
||||
#"${folder}/config.json".source = ./config.json;
|
||||
"${folder}/menus.json".source = ./menus.json;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
{...}: {
|
||||
services.xserver.enable = true;
|
||||
services.desktopManager.plasma6.enable = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
virtualisation = {
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{ username, ... }:
|
||||
{
|
||||
{username, ...}: {
|
||||
users.users.${username}.extraGroups = ["libvirtd"];
|
||||
home-manager.users.${username} = {
|
||||
dconf.settings = {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,8 @@
|
|||
{ pkgs, inputs, ...}:
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: {
|
||||
nixpkgs.overlays = [
|
||||
inputs.niri-flake.overlays.niri
|
||||
];
|
||||
|
|
|
|||
|
|
@ -3,13 +3,10 @@
|
|||
config,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
}: let
|
||||
cfg = config.kylekrein.services.autoUpgrade;
|
||||
script = ./nixos-upgrade-script.sh;
|
||||
in
|
||||
{
|
||||
in {
|
||||
options = {
|
||||
kylekrein.services.autoUpgrade = {
|
||||
enable = lib.mkEnableOption "Enables automatic system updates.";
|
||||
|
|
@ -69,10 +66,26 @@ in
|
|||
unitConfig.RequiresMountsFor = cfg.configDir;
|
||||
script =
|
||||
"${script} --operation ${cfg.operation} "
|
||||
+ (if (cfg.configDir != "") then "--flake ${cfg.configDir} " else "")
|
||||
+ (if (cfg.user != "") then "--user ${cfg.user} " else "")
|
||||
+ (if (cfg.pushUpdates) then "--update " else "")
|
||||
+ (if (cfg.extraFlags != "") then cfg.extraFlags else "");
|
||||
+ (
|
||||
if (cfg.configDir != "")
|
||||
then "--flake ${cfg.configDir} "
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
if (cfg.user != "")
|
||||
then "--user ${cfg.user} "
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
if (cfg.pushUpdates)
|
||||
then "--update "
|
||||
else ""
|
||||
)
|
||||
+ (
|
||||
if (cfg.extraFlags != "")
|
||||
then cfg.extraFlags
|
||||
else ""
|
||||
);
|
||||
};
|
||||
timers."nixos-upgrade" = {
|
||||
wants = ["network-online.target"];
|
||||
|
|
|
|||
|
|
@ -1,8 +1,16 @@
|
|||
{ config, pkgs, inputs, lib, hwconfig, ... }:
|
||||
let
|
||||
keyPath = (if hwconfig.useImpermanence then "/persist/sops/age/keys.txt" else "/var/lib/sops/age/keys.txt");
|
||||
in
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
lib,
|
||||
hwconfig,
|
||||
...
|
||||
}: let
|
||||
keyPath =
|
||||
if hwconfig.useImpermanence
|
||||
then "/persist/sops/age/keys.txt"
|
||||
else "/var/lib/sops/age/keys.txt";
|
||||
in {
|
||||
environment.systemPackages = with pkgs; [sops];
|
||||
sops.defaultSopsFile = ./secrets/secrets.yaml;
|
||||
sops.defaultSopsFormat = "yaml";
|
||||
|
|
|
|||
|
|
@ -7,7 +7,10 @@
|
|||
...
|
||||
}: let
|
||||
cfg = config.kk.steam;
|
||||
containerPath = if hwconfig.useImpermanence then "/persist/home/containers/steam" else "/var/containers/steam";
|
||||
containerPath =
|
||||
if hwconfig.useImpermanence
|
||||
then "/persist/home/containers/steam"
|
||||
else "/var/containers/steam";
|
||||
containerName = "fedora-steam";
|
||||
in {
|
||||
options.kk.steam = {
|
||||
|
|
@ -62,10 +65,8 @@ env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sud
|
|||
env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox enter "${containerName}" -- distrobox-export --app steam
|
||||
'')
|
||||
];
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
environment.systemPackages = with pkgs; [
|
||||
unzip
|
||||
wget
|
||||
|
|
@ -85,7 +86,8 @@ env -u SUDO_USER ${pkgs.distrobox}/bin/distrobox-enter "${containerName}" -- sud
|
|||
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
|
||||
package = pkgs.steam.override {
|
||||
extraPkgs = pkgs: with pkgs; [
|
||||
extraPkgs = pkgs:
|
||||
with pkgs; [
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXinerama
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
{ pkgs, config, lib, hwconfig, inputs, first-nixos-install, ... }:
|
||||
let username = "andrej";
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
hwconfig,
|
||||
inputs,
|
||||
first-nixos-install,
|
||||
...
|
||||
}: let
|
||||
username = "andrej";
|
||||
in {
|
||||
imports = [
|
||||
];
|
||||
users.users.${username} = {
|
||||
|
|
@ -20,6 +27,17 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
||||
systemd.tmpfiles.rules = (if hwconfig.useImpermanence then ["d /persist/home/${username} 0700 ${username} users -"] else []); # /persist/home/<user> created, owned by that user
|
||||
home-manager.users."${username}" = import ../../home.nix {
|
||||
inherit lib;
|
||||
inherit username;
|
||||
inherit inputs;
|
||||
inherit first-nixos-install;
|
||||
inherit hwconfig;
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
};
|
||||
systemd.tmpfiles.rules =
|
||||
if hwconfig.useImpermanence
|
||||
then ["d /persist/home/${username} 0700 ${username} users -"]
|
||||
else []; # /persist/home/<user> created, owned by that user
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
{ pkgs, config, lib, hwconfig, inputs, first-nixos-install, ... }:
|
||||
let username = "dima";
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
hwconfig,
|
||||
inputs,
|
||||
first-nixos-install,
|
||||
...
|
||||
}: let
|
||||
username = "dima";
|
||||
in {
|
||||
imports = [
|
||||
];
|
||||
users.users.${username} = {
|
||||
|
|
@ -15,10 +22,20 @@ in
|
|||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILIc/J6YxwWKajJ923/PZ2fcgLgWZdVMcZQ4oZZ+2hwn dima@dragonarch"
|
||||
];
|
||||
|
||||
};
|
||||
programs.ssh.forwardX11 = true;
|
||||
|
||||
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
||||
systemd.tmpfiles.rules = (if hwconfig.useImpermanence then ["d /persist/home/${username} 0700 ${username} users -"] else []); # /persist/home/<user> created, owned by that user
|
||||
home-manager.users."${username}" = import ../../home.nix {
|
||||
inherit lib;
|
||||
inherit username;
|
||||
inherit inputs;
|
||||
inherit first-nixos-install;
|
||||
inherit hwconfig;
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
};
|
||||
systemd.tmpfiles.rules =
|
||||
if hwconfig.useImpermanence
|
||||
then ["d /persist/home/${username} 0700 ${username} users -"]
|
||||
else []; # /persist/home/<user> created, owned by that user
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,14 @@
|
|||
{ pkgs, config, lib, hwconfig, inputs, first-nixos-install, ... }:
|
||||
let username = "tania";
|
||||
in
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
hwconfig,
|
||||
inputs,
|
||||
first-nixos-install,
|
||||
...
|
||||
}: let
|
||||
username = "tania";
|
||||
in {
|
||||
imports = [
|
||||
];
|
||||
users.users.${username} = {
|
||||
|
|
@ -19,6 +26,17 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
home-manager.users."${username}" = import ../../home.nix { inherit lib; inherit username; inherit inputs; inherit first-nixos-install; inherit hwconfig; inherit config; inherit pkgs; };
|
||||
systemd.tmpfiles.rules = (if hwconfig.useImpermanence then ["d /persist/home/${username} 0700 ${username} users -"] else []); # /persist/home/<user> created, owned by that user
|
||||
home-manager.users."${username}" = import ../../home.nix {
|
||||
inherit lib;
|
||||
inherit username;
|
||||
inherit inputs;
|
||||
inherit first-nixos-install;
|
||||
inherit hwconfig;
|
||||
inherit config;
|
||||
inherit pkgs;
|
||||
};
|
||||
systemd.tmpfiles.rules =
|
||||
if hwconfig.useImpermanence
|
||||
then ["d /persist/home/${username} 0700 ${username} users -"]
|
||||
else []; # /persist/home/<user> created, owned by that user
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,16 +7,17 @@
|
|||
inputs,
|
||||
unstable-pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
}: {
|
||||
imports =
|
||||
[
|
||||
./modules/firefox
|
||||
./modules/flatpak
|
||||
./modules/emacs
|
||||
./modules/gnupg
|
||||
./modules/direnv
|
||||
./hosts/${hwconfig.hostname}
|
||||
] ++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
]
|
||||
++ lib.optional (hwconfig.useImpermanence) ./modules/impermanence;
|
||||
|
||||
networking.hostName = hwconfig.hostname;
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
|
@ -29,7 +30,6 @@
|
|||
#flatpak
|
||||
#kk.services.flatpak.enable = hwconfig.system != "aarch64-linux";
|
||||
services.flatpak.packages = [
|
||||
|
||||
];
|
||||
|
||||
# Enable common container config files in /etc/containers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue