a lot of changes
This commit is contained in:
parent
4c8bc2797c
commit
be764a326d
1
compat/default.nix
Normal file
1
compat/default.nix
Normal file
@ -0,0 +1 @@
|
||||
{ ... }: (builtins.getFlake (toString ../.)).legacyPackages.${builtins.currentSystem}
|
9
default.nix
Normal file
9
default.nix
Normal file
@ -0,0 +1,9 @@
|
||||
{ ... }:
|
||||
let
|
||||
self = (import (let lock = builtins.fromJSON (builtins.readFile ./flake.lock);
|
||||
in fetchTarball {
|
||||
url =
|
||||
"https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz";
|
||||
sha256 = lock.nodes.flake-compat.locked.narHash;
|
||||
}) { src = ./.; }).defaultNix;
|
||||
in self // self.legacyPackages.${builtins.currentSystem}
|
85
flake.lock
generated
85
flake.lock
generated
@ -5,11 +5,11 @@
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1612815054,
|
||||
"narHash": "sha256-5FA1MW0sLGBUuEOq25iXx7f17TPE1+FLlL+ah7nLIP0=",
|
||||
"lastModified": 1623806441,
|
||||
"narHash": "sha256-nXkU8yCtSLz2oqPPdY2WEOQ0PZlWXAzcP1djf5lx6A0=",
|
||||
"owner": "alukardbf",
|
||||
"repo": "base16-nix",
|
||||
"rev": "f35d18e9912423e99d62c1d29529f518bdb5ce1d",
|
||||
"rev": "462f0033e6681b993165dd46bcdc1c153a7daaa9",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -34,32 +34,20 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"base16-material-ocean-scheme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"narHash": "sha256-WAVSMhWqwzR34pHalWGkpKkP6+TfEE+Fv3Adj0G2isk=",
|
||||
"path": "/home/alukard/projects/base16-material-ocean-scheme",
|
||||
"type": "path"
|
||||
},
|
||||
"original": {
|
||||
"path": "/home/alukard/projects/base16-material-ocean-scheme",
|
||||
"type": "path"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1623343236,
|
||||
"narHash": "sha256-Cl/0/WW3AWjkO7gphw9FqUr4P7T98KKyFCX3Vxv22Sk=",
|
||||
"owner": "nix-community",
|
||||
"lastModified": 1623806118,
|
||||
"narHash": "sha256-c7JrIkdhF9hJdx4+9W7NcYd05PvHppyMNJkM2cIMvjc=",
|
||||
"owner": "AlukardBF",
|
||||
"repo": "home-manager",
|
||||
"rev": "666eee4f72979b0ebbd2e065a3846d7a8a16895c",
|
||||
"rev": "97f2897d27cdbcae2179abcad20c4bf66382c777",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"owner": "AlukardBF",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@ -83,17 +71,16 @@
|
||||
"materia-theme": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1615115449,
|
||||
"narHash": "sha256-Ee3ssXytFuKbWKMv/RCfD5FehSxrMwoos9Evmgljir8=",
|
||||
"lastModified": 1620818711,
|
||||
"narHash": "sha256-0eCAfm/MWXv6BbCl2vbVbvgv8DiUH09TAUhoKq7Ow0k=",
|
||||
"owner": "nana-4",
|
||||
"repo": "materia-theme",
|
||||
"rev": "3e2220a133746a7fc80b0f995a40ffda55443de0",
|
||||
"rev": "76cac96ca7fe45dc9e5b9822b0fbb5f4cad47984",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nana-4",
|
||||
"repo": "materia-theme",
|
||||
"rev": "3e2220a133746a7fc80b0f995a40ffda55443de0",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
@ -118,26 +105,26 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1593360652,
|
||||
"narHash": "sha256-8dXbDWhLzgZfiQ+XZ2rtSnUAafFizeeXJa5fuF/9n4w=",
|
||||
"lastModified": 1623798125,
|
||||
"narHash": "sha256-I6xUuLZWCkdNNvZdNm7P4NtmqMaCI2QHQcrAYvTB3B0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "c5299e9d5bb18f1ebd817e0a4767103b9935f0ee",
|
||||
"rev": "c0c5925832c1da45b1100a10ae5c5a55a6952acf",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"ref": "release-20.03",
|
||||
"ref": "release-21.05",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs-master": {
|
||||
"locked": {
|
||||
"lastModified": 1623544386,
|
||||
"narHash": "sha256-AQ8pcr2qUgHJ11SlV4BAIjWKo739mHWliMD9mMDbyLE=",
|
||||
"lastModified": 1623809531,
|
||||
"narHash": "sha256-cwB6PPsUn7h+6lFUlaEGwE45zyBUmD1NN4m8RO/VGZU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "722e5ccfea7f42e11cfb10e92d444da1a9c9fc26",
|
||||
"rev": "56e1dac7c81ec3efd937111966949e55134efab8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -165,11 +152,11 @@
|
||||
},
|
||||
"nixpkgs-old": {
|
||||
"locked": {
|
||||
"lastModified": 1623351452,
|
||||
"narHash": "sha256-V7DDbbl6h9OyVVMviURW1+pWU6ttYmuRuQRlFrlKZb0=",
|
||||
"lastModified": 1623585158,
|
||||
"narHash": "sha256-AjK7M1/six8IBPOI28nm7yC2k8mZIR2F9QrOwFYHAS0=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "6f3e97e3f8cca69ad2528c8459682900a9b34a2f",
|
||||
"rev": "115dbbe82eb4ec8aabf959068286468a68e0b244",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -181,11 +168,11 @@
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1623544386,
|
||||
"narHash": "sha256-AQ8pcr2qUgHJ11SlV4BAIjWKo739mHWliMD9mMDbyLE=",
|
||||
"lastModified": 1623809531,
|
||||
"narHash": "sha256-cwB6PPsUn7h+6lFUlaEGwE45zyBUmD1NN4m8RO/VGZU=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "722e5ccfea7f42e11cfb10e92d444da1a9c9fc26",
|
||||
"rev": "56e1dac7c81ec3efd937111966949e55134efab8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -210,11 +197,11 @@
|
||||
},
|
||||
"nixpkgs_4": {
|
||||
"locked": {
|
||||
"lastModified": 1623324058,
|
||||
"narHash": "sha256-Jm9GUTXdjXz56gWDKy++EpFfjrBaxqXlLvTLfgEi8lo=",
|
||||
"lastModified": 1623580589,
|
||||
"narHash": "sha256-Ayp1cjXpwFCkAiWUE46rj9APTltsiEBdIs2+cj+U7+c=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "432fc2d9a67f92e05438dff5fdc2b39d33f77997",
|
||||
"rev": "fa0326ce5233f7d592271df52c9d0812bec47b84",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -228,7 +215,6 @@
|
||||
"inputs": {
|
||||
"base16": "base16",
|
||||
"base16-horizon-scheme": "base16-horizon-scheme",
|
||||
"base16-material-ocean-scheme": "base16-material-ocean-scheme",
|
||||
"home-manager": "home-manager",
|
||||
"i3lock-fancy-rapid": "i3lock-fancy-rapid",
|
||||
"materia-theme": "materia-theme",
|
||||
@ -237,12 +223,29 @@
|
||||
"nixpkgs-master": "nixpkgs-master",
|
||||
"nixpkgs-mozilla": "nixpkgs-mozilla",
|
||||
"nixpkgs-old": "nixpkgs-old",
|
||||
"rycee": "rycee",
|
||||
"zsh-autosuggestions": "zsh-autosuggestions",
|
||||
"zsh-cod": "zsh-cod",
|
||||
"zsh-nix-shell": "zsh-nix-shell",
|
||||
"zsh-you-should-use": "zsh-you-should-use"
|
||||
}
|
||||
},
|
||||
"rycee": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
"lastModified": 1623795125,
|
||||
"narHash": "sha256-EaKQqs7aCUHrKTZz/TXv37CCIsTf5qDYFX/5RbffcCg=",
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"rev": "19b4931631e1f6cc3208270f862d7436e5b03805",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "rycee",
|
||||
"repo": "nur-expressions",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"zsh-autosuggestions": {
|
||||
"flake": false,
|
||||
"locked": {
|
||||
|
14
flake.nix
14
flake.nix
@ -6,18 +6,16 @@
|
||||
nixpkgs-master.url = github:nixos/nixpkgs/master;
|
||||
nixpkgs-old.url = github:nixos/nixpkgs/nixos-20.09;
|
||||
nix.url = github:NixOS/nix/8a5203d3b836497c2c5f157f85008aa8bcb6a1d2;
|
||||
home-manager.url = github:nix-community/home-manager;
|
||||
home-manager.url = github:AlukardBF/home-manager;
|
||||
# home-manager.url = github:nix-community/home-manager;
|
||||
# base16.url = "/shared/nixos/base16-nix";
|
||||
base16.url = github:alukardbf/base16-nix;
|
||||
base16-horizon-scheme = {
|
||||
url = github:michael-ball/base16-horizon-scheme;
|
||||
flake = false;
|
||||
};
|
||||
base16-material-ocean-scheme = {
|
||||
url = "/home/alukard/projects/base16-material-ocean-scheme";
|
||||
flake = false;
|
||||
};
|
||||
materia-theme = {
|
||||
url = github:nana-4/materia-theme/3e2220a133746a7fc80b0f995a40ffda55443de0;
|
||||
url = github:nana-4/materia-theme;
|
||||
flake = false;
|
||||
};
|
||||
zsh-autosuggestions = {
|
||||
@ -44,6 +42,10 @@
|
||||
url = github:mozilla/nixpkgs-mozilla;
|
||||
flake = false;
|
||||
};
|
||||
rycee = {
|
||||
url = gitlab:rycee/nur-expressions;
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, nix, self, ... }@inputs: {
|
||||
|
242
install/install-btrfs.sh
Normal file
242
install/install-btrfs.sh
Normal file
@ -0,0 +1,242 @@
|
||||
#! /usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p perl -p gptfdisk -p parted
|
||||
|
||||
set -e
|
||||
|
||||
CONFIG_FOLDER="$(dirname "$(pwd)")"
|
||||
DEVICE_NAME=NixOS-VM
|
||||
MAX_JOBS=4
|
||||
SWAP_SIZE=2GiB
|
||||
NIXOS_COMMIT="432fc2d9a67f92e05438dff5fdc2b39d33f77997"
|
||||
USE_ECNRYPTION=false
|
||||
|
||||
clean_stdin() {
|
||||
while read -r -t 0; do read -r; done
|
||||
}
|
||||
|
||||
pprint () {
|
||||
local cyan="\e[96m"
|
||||
local default="\e[39m"
|
||||
local timestamp
|
||||
timestamp=$(date +%FT%T.%3NZ)
|
||||
echo -e "${cyan}${timestamp} $1${default}" 1>&2
|
||||
}
|
||||
|
||||
# Create new partitions
|
||||
create_new_part_table() {
|
||||
select ENTRY in $(ls /dev/disk/by-id/);
|
||||
do
|
||||
DISK="/dev/disk/by-id/$ENTRY"
|
||||
echo "Installing system on $ENTRY"
|
||||
break
|
||||
done
|
||||
|
||||
read -p "> Do you want to wipe all data on $ENTRY ?" -n 1 -r
|
||||
echo
|
||||
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
||||
then
|
||||
wipefs -af "$DISK"
|
||||
sgdisk -Zo "$DISK"
|
||||
fi
|
||||
|
||||
pprint "Creating boot (EFI) partition"
|
||||
sgdisk -n 1:1MiB:+256MiB -t 1:EF00 "$DISK"
|
||||
BOOT="$DISK-part1"
|
||||
|
||||
pprint "Creating SWAP partition"
|
||||
sgdisk -n 2::+$SWAP_SIZE -t 2:8200 "$DISK"
|
||||
SWAP="$DISK-part2"
|
||||
|
||||
if [[ "$USE_ECNRYPTION" = true ]]
|
||||
then
|
||||
pprint "Creating LUKS partition"
|
||||
sgdisk -n 3 -t 3:8309 "$DISK"
|
||||
else
|
||||
pprint "Creating ROOT partition"
|
||||
sgdisk -n 3 -t 3:8300 "$DISK"
|
||||
fi
|
||||
LINUX="$DISK-part3"
|
||||
|
||||
partprobe "$DISK"
|
||||
sleep 1
|
||||
|
||||
pprint "Format BOOT partition $BOOT"
|
||||
mkfs.vfat "$BOOT"
|
||||
}
|
||||
|
||||
# Using existed partitions
|
||||
use_old_part_table() {
|
||||
lsblk -o name,type,size,mountpoint | grep part
|
||||
|
||||
pprint "Select BOOT partition (must already be formatted in vfat!)"
|
||||
|
||||
select ENTRY in $(lsblk -o path,size,type | grep part | awk '{print $1}');
|
||||
do
|
||||
BOOT="$ENTRY"
|
||||
echo "You select $BOOT as BOOT"
|
||||
break
|
||||
done
|
||||
|
||||
if [[ "$USE_ECNRYPTION" = true ]]
|
||||
then
|
||||
pprint "Select the partition on which LUKS will be created"
|
||||
else
|
||||
pprint "Select the partition on which ROOT will be created"
|
||||
fi
|
||||
|
||||
select ENTRY in $(lsblk -o path,size,type | grep part | awk '{print $1}');
|
||||
do
|
||||
LINUX="$ENTRY"
|
||||
echo "Installing system on $LINUX"
|
||||
break
|
||||
done
|
||||
|
||||
pprint "Select the partition on which SWAP will be created"
|
||||
|
||||
select ENTRY in $(lsblk -o path,size,type | grep part | awk '{print $1}' && echo NONE);
|
||||
do
|
||||
SWAP="$ENTRY"
|
||||
echo "You select $SWAP as SWAP"
|
||||
break
|
||||
done
|
||||
|
||||
clean_stdin
|
||||
read -p "> Do you want to format BOOT partition in $BOOT?" -n 1 -r
|
||||
echo
|
||||
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
||||
then
|
||||
mkfs.vfat "$BOOT"
|
||||
fi
|
||||
}
|
||||
|
||||
### INSTALLATION BEGIN ###
|
||||
|
||||
read -p "> Do you want to encrypt your disk with LUKS?" -n 1 -r
|
||||
echo
|
||||
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
||||
then
|
||||
USE_ECNRYPTION=true
|
||||
else
|
||||
USE_ECNRYPTION=false
|
||||
fi
|
||||
|
||||
read -p "> Do you want to partition the disk (new gpt table)?" -n 1 -r
|
||||
echo
|
||||
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
||||
then
|
||||
create_new_part_table
|
||||
else
|
||||
use_old_part_table
|
||||
fi
|
||||
|
||||
if [[ "$USE_ECNRYPTION" = true ]]
|
||||
then
|
||||
pprint "Creating LUKS container on $LINUX"
|
||||
clean_stdin
|
||||
cryptsetup --type luks2 --cipher aes-xts-plain64 --key-size 512 --hash sha512 --iter-time 5000 --use-random luksFormat "$LINUX"
|
||||
|
||||
pprint "Open LUKS container on $LINUX"
|
||||
LUKS_DEVICE_NAME=cryptroot
|
||||
clean_stdin
|
||||
cryptsetup luksOpen "$LINUX" "$LUKS_DEVICE_NAME"
|
||||
|
||||
LUKS_DISK="/dev/mapper/$LUKS_DEVICE_NAME"
|
||||
|
||||
pprint "Create BTRFS partition on $LUKS_DISK"
|
||||
BTRFS="${LUKS_DISK}"
|
||||
else
|
||||
LINUX_PARTUUID=$(blkid --match-tag PARTUUID --output value "$LINUX")
|
||||
BTRFS="/dev/disk/by-partuuid/$LINUX_PARTUUID"
|
||||
fi
|
||||
|
||||
if [[ "$SWAP" != "NONE" ]]; then
|
||||
pprint "Create SWAP partition on $SWAP"
|
||||
mkswap $SWAP
|
||||
fi
|
||||
|
||||
pprint "Create BTRFS partition on $BTRFS"
|
||||
mkfs.btrfs -L root -f "$BTRFS"
|
||||
|
||||
pprint "Mount BTRFS partition"
|
||||
mkdir -p /mnt
|
||||
mount -t btrfs "$BTRFS" /mnt
|
||||
|
||||
pprint "Create and mount BTRFS subvolumes"
|
||||
btrfs subvolume create /mnt/nixos
|
||||
btrfs subvolume create /mnt/nix
|
||||
btrfs subvolume create /mnt/home
|
||||
btrfs subvolume create /mnt/var
|
||||
btrfs subvolume create /mnt/bittorrent
|
||||
|
||||
umount /mnt
|
||||
|
||||
mount -t btrfs -o subvol=nixos,compress-force=zstd,noatime,autodefrag,ssd "$BTRFS" /mnt
|
||||
mkdir -p /mnt/nix
|
||||
mount -t btrfs -o subvol=nix,compress-force=zstd,noatime,autodefrag,ssd "$BTRFS" /mnt/nix
|
||||
mkdir -p /mnt/home
|
||||
mount -t btrfs -o subvol=home,compress-force=zstd,noatime,autodefrag,ssd "$BTRFS" /mnt/home
|
||||
mkdir -p /mnt/var
|
||||
mount -t btrfs -o subvol=var,compress-force=zstd,noatime,autodefrag,ssd "$BTRFS" /mnt/var
|
||||
mkdir -p /mnt/media/bittorrent
|
||||
mount -t btrfs -o subvol=bittorrent,nodatacow,ssd "$BTRFS" /mnt/media/bittorrent
|
||||
|
||||
mkdir /mnt/boot
|
||||
mount "$BOOT" /mnt/boot
|
||||
|
||||
pprint "Generate NixOS configuration"
|
||||
nixos-generate-config --root /mnt
|
||||
|
||||
HOSTID=$(head -c8 /etc/machine-id)
|
||||
LINUX_DISK_UUID=$(blkid --match-tag PARTUUID --output value "$LINUX")
|
||||
if [[ "$SWAP" != "NONE" ]]; then
|
||||
SWAP_UUID=$(blkid --match-tag PARTUUID --output value "$SWAP")
|
||||
fi
|
||||
|
||||
HARDWARE_CONFIG=$(mktemp)
|
||||
if [[ "$USE_ECNRYPTION" = true ]]
|
||||
then
|
||||
cat <<CONFIG > "$HARDWARE_CONFIG"
|
||||
networking.hostId = "$HOSTID";
|
||||
boot.initrd.luks.devices."$LUKS_DEVICE_NAME".device = "/dev/disk/by-partuuid/$LINUX_DISK_UUID";
|
||||
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
||||
boot.supportedFilesystems = [ "btrfs" ];
|
||||
CONFIG
|
||||
else
|
||||
cat <<CONFIG > "$HARDWARE_CONFIG"
|
||||
networking.hostId = "$HOSTID";
|
||||
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
||||
boot.supportedFilesystems = [ "btrfs" ];
|
||||
CONFIG
|
||||
fi
|
||||
|
||||
pprint "Append BTRFS configuration to hardware-configuration.nix"
|
||||
sed -i "\$e cat $HARDWARE_CONFIG" /mnt/etc/nixos/hardware-configuration.nix
|
||||
|
||||
if [[ "$SWAP" != "NONE" ]]; then
|
||||
perl -0777 -pi -e "s#swapDevices.+#swapDevices = [\n {\n device = \"/dev/disk/by-partuuid/$SWAP_UUID\";\n randomEncryption.enable = true;\n }\n ];#" /mnt/etc/nixos/hardware-configuration.nix
|
||||
fi
|
||||
|
||||
sed -i "s#\"subvol=nixos\"#\"subvol=nixos\" \"compress-force=zstd\" \"noatime\" \"autodefrag\" \"ssd\"#" /mnt/etc/nixos/hardware-configuration.nix
|
||||
sed -i "s#\"subvol=home\"#\"subvol=home\" \"compress-force=zstd\" \"noatime\" \"autodefrag\" \"ssd\"#" /mnt/etc/nixos/hardware-configuration.nix
|
||||
sed -i "s#\"subvol=nix\"#\"subvol=nix\" \"compress-force=zstd\" \"noatime\" \"autodefrag\" \"ssd\"#" /mnt/etc/nixos/hardware-configuration.nix
|
||||
sed -i "s#\"subvol=var\"#\"subvol=var\" \"compress-force=zstd\" \"noatime\" \"autodefrag\" \"ssd\"#" /mnt/etc/nixos/hardware-configuration.nix
|
||||
sed -i "s#\"subvol=bittorrent\"#\"subvol=bittorrent\" \"nodatacow\" \"ssd\"#" /mnt/etc/nixos/hardware-configuration.nix
|
||||
|
||||
pprint "Copy minimal config to destination system"
|
||||
cp /mnt/etc/nixos/hardware-configuration.nix $CONFIG_FOLDER/machines/$DEVICE_NAME/hardware-configuration.nix
|
||||
# Change <not-detected> for flakes
|
||||
sed -i "s#<nixpkgs/nixos/modules/installer/scan/not-detected.nix>#\"\${inputs.nixpkgs}/nixos/modules/installer/scan/not-detected.nix\"#" $CONFIG_FOLDER/machines/$DEVICE_NAME/hardware-configuration.nix
|
||||
cp ./min-config.nix /mnt/etc/nixos/configuration.nix
|
||||
sed -i "s/changeme/$DEVICE_NAME/" /mnt/etc/nixos/configuration.nix
|
||||
|
||||
clean_stdin
|
||||
read -p "> Do you want to execute nixos-install command?" -n 1 -r
|
||||
echo
|
||||
if [[ "$REPLY" =~ ^[Yy]$ ]]
|
||||
then
|
||||
nixos-install -I nixpkgs=https://github.com/NixOS/nixpkgs/archive/$NIXOS_COMMIT.tar.gz --max-jobs $MAX_JOBS --no-root-passwd
|
||||
fi
|
||||
|
||||
pprint "Copy config to destination system"
|
||||
mkdir -p /mnt/home/alukard/nixos-config
|
||||
cp -aT $CONFIG_FOLDER /mnt/home/alukard/nixos-config
|
0
install/install.sh → install/install-zsh.sh
Executable file → Normal file
0
install/install.sh → install/install-zsh.sh
Executable file → Normal file
@ -46,7 +46,7 @@
|
||||
|
||||
nix = {
|
||||
useSandbox = true;
|
||||
# autoOptimiseStore = true;
|
||||
autoOptimiseStore = false;
|
||||
optimise.automatic = true;
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
@ -72,6 +72,6 @@
|
||||
hashedPassword = "$6$kDBGyd99tto$9LjQwixa7NYB9Kaey002MD94zHob1MmNbVz9kx3yX6Q4AmVgsFMGUyNuHozXprxyuXHIbOlTcf8nd4rK8MWfI/";
|
||||
};
|
||||
|
||||
system.stateVersion = "20.09";
|
||||
system.stateVersion = "21.05";
|
||||
|
||||
}
|
||||
|
@ -1,8 +1,9 @@
|
||||
{ inputs, ... }: {
|
||||
imports = [
|
||||
imports = with inputs.self.nixosModules; [
|
||||
./hardware-configuration.nix
|
||||
inputs.self.nixosProfiles.desktop
|
||||
];
|
||||
|
||||
deviceSpecific.devInfo = {
|
||||
cpu = {
|
||||
vendor = "amd";
|
||||
|
@ -6,56 +6,55 @@
|
||||
{
|
||||
imports = [ ];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "xhci_pci" "ahci" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "xhci_pci" "ahci" "nvme" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "rpool/system/root";
|
||||
fsType = "zfs";
|
||||
{ device = "/dev/disk/by-uuid/95b3583e-41d8-4a34-9ff5-52a7546b9baa";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nixos" "compress-force=zstd" "noatime" "autodefrag" "ssd" ];
|
||||
};
|
||||
|
||||
fileSystems."/nix" =
|
||||
{ device = "rpool/local/nix";
|
||||
fsType = "zfs";
|
||||
};
|
||||
|
||||
fileSystems."/var" =
|
||||
{ device = "rpool/system/var";
|
||||
fsType = "zfs";
|
||||
{ device = "/dev/disk/by-uuid/95b3583e-41d8-4a34-9ff5-52a7546b9baa";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=nix" "compress-force=zstd" "noatime" "autodefrag" "ssd" ];
|
||||
};
|
||||
|
||||
fileSystems."/home" =
|
||||
{ device = "rpool/user/home";
|
||||
fsType = "zfs";
|
||||
{ device = "/dev/disk/by-uuid/95b3583e-41d8-4a34-9ff5-52a7546b9baa";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=home" "compress-force=zstd" "noatime" "autodefrag" "ssd" ];
|
||||
};
|
||||
|
||||
fileSystems."/home/alukard/.libvirt" =
|
||||
{ device = "rpool/local/libvirt";
|
||||
fsType = "zfs";
|
||||
fileSystems."/var" =
|
||||
{ device = "/dev/disk/by-uuid/95b3583e-41d8-4a34-9ff5-52a7546b9baa";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=var" "compress-force=zstd" "noatime" "autodefrag" "ssd" ];
|
||||
};
|
||||
|
||||
fileSystems."/bittorrent" =
|
||||
{ device = "rpool/local/bittorrent";
|
||||
fsType = "zfs";
|
||||
fileSystems."/media/bittorrent" =
|
||||
{ device = "/dev/disk/by-uuid/95b3583e-41d8-4a34-9ff5-52a7546b9baa";
|
||||
fsType = "btrfs";
|
||||
options = [ "subvol=bittorrent" "nodatacow" "ssd" ];
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/9D49-7087";
|
||||
{ device = "/dev/disk/by-uuid/CA29-07D6";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/dev/disk/by-partuuid/6e22eab7-2e47-4108-bd97-76e3bdc2c6c1";
|
||||
device = "/dev/disk/by-partuuid/1bba72d3-9a12-4407-87ab-f2640dbbadf5";
|
||||
randomEncryption.enable = true;
|
||||
}
|
||||
];
|
||||
|
||||
virtualisation.virtualbox.guest.enable = true;
|
||||
networking.hostId = "524df2e8";
|
||||
boot.zfs.devNodes = "/dev/disk/by-partuuid/37beaf62-685a-43b2-95b2-e777a77993e1";
|
||||
boot.supportedFilesystems = [ "zfs" ];
|
||||
boot.kernelParams = [ "zfs.zfs_arc_max=1073741824" ];
|
||||
networking.hostId = "c4ab8679";
|
||||
boot.initrd.supportedFilesystems = [ "btrfs" ];
|
||||
boot.supportedFilesystems = [ "btrfs" ];
|
||||
}
|
||||
|
83
modules/applications-setup.nix
Normal file
83
modules/applications-setup.nix
Normal file
@ -0,0 +1,83 @@
|
||||
{ config, pkgs, ... }: {
|
||||
defaultApplications = {
|
||||
fm = {
|
||||
cmd = "${pkgs.xfce4-14.thunar}/bin/thunar";
|
||||
desktop = "thunar";
|
||||
};
|
||||
monitor = {
|
||||
cmd = "${pkgs.xfce4-14.xfce4-taskmanager}/bin/xfce4-taskmanager";
|
||||
desktop = "taskmanager";
|
||||
};
|
||||
torrent = {
|
||||
cmd = "${pkgs.qbittorrent}/bin/qbittorrent";
|
||||
desktop = "qbittorrent";
|
||||
};
|
||||
archive = {
|
||||
cmd = "${pkgs.xarchiver}/bin/xarchiver";
|
||||
desktop = "xarchiver";
|
||||
};
|
||||
messenger = {
|
||||
cmd = "${pkgs.tdesktop}/bin/telegram-desktop";
|
||||
desktop = "telegram-desktop";
|
||||
};
|
||||
# mail = {
|
||||
# cmd = "${pkgs.trojita}/bin/trojita";
|
||||
# desktop = "trojita";
|
||||
# };
|
||||
# text_processor = {
|
||||
# cmd = "${pkgs.libreoffice}/bin/libreoffice";
|
||||
# desktop = "libreoffice";
|
||||
# };
|
||||
# spreadsheet = {
|
||||
# cmd = "${pkgs.gnumeric}/bin/gnumeric";
|
||||
# desktop = "gnumeric";
|
||||
# };
|
||||
};
|
||||
|
||||
startupApplications = with config.defaultApplications; [
|
||||
messenger.cmd
|
||||
"${pkgs.keepassxc}/bin/keepassxc --keyfile=/home/alukard/.passwords.key /home/alukard/nixos-config/misc/Passwords.kdbx"
|
||||
"${term.cmd} spt"
|
||||
];
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = config.defaultApplications.editor.cmd;
|
||||
VISUAL = config.defaultApplications.editor.cmd;
|
||||
};
|
||||
|
||||
home-manager.users.alukard = {
|
||||
home.activation."mimeapps-remove" = {
|
||||
before = [ "checkLinkTargets" ];
|
||||
after = [ ];
|
||||
data = "rm -f /home/alukard/.config/mimeapps.list";
|
||||
};
|
||||
|
||||
xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
with config.defaultApplications;
|
||||
builtins.mapAttrs (name: value:
|
||||
if value ? desktop then [ "${value.desktop}.desktop" ] else value) {
|
||||
"text/html" = browser;
|
||||
"image/*" = { desktop = "org.gnome.eog"; };
|
||||
"application/x-bittorrent" = torrent;
|
||||
"application/zip" = archive;
|
||||
"application/rar" = archive;
|
||||
"application/7z" = archive;
|
||||
"application/*tar" = archive;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
# "x-scheme-handler/mailto" = mail;
|
||||
"application/pdf" = pdf;
|
||||
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
||||
# text_processor;
|
||||
# "application/msword" = text_processor;
|
||||
# "application/vnd.oasis.opendocument.text" = text_processor;
|
||||
# "text/csv" = spreadsheet;
|
||||
# "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
|
||||
"text/plain" = editor;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -1,102 +1,29 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
with config.deviceSpecific;
|
||||
{
|
||||
options.defaultApplications = lib.mkOption {
|
||||
type = lib.types.attrs;
|
||||
description = "Preferred applications";
|
||||
};
|
||||
options = with lib;
|
||||
with types; {
|
||||
defaultApplications = mkOption {
|
||||
type = attrsOf (submodule ({ name, ... }: {
|
||||
options = {
|
||||
cmd = mkOption { type = path; };
|
||||
desktop = mkOption { type = str; };
|
||||
};
|
||||
}));
|
||||
description = "Preferred applications";
|
||||
};
|
||||
|
||||
startupApplications = mkOption {
|
||||
type = listOf path;
|
||||
description = "Applications to run on startup";
|
||||
};
|
||||
};
|
||||
config = rec {
|
||||
defaultApplications = {
|
||||
term = if (isLaptop || isVM) then {
|
||||
cmd = "${pkgs.kitty}/bin/kitty";
|
||||
desktop = "kitty";
|
||||
} else {
|
||||
cmd = "${pkgs.alacritty}/bin/alacritty";
|
||||
desktop = "alacritty";
|
||||
};
|
||||
dmenu = {
|
||||
cmd = "${pkgs.rofi}/bin/rofi -show run";
|
||||
desktop = "rofi";
|
||||
};
|
||||
editor = {
|
||||
cmd = "${pkgs.vscode}/bin/code";
|
||||
desktop = "code";
|
||||
};
|
||||
browser = {
|
||||
cmd = "${pkgs.vivaldi}/bin/vivaldi";
|
||||
desktop = "vivaldi";
|
||||
};
|
||||
fm = {
|
||||
cmd = "${pkgs.xfce4-14.thunar}/bin/thunar";
|
||||
desktop = "thunar";
|
||||
};
|
||||
monitor = {
|
||||
cmd = "${pkgs.xfce4-14.xfce4-taskmanager}/bin/xfce4-taskmanager";
|
||||
desktop = "taskmanager";
|
||||
};
|
||||
torrent = {
|
||||
cmd = "${pkgs.qbittorrent}/bin/qbittorrent";
|
||||
desktop = "qbittorrent";
|
||||
};
|
||||
archive = {
|
||||
cmd = "${pkgs.xarchiver}/bin/xarchiver";
|
||||
desktop = "xarchiver";
|
||||
};
|
||||
pdf = {
|
||||
cmd = "${pkgs.zathura}/bin/zathura";
|
||||
desktop = "zathura";
|
||||
};
|
||||
# archive = {
|
||||
# cmd = "${pkgs.ark}/bin/ark";
|
||||
# desktop = "org.kde.ark";
|
||||
# };
|
||||
# mail = {
|
||||
# cmd = "${pkgs.trojita}/bin/trojita";
|
||||
# desktop = "trojita";
|
||||
# };
|
||||
# text_processor = {
|
||||
# cmd = "${pkgs.abiword}/bin/abiword";
|
||||
# desktop = "abiword";
|
||||
# };
|
||||
# spreadsheet = {
|
||||
# cmd = "${pkgs.gnumeric}/bin/gnumeric";
|
||||
# desktop = "gnumeric";
|
||||
# };
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
EDITOR = config.defaultApplications.editor.cmd;
|
||||
VISUAL = config.defaultApplications.editor.cmd;
|
||||
};
|
||||
|
||||
home-manager.users.alukard.xdg.mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications =
|
||||
with config.defaultApplications;
|
||||
builtins.mapAttrs (name: value:
|
||||
if value ? desktop then [ "${value.desktop}.desktop" ] else value) {
|
||||
"text/html" = browser;
|
||||
# "image/*" = { desktop = "org.gnome.eog"; };
|
||||
"application/x-bittorrent" = torrent;
|
||||
"application/zip" = archive;
|
||||
"application/rar" = archive;
|
||||
"application/7z" = archive;
|
||||
"application/*tar" = archive;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
# "x-scheme-handler/mailto" = mail;
|
||||
"application/pdf" = pdf;
|
||||
# "application/vnd.openxmlformats-officedocument.wordprocessingml.document" =
|
||||
# text_processor;
|
||||
# "application/msword" = text_processor;
|
||||
# "application/vnd.oasis.opendocument.text" = text_processor;
|
||||
# "text/csv" = spreadsheet;
|
||||
# "application/vnd.oasis.opendocument.spreadsheet" = spreadsheet;
|
||||
"text/plain" = editor;
|
||||
"inode/directory" = fm;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -2,10 +2,15 @@
|
||||
let
|
||||
thm = config.lib.base16.theme;
|
||||
in
|
||||
with config.deviceSpecific;
|
||||
{
|
||||
defaultApplications.term = lib.mkIf (!isLaptop && !isVM && !isISO) {
|
||||
cmd = "${pkgs.alacritty}/bin/alacritty";
|
||||
desktop = "alacritty";
|
||||
};
|
||||
home-manager.users.alukard = {
|
||||
programs.alacritty = {
|
||||
enable = !config.deviceSpecific.isLaptop;
|
||||
enable = !(isLaptop || isVM || isISO);
|
||||
settings = {
|
||||
font = {
|
||||
normal = {
|
||||
|
@ -3,6 +3,10 @@ let
|
||||
thm = config.lib.base16.theme;
|
||||
in
|
||||
{
|
||||
defaultApplications.term = lib.mkIf (config.deviceSpecific.isLaptop) {
|
||||
cmd = "${pkgs.kitty}/bin/kitty";
|
||||
desktop = "kitty";
|
||||
};
|
||||
home-manager.users.alukard = {
|
||||
programs.kitty = {
|
||||
enable = config.deviceSpecific.isLaptop;
|
||||
|
@ -64,10 +64,11 @@ with config.deviceSpecific; {
|
||||
|
||||
# gui
|
||||
# audacity # fixit
|
||||
blueman
|
||||
bookworm
|
||||
discord
|
||||
feh
|
||||
gnome3.simple-scan
|
||||
gnome.eog
|
||||
gparted
|
||||
keepassxc
|
||||
pinta
|
||||
@ -77,7 +78,6 @@ with config.deviceSpecific; {
|
||||
spotifywm
|
||||
system-config-printer
|
||||
tdesktop
|
||||
(vivaldi.override { proprietaryCodecs = true; })
|
||||
vscode
|
||||
xarchiver
|
||||
xfce4-14.thunar
|
||||
@ -88,7 +88,7 @@ with config.deviceSpecific; {
|
||||
# misc
|
||||
i3status-rust
|
||||
papirus-icon-theme
|
||||
] ++ lib.optionals (!isVM) [
|
||||
] ++ lib.optionals (!(isVM || isISO)) [
|
||||
# rust-stable
|
||||
libreoffice
|
||||
] ++ lib.optionals isGaming [
|
||||
@ -102,7 +102,6 @@ with config.deviceSpecific; {
|
||||
wineWowPackages.full
|
||||
] ++ lib.optionals isLaptop [
|
||||
acpi
|
||||
# blueman
|
||||
] ++ lib.optionals (config.device == "AMD-Workstation") [
|
||||
multimc
|
||||
# xonar-fp
|
||||
|
@ -4,6 +4,11 @@ let
|
||||
themeFile = config.lib.base16.templateFile { name = "rofi"; };
|
||||
in
|
||||
{
|
||||
defaultApplications.dmenu = {
|
||||
cmd = "${pkgs.rofi}/bin/rofi -show run";
|
||||
desktop = "rofi";
|
||||
};
|
||||
|
||||
home-manager.users.alukard = {
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
|
@ -1,12 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
with config.lib.base16.theme;
|
||||
with config.deviceSpecific;
|
||||
let
|
||||
thm = config.lib.base16.theme;
|
||||
in
|
||||
{
|
||||
defaultApplications.term = lib.mkIf (isISO || isVM) {
|
||||
cmd = "${pkgs.rxvt-unicode}/bin/urxvt";
|
||||
desktop = "urxvt";
|
||||
};
|
||||
home-manager.users.alukard = {
|
||||
programs.urxvt = {
|
||||
enable = config.deviceSpecific.isLaptop;
|
||||
enable = (isISO || isVM);
|
||||
extraConfig = {
|
||||
"font" = "xft:${thm.powerlineFont}:style=Regular:size=${thm.smallFontSize}";
|
||||
"boldFont" = "xft:${thm.powerlineFont}:style=Bold:size=${thm.smallFontSize}";
|
||||
|
10
modules/applications/vivaldi.nix
Normal file
10
modules/applications/vivaldi.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ pkgs, ... }: {
|
||||
defaultApplications.browser = {
|
||||
cmd = "${pkgs.vivaldi}/bin/vivaldi";
|
||||
desktop = "vivaldi";
|
||||
};
|
||||
|
||||
home-manager.users.alukard.home.packages = with pkgs; [
|
||||
(vivaldi.override { proprietaryCodecs = true; })
|
||||
];
|
||||
}
|
@ -26,6 +26,10 @@ in
|
||||
# #${thm.base0F-hex}
|
||||
# #${thm.base07-hex}
|
||||
# '';
|
||||
defaultApplications.editor = {
|
||||
cmd = "${pkgs.vscode}/bin/code";
|
||||
desktop = "code";
|
||||
};
|
||||
home-manager.users.alukard.home.file.".cache/wal/colors".text = ''
|
||||
#${thm.base00-hex}
|
||||
#${thm.base08-hex}
|
||||
|
@ -5,11 +5,12 @@
|
||||
# efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
kernelPackages = if config.deviceSpecific.isVM then
|
||||
pkgs.linuxPackages
|
||||
else
|
||||
# pkgs.linuxPackages_latest;
|
||||
pkgs.linuxPackages; # FIXME
|
||||
# kernelPackages = if config.deviceSpecific.isVM then
|
||||
# pkgs.linuxPackages
|
||||
# else
|
||||
# # pkgs.linuxPackages_latest;
|
||||
# pkgs.linuxPackages; # FIXME
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
supportedFilesystems = [ "ntfs" ];
|
||||
|
||||
|
@ -1,55 +1,17 @@
|
||||
builtins.listToAttrs (builtins.map (path: {
|
||||
name = builtins.head (let
|
||||
b = builtins.baseNameOf path;
|
||||
m = builtins.match "(.*)\\.nix" b;
|
||||
in if isNull m then [ b ] else m);
|
||||
value = import path;
|
||||
}) [
|
||||
./applications/alacritty.nix
|
||||
./applications/kitty.nix
|
||||
./applications/mpv.nix
|
||||
./applications/packages.nix
|
||||
./applications/rofi.nix
|
||||
./applications/spotify
|
||||
./applications/urxvt.nix
|
||||
./applications/vscode.nix
|
||||
let
|
||||
findModules = dir:
|
||||
builtins.concatLists (builtins.attrValues (builtins.mapAttrs (name: type:
|
||||
if type == "regular" then
|
||||
(if name == "default.nix" then
|
||||
[ ]
|
||||
else [{
|
||||
name = builtins.elemAt (builtins.match "(.*)\\.nix" name) 0;
|
||||
value = dir + "/${name}";
|
||||
}])
|
||||
else if (builtins.readDir (dir + "/${name}")) ? "default.nix" then [{
|
||||
inherit name;
|
||||
value = dir + "/${name}";
|
||||
}] else
|
||||
findModules (dir + "/${name}")) (builtins.readDir dir)));
|
||||
|
||||
# ./sound/pulseeffects
|
||||
|
||||
# ./workspace/barrier.nix
|
||||
./workspace/cursor.nix
|
||||
./workspace/dunst.nix
|
||||
./workspace/fonts.nix
|
||||
./workspace/git.nix
|
||||
./workspace/gpg.nix
|
||||
./workspace/gtk.nix
|
||||
./workspace/i3
|
||||
./workspace/i3status-rust
|
||||
./workspace/kde
|
||||
./workspace/light.nix
|
||||
./workspace/locale.nix
|
||||
./workspace/misc.nix
|
||||
./workspace/picom.nix
|
||||
./workspace/ssh.nix
|
||||
./workspace/xresources.nix
|
||||
./workspace/zsh.nix
|
||||
|
||||
./applications.nix
|
||||
./boot.nix
|
||||
./devices.nix
|
||||
./filesystems.nix
|
||||
./hardware.nix
|
||||
./network.nix
|
||||
./nix.nix
|
||||
./overlay.nix
|
||||
./power.nix
|
||||
./samba.nix
|
||||
./secrets.nix
|
||||
./security.nix
|
||||
./services.nix
|
||||
./sound
|
||||
./themes.nix
|
||||
./virtualisation.nix
|
||||
./wireguard.nix
|
||||
./xserver.nix
|
||||
])
|
||||
in builtins.listToAttrs (findModules ./.)
|
@ -36,6 +36,11 @@ with types; {
|
||||
default =
|
||||
!isNull (builtins.match ".*VM" config.networking.hostName);
|
||||
};
|
||||
isISO = mkOption {
|
||||
type = bool;
|
||||
default =
|
||||
!isNull (builtins.match ".*ISO" config.networking.hostName);
|
||||
};
|
||||
isHost = mkOption {
|
||||
type = bool;
|
||||
default = false;
|
||||
|
@ -8,20 +8,20 @@ with deviceSpecific;
|
||||
# in
|
||||
{
|
||||
|
||||
services.zfs = {
|
||||
trim.enable = true;
|
||||
trim.interval = "weekly";
|
||||
autoScrub.enable = true;
|
||||
autoScrub.interval = "weekly";
|
||||
autoSnapshot = {
|
||||
enable = true;
|
||||
frequent = 8;
|
||||
hourly = 8;
|
||||
daily = 4;
|
||||
weekly = 2;
|
||||
monthly = 2;
|
||||
};
|
||||
};
|
||||
# services.zfs = {
|
||||
# trim.enable = true;
|
||||
# trim.interval = "weekly";
|
||||
# autoScrub.enable = true;
|
||||
# autoScrub.interval = "weekly";
|
||||
# autoSnapshot = {
|
||||
# enable = true;
|
||||
# frequent = 8;
|
||||
# hourly = 8;
|
||||
# daily = 4;
|
||||
# weekly = 2;
|
||||
# monthly = 2;
|
||||
# };
|
||||
# };
|
||||
|
||||
fileSystems = {
|
||||
"/shared/nixos" = lib.mkIf isVM {
|
||||
@ -140,7 +140,7 @@ with deviceSpecific;
|
||||
};
|
||||
|
||||
# Music folder
|
||||
# TODOL FIXIT
|
||||
# TODO: FIXIT
|
||||
"/home/alukard/Music" = {
|
||||
fsType = "none";
|
||||
device = "/media/windows/files/Music";
|
||||
|
@ -1,9 +1,10 @@
|
||||
{ config, lib, pkgs, inputs, ... }: {
|
||||
nix = rec {
|
||||
nixPath = lib.mkForce [ "nixpkgs=/etc/nixpkgs" ];
|
||||
nixPath = lib.mkForce [ "self=/etc/self/compat" "nixpkgs=/etc/nixpkgs" ];
|
||||
binaryCaches = [ "https://cache.nixos.org" ];
|
||||
|
||||
registry.self.flake = inputs.self;
|
||||
registry.nixpkgs.flake = inputs.nixpkgs;
|
||||
|
||||
trustedUsers = [ "root" "alukard" "@wheel" ];
|
||||
|
||||
@ -15,15 +16,16 @@
|
||||
# autoOptimiseStore = config.deviceSpecific.isSSD;
|
||||
autoOptimiseStore = false;
|
||||
|
||||
package = pkgs.nixFlakes;
|
||||
# package = inputs.nix.packages.x86_64-linux.nix;
|
||||
# package = pkgs.nixFlakes;
|
||||
package = inputs.nix.packages.x86_64-linux.nix;
|
||||
|
||||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
|
||||
requireSignedBinaryCaches = false;
|
||||
requireSignedBinaryCaches = true;
|
||||
};
|
||||
|
||||
environment.etc.nixpkgs.source = inputs.nixpkgs;
|
||||
environment.etc.self.source = inputs.self;
|
||||
}
|
@ -24,7 +24,7 @@ in
|
||||
xonar-fp = pkgs.callPackage ./packages/xonar-fp.nix { };
|
||||
advance-touch = pkgs.callPackage ./packages/advance-touch.nix { };
|
||||
nomino = pkgs.callPackage ./packages/nomino.nix { };
|
||||
bpytop = pkgs.callPackage ./packages/bpytop.nix { };
|
||||
# bpytop = pkgs.callPackage ./packages/bpytop.nix { };
|
||||
ibm-plex-powerline = pkgs.callPackage ./packages/ibm-plex-powerline.nix { };
|
||||
bibata-cursors = pkgs.callPackage ./packages/bibata-cursors.nix { };
|
||||
# spotifyd = pkgs.callPackage ./packages/spotifyd.nix { };
|
||||
@ -46,54 +46,6 @@ in
|
||||
pipewire
|
||||
];
|
||||
};
|
||||
fontbh100dpi = pkgs.callPackage ({ stdenv, pkg-config, fetchurl, bdftopcf, fontutil, mkfontscale }: stdenv.mkDerivation {
|
||||
name = "font-bh-100dpi-1.0.3";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-bh-100dpi-1.0.3.tar.bz2";
|
||||
sha256 = "10cl4gm38dw68jzln99ijix730y7cbx8np096gmpjjwff1i73h13";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ];
|
||||
buildInputs = [ ];
|
||||
preConfigure = ''
|
||||
substituteInPlace configure --replace "/bin/sh" "${pkgs.bash}/bin/sh"
|
||||
'';
|
||||
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
|
||||
meta.platforms = lib.platforms.unix;
|
||||
}) {};
|
||||
fontbhlucidatypewriter100dpi = super.callPackage ({ stdenv, pkg-config, fetchurl, bdftopcf, fontutil, mkfontscale }: stdenv.mkDerivation {
|
||||
name = "font-bh-lucidatypewriter-100dpi-1.0.3";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-bh-lucidatypewriter-100dpi-1.0.3.tar.bz2";
|
||||
sha256 = "1fqzckxdzjv4802iad2fdrkpaxl4w0hhs9lxlkyraq2kq9ik7a32";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ];
|
||||
buildInputs = [ ];
|
||||
preConfigure = ''
|
||||
substituteInPlace configure --replace "/bin/sh" "${pkgs.bash}/bin/sh"
|
||||
'';
|
||||
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
|
||||
meta.platforms = lib.platforms.unix;
|
||||
}) {};
|
||||
fontbhlucidatypewriter75dpi = super.callPackage ({ stdenv, pkg-config, fetchurl, bdftopcf, fontutil, mkfontscale }: stdenv.mkDerivation {
|
||||
name = "font-bh-lucidatypewriter-75dpi-1.0.3";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = "mirror://xorg/individual/font/font-bh-lucidatypewriter-75dpi-1.0.3.tar.bz2";
|
||||
sha256 = "0cfbxdp5m12cm7jsh3my0lym9328cgm7fa9faz2hqj05wbxnmhaa";
|
||||
};
|
||||
hardeningDisable = [ "bindnow" "relro" ];
|
||||
nativeBuildInputs = [ pkg-config bdftopcf fontutil mkfontscale ];
|
||||
buildInputs = [ ];
|
||||
preConfigure = ''
|
||||
substituteInPlace configure --replace "/bin/sh" "${pkgs.bash}/bin/sh"
|
||||
'';
|
||||
configureFlags = [ "--with-fontrootdir=$(out)/lib/X11/fonts" ];
|
||||
meta.platforms = lib.platforms.unix;
|
||||
}) {};
|
||||
# qbittorrent = super.qbittorrent.overrideAttrs (old: rec {
|
||||
# version = "4.3.4.11";
|
||||
# src = super.fetchFromGitHub {
|
||||
|
@ -2,16 +2,14 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "bibata-cursors";
|
||||
version = "1.0.3";
|
||||
version = "1.1.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/ful1e5/Bibata_Cursor/releases/download/v${version}/Bibata.tar.gz";
|
||||
sha256 = "1kywj7lvpg3d4dydh2d55gcggpwjcafvm87rqc0wsj1w0p7gy10b";
|
||||
};
|
||||
|
||||
phases = [
|
||||
"installPhase"
|
||||
];
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p "$out/share/icons"
|
||||
|
@ -1,20 +0,0 @@
|
||||
{ stdenv, fetchFromGitHub, gtk-engine-murrine }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
name = "flatcolor-gtk-theme";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "deviantfero";
|
||||
repo = "wpgtk-templates";
|
||||
rev = "90da48ecb26a0b36423db7fb8076615b43b72b47";
|
||||
sha256 = "1k7navk73mzw9lgvgikj96mqdkfb2icw60mdc59dq51rd0nk6d2b";
|
||||
};
|
||||
|
||||
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/themes
|
||||
cp -r FlatColor $out/share/themes
|
||||
rm $out/share/themes/FlatColor/LICENSE
|
||||
'';
|
||||
}
|
@ -19,7 +19,7 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
version = "5.1.0";
|
||||
version = "5.1.3";
|
||||
in fetchzip {
|
||||
name = "ibm-plex-powerline-${version}";
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ stdenv, fetchurl, pkgs }:
|
||||
let
|
||||
icons = "https://gist.github.com/draoncc/3c20d8d4262892ccd2e227eefeafa8ef/raw/3e6e12c213fba1ec28aaa26430c3606874754c30/MaterialIcons-Regular-for-inline.ttf";
|
||||
icons = "https://gist.github.com/AlukardBF/e92009045bbfc6f7a84e082c6634b18f/raw/3e6e12c213fba1ec28aaa26430c3606874754c30/MaterialIcons-Regular-for-inline.ttf";
|
||||
in stdenv.mkDerivation {
|
||||
name = "material-icons-inline";
|
||||
|
||||
|
@ -1,36 +1,10 @@
|
||||
# { stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, pkgs }:
|
||||
|
||||
# with rustPlatform;
|
||||
|
||||
# buildRustPackage rec {
|
||||
# pname = "nomino";
|
||||
# version = "0.4.2";
|
||||
|
||||
# cargoSha256 = "sha256-9p/HD16yreWdjbCaUaan07fnVpPwOCiHaVemfXP6L8c=";
|
||||
|
||||
# src = fetchFromGitHub {
|
||||
# owner = "yaa110";
|
||||
# repo = "nomino";
|
||||
# rev = "8f437051ea51d333aa685679f0e5902d6709d7ef";
|
||||
# sha256 = "1qmy73gmmf0i9svzrw2jz7nlypfybyd1izwd1a13fgm9dn7amja3";
|
||||
# };
|
||||
|
||||
# nativeBuildInputs = [ cmake pkgconfig ];
|
||||
|
||||
# meta = with pkgs.lib; {
|
||||
# description = "Batch rename utility for developers";
|
||||
# homepage = "https://github.com/yaa110/nomino";
|
||||
# license = licenses.mit;
|
||||
# maintainers = with maintainers; [ alukardbf ];
|
||||
# };
|
||||
# }
|
||||
{ stdenv, lib, fetchurl }:
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "nomino";
|
||||
version = "0.4.5";
|
||||
version = "1.1.0";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/yaa110/nomino/releases/download/0.4.5/nomino-linux-64bit";
|
||||
url = "https://github.com/yaa110/nomino/releases/download/${version}/nomino-linux-64bit";
|
||||
sha256 = "03ymw74xprgxwxizlpcd5fbhv6zc7avjqw881lm74xsn3ax4m3b8";
|
||||
};
|
||||
|
||||
|
@ -1,46 +0,0 @@
|
||||
{ lib, fetchFromGitHub, rustPackages_1_45, pkg-config, openssl
|
||||
, withALSA ? true, alsaLib ? null
|
||||
, withPulseAudio ? false, libpulseaudio ? null
|
||||
, withPortAudio ? false, portaudio ? null
|
||||
, withMpris ? false
|
||||
, withKeyring ? false
|
||||
, dbus ? null
|
||||
}:
|
||||
|
||||
rustPackages_1_45.rustPlatform.buildRustPackage rec {
|
||||
pname = "spotifyd";
|
||||
version = "0.3.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "Spotifyd";
|
||||
repo = "spotifyd";
|
||||
rev = "v${version}";
|
||||
sha256 = "055njhy9if4qpsbgbr6615xxhcx9plava1m4l323vi4dbw09wh5r";
|
||||
};
|
||||
|
||||
cargoSha256 = "1ijrl208607abjwpr3cajcbj6sr35bk6ik778a58zf28kzdhrawc";
|
||||
|
||||
cargoBuildFlags = [
|
||||
"--no-default-features"
|
||||
"--features"
|
||||
"${lib.optionalString withALSA "alsa_backend,"}${lib.optionalString withPulseAudio "pulseaudio_backend,"}${lib.optionalString withPortAudio "portaudio_backend,"}${lib.optionalString withMpris "dbus_mpris,"}${lib.optionalString withKeyring "dbus_keyring,"}"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
buildInputs = [ openssl ]
|
||||
++ lib.optional withALSA alsaLib
|
||||
++ lib.optional withPulseAudio libpulseaudio
|
||||
++ lib.optional withPortAudio portaudio
|
||||
++ lib.optional (withMpris || withKeyring) dbus;
|
||||
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
description = "An open source Spotify client running as a UNIX daemon";
|
||||
homepage = "https://github.com/Spotifyd/spotifyd";
|
||||
license = with licenses; [ gpl3 ];
|
||||
maintainers = with maintainers; [ anderslundstedt Br1ght0ne marsam ];
|
||||
platforms = platforms.unix;
|
||||
};
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
|
||||
{ stdenv, pkgs, term }:
|
||||
# TODO: config.defaultApplications doesn't work
|
||||
let
|
||||
yt-mpv = pkgs.writeShellScriptBin "yt-mpv" ''
|
||||
if [[ "$1" != "--no-video" ]]; then
|
||||
|
@ -1,32 +0,0 @@
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
with config.deviceSpecific; {
|
||||
services.tlp = {
|
||||
enable = isLaptop;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_HWP_ON_AC = "balance_performance";
|
||||
CPU_HWP_ON_BAT = "balance_power";
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 0;
|
||||
SCHED_POWERSAVE_ON_AC = 0;
|
||||
SCHED_POWERSAVE_ON_BAT = 1;
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
DISK_DEVICES = "\"nvme0n1 sda\"";
|
||||
DISK_APM_LEVEL_ON_AC = "\"255 254\"";
|
||||
DISK_APM_LEVEL_ON_BAT = "\"255 254\"";
|
||||
SATA_LINKPWR_ON_BAT = "\"med_power_with_dipm max_performance\"";
|
||||
SATA_LINKPWR_ON_AC = "\"med_power_with_dipm max_performance\"";
|
||||
};
|
||||
};
|
||||
|
||||
# services.undervolt = lib.mkIf (config.device == "Dell-Laptop") {
|
||||
# enable = true;
|
||||
# coreOffset = -120;
|
||||
# gpuOffset = -54;
|
||||
# };
|
||||
|
||||
services.thermald.enable = isLaptop;
|
||||
}
|
@ -4,6 +4,8 @@ with config.deviceSpecific; {
|
||||
services.acpid.enable = true;
|
||||
services.acpid.logEvents = false;
|
||||
|
||||
services.blueman.enable = true;
|
||||
|
||||
services.redshift = {
|
||||
enable = true;
|
||||
temperature.day = 5500;
|
||||
@ -25,14 +27,6 @@ with config.deviceSpecific; {
|
||||
};
|
||||
boot.kernelParams = [ "zswap.enabled=0" ];
|
||||
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.samsungUnifiedLinuxDriver pkgs.gutenprint ];
|
||||
};
|
||||
|
||||
hardware.sane.enable = true;
|
||||
services.saned.enable = true;
|
||||
|
||||
services.fstrim = {
|
||||
enable = isSSD;
|
||||
interval = "weekly";
|
||||
@ -53,4 +47,33 @@ with config.deviceSpecific; {
|
||||
systemd.services.systemd-udev-settle.enable = false;
|
||||
|
||||
services.upower.enable = true;
|
||||
|
||||
services.tlp = {
|
||||
enable = isLaptop;
|
||||
settings = {
|
||||
CPU_SCALING_GOVERNOR_ON_AC = "powersave";
|
||||
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
|
||||
CPU_HWP_ON_AC = "balance_performance";
|
||||
CPU_HWP_ON_BAT = "balance_power";
|
||||
CPU_BOOST_ON_AC = 1;
|
||||
CPU_BOOST_ON_BAT = 0;
|
||||
SCHED_POWERSAVE_ON_AC = 0;
|
||||
SCHED_POWERSAVE_ON_BAT = 1;
|
||||
CPU_ENERGY_PERF_POLICY_ON_AC = "balance_performance";
|
||||
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_power";
|
||||
DISK_DEVICES = "\"nvme0n1 sda\"";
|
||||
DISK_APM_LEVEL_ON_AC = "\"255 254\"";
|
||||
DISK_APM_LEVEL_ON_BAT = "\"255 254\"";
|
||||
SATA_LINKPWR_ON_BAT = "\"med_power_with_dipm max_performance\"";
|
||||
SATA_LINKPWR_ON_AC = "\"med_power_with_dipm max_performance\"";
|
||||
};
|
||||
};
|
||||
|
||||
services.undervolt = lib.mkIf (config.device == "Dell-Laptop") {
|
||||
enable = true;
|
||||
coreOffset = -110; # -120
|
||||
gpuOffset = -46; # -54
|
||||
};
|
||||
|
||||
services.thermald.enable = isLaptop;
|
||||
}
|
||||
|
@ -14,6 +14,7 @@
|
||||
actions = {
|
||||
"update-props" = {
|
||||
"bluez5.reconnect-profiles" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
||||
"bluez5.hw-volume" = [ "hfp_ag" "hsp_ag" "a2dp_source" "a2dp_sink" ];
|
||||
# mSBC is not expected to work on all headset + adapter combinations.
|
||||
"bluez5.msbc-support" = true;
|
||||
# SBC-XQ is not expected to work on all headset + adapter combinations.
|
||||
@ -33,6 +34,28 @@
|
||||
};
|
||||
}
|
||||
];
|
||||
# media-session.config.bluez-monitor = {
|
||||
# properties = { };
|
||||
# rules = [
|
||||
# {
|
||||
# actions = {
|
||||
# update-props = {
|
||||
# "bluez5.auto-connect" = [ "hfp_hf" "hsp_hs" "a2dp_sink" ];
|
||||
# "bluez5.hw-volume" =
|
||||
# [ "hfp_ag" "hsp_ag" "a2dp_source" "a2dp_sink" ];
|
||||
# };
|
||||
# };
|
||||
# matches = [{ "device.name" = "~bluez_card.*"; }];
|
||||
# }
|
||||
# {
|
||||
# actions = { update-props = { "node.pause-on-idle" = false; }; };
|
||||
# matches = [
|
||||
# { "node.name" = "~bluez_input.*"; }
|
||||
# { "node.name" = "~bluez_output.*"; }
|
||||
# ];
|
||||
# }
|
||||
# ];
|
||||
# };
|
||||
};
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
@ -23,6 +23,7 @@
|
||||
iconFont = "Font Awesome 5 Free";
|
||||
fallbackIcon = "Material Icons";
|
||||
iconTheme = "Papirus-Dark";
|
||||
iconPackage = pkgs.papirus-icon-theme;
|
||||
|
||||
normalFontSize = "12";
|
||||
headerFontSize = "14";
|
||||
|
14
modules/workspace/auto-run.nix
Normal file
14
modules/workspace/auto-run.nix
Normal file
@ -0,0 +1,14 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
home-manager.users.alukard = {
|
||||
|
||||
programs.command-not-found = {
|
||||
enable = true;
|
||||
dbPath = ../../misc/programs.sqlite;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
NIX_AUTO_RUN = "1";
|
||||
};
|
||||
}
|
12
modules/workspace/direnv.nix
Normal file
12
modules/workspace/direnv.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ ... }: {
|
||||
home-manager.users.alukard = {
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
nix-direnv = {
|
||||
enable = true;
|
||||
enableFlakes = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@ -7,7 +7,7 @@ in {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "${thm.iconTheme}";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
package = thm.iconPackage;
|
||||
};
|
||||
settings = {
|
||||
global = {
|
||||
|
@ -8,6 +8,7 @@
|
||||
signByDefault = true;
|
||||
key = "922DA6E758A0FE4CFAB4E4B2FD266B810DF48DF2";
|
||||
};
|
||||
ignores = [ ".envrc" ".direnv" "*~" ];
|
||||
extraConfig = {
|
||||
core = {
|
||||
editor = "code --wait";
|
||||
|
@ -1,6 +1,10 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
home-manager.users.alukard = {
|
||||
programs.gpg.enable = true;
|
||||
programs.gpg = {
|
||||
enable = true;
|
||||
homedir = "${config.home-manager.users.alukard.xdg.dataHome}/gnupg";
|
||||
};
|
||||
services.gpg-agent = {
|
||||
enable = true;
|
||||
enableSshSupport = true;
|
||||
|
@ -1,72 +1,34 @@
|
||||
{ pkgs, config, lib, inputs, ... }:
|
||||
let
|
||||
thm = config.lib.base16.theme;
|
||||
materia_colors = pkgs.writeTextFile {
|
||||
name = "gtk-generated-colors";
|
||||
# https://github.com/themix-project/themix-plugin-base16/blob/453cccbd2e22f69078c6ded894421c4c0f943bc0/oomox_plugin.py#L424
|
||||
# text = ''
|
||||
# BG=${thm.base00-hex}
|
||||
# FG=${thm.base07-hex}
|
||||
# BTN_BG=${thm.base00-hex}
|
||||
# BTN_FG=${thm.base07-hex}
|
||||
# MENU_BG=${thm.base00-hex}
|
||||
# MENU_FG=${thm.base07-hex}
|
||||
# ACCENT_BG=${thm.base02-hex}
|
||||
# SEL_BG=${thm.base0D-hex}
|
||||
# SEL_FG=${thm.base00-hex}
|
||||
# TXT_BG=${thm.base00-hex}
|
||||
# TXT_FG=${thm.base07-hex}
|
||||
# HDR_BTN_BG=${thm.base00-hex}
|
||||
# HDR_BTN_FG=${thm.base07-hex}
|
||||
# WM_BORDER_FOCUS=${thm.base02-hex}
|
||||
# WM_BORDER_UNFOCUS=${thm.base01-hex}
|
||||
# MATERIA_STYLE_COMPACT=True
|
||||
# MATERIA_COLOR_VARIANT=dark
|
||||
# UNITY_DEFAULT_LAUNCHER_STYLE=False
|
||||
# NAME=generated
|
||||
# '';
|
||||
text = ''
|
||||
BG=${thm.base01-hex}
|
||||
FG=${thm.base06-hex}
|
||||
HDR_BG=${thm.base00-hex}
|
||||
HDR_FG=${thm.base05-hex}
|
||||
SEL_BG=${thm.base0E-hex}
|
||||
SEL_FG=${thm.base00-hex}
|
||||
ACCENT_BG=${thm.base0E-hex}
|
||||
TXT_BG=${thm.base02-hex}
|
||||
TXT_FG=${thm.base07-hex}
|
||||
BTN_BG=${thm.base00-hex}
|
||||
BTN_FG=${thm.base05-hex}
|
||||
HDR_BTN_BG=${thm.base01-hex}
|
||||
HDR_BTN_FG=${thm.base05-hex}
|
||||
ICONS_LIGHT_FOLDER=${thm.base0D-hex}
|
||||
ICONS_LIGHT=${thm.base0D-hex}
|
||||
ICONS_MEDIUM=${thm.base0E-hex}
|
||||
ICONS_DARK=${thm.base00-hex}
|
||||
MATERIA_STYLE_COMPACT=True
|
||||
MATERIA_COLOR_VARIANT=dark
|
||||
UNITY_DEFAULT_LAUNCHER_STYLE=False
|
||||
NAME=generated
|
||||
'';
|
||||
};
|
||||
in {
|
||||
nixpkgs.overlays = [
|
||||
(self: super: {
|
||||
generated-gtk-theme = self.stdenv.mkDerivation rec {
|
||||
name = "generated-gtk-theme";
|
||||
src = inputs.materia-theme;
|
||||
buildInputs = with self; [ sassc bc which inkscape optipng ];
|
||||
installPhase = ''
|
||||
HOME=/build
|
||||
chmod 777 -R .
|
||||
patchShebangs .
|
||||
mkdir -p $out/share/themes
|
||||
substituteInPlace change_color.sh --replace "\$HOME/.themes" "$out/share/themes"
|
||||
echo "Changing colours:"
|
||||
./change_color.sh -o Generated ${materia_colors}
|
||||
chmod 555 -R .
|
||||
'';
|
||||
};
|
||||
generated-gtk-theme =
|
||||
pkgs.callPackage "${inputs.rycee}/pkgs/materia-theme" {
|
||||
configBase16 = {
|
||||
name = "Generated";
|
||||
kind = "dark";
|
||||
colors = {
|
||||
base00.hex.rgb = "${thm.base00-hex}";
|
||||
base01.hex.rgb = "${thm.base00-hex}";
|
||||
base02.hex.rgb = "${thm.base00-hex}";
|
||||
base03.hex.rgb = "${thm.base03-hex}";
|
||||
base04.hex.rgb = "${thm.base04-hex}";
|
||||
base05.hex.rgb = "${thm.base05-hex}";
|
||||
base06.hex.rgb = "${thm.base06-hex}";
|
||||
base07.hex.rgb = "${thm.base07-hex}";
|
||||
base08.hex.rgb = "${thm.base08-hex}";
|
||||
base09.hex.rgb = "${thm.base09-hex}";
|
||||
base0A.hex.rgb = "${thm.base0A-hex}";
|
||||
base0B.hex.rgb = "${thm.base0B-hex}";
|
||||
base0C.hex.rgb = "${thm.base0C-hex}";
|
||||
base0D.hex.rgb = "${thm.base0D-hex}";
|
||||
base0E.hex.rgb = "${thm.base0E-hex}";
|
||||
base0F.hex.rgb = "${thm.base0F-hex}";
|
||||
};
|
||||
};
|
||||
};
|
||||
})
|
||||
];
|
||||
programs.dconf.enable = true;
|
||||
@ -76,27 +38,21 @@ in {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "${thm.iconTheme}";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
package = thm.iconPackage;
|
||||
};
|
||||
theme = {
|
||||
name = "Generated";
|
||||
package = pkgs.generated-gtk-theme;
|
||||
};
|
||||
font = {
|
||||
name = "${thm.font} ${thm.normalFontSize}";
|
||||
};
|
||||
gtk3 = {
|
||||
extraConfig = {
|
||||
gtk-cursor-theme-name = "Bibata-Modern-Classic";
|
||||
};
|
||||
name = "${thm.font}";
|
||||
size = lib.toInt thm.normalFontSize;
|
||||
};
|
||||
};
|
||||
|
||||
home.sessionVariables.GTK_THEME = "Generated";
|
||||
home.sessionVariables.XDG_DATA_DIRS = [
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
];
|
||||
home.sessionVariables.GTK_THEME = "Generated";
|
||||
};
|
||||
environment.sessionVariables.XDG_CURRENT_DESKTOP = "X-Generic";
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ in {
|
||||
};
|
||||
# fonts = [ "${thm.fontMono} ${thm.microFontSize}" ];
|
||||
fonts = {
|
||||
names = [ "${thm.fontMono}" ];
|
||||
names = [ "${thm.font}" ];
|
||||
style = "Regular";
|
||||
# size = thm.microFontSize;
|
||||
size = 10.0;
|
||||
@ -88,12 +88,8 @@ in {
|
||||
}
|
||||
];
|
||||
};
|
||||
startup = map (a: { notification = false; } // a) [
|
||||
startup = (map (command: { inherit command; }) config.startupApplications) ++ [
|
||||
{ command = "${pkgs.feh}/bin/feh --bg-fill $HOME/nixos-config/misc/wallpaper"; }
|
||||
{ command = "${pkgs.xorg.xrdb}/bin/xrdb -merge ~/.Xresources"; }
|
||||
{ command = "${pkgs.tdesktop}/bin/telegram-desktop"; }
|
||||
{ command = "${pkgs.keepassxc}/bin/keepassxc --keyfile=/home/alukard/.passwords.key /home/alukard/nixos-config/misc/Passwords.kdbx"; }
|
||||
{ command = "${apps.term.cmd} spt"; }
|
||||
];
|
||||
keybindings = let
|
||||
script = name: content: "exec ${pkgs.writeScript name content}";
|
||||
@ -101,6 +97,7 @@ in {
|
||||
++ [ [ "c" "" ] [ "t" "" ] ];
|
||||
in ({
|
||||
"${modifier}+q" = "kill";
|
||||
"${modifier}+Shift+q" = "move container to workspace temp; [workspace=__focused__] kill; workspace temp; move container to workspace temp; workspace temp";
|
||||
"${modifier}+w" = "exec ${apps.dmenu.cmd}";
|
||||
"${modifier}+Return" = "exec ${apps.term.cmd}";
|
||||
"${modifier}+e" = "exec ${apps.editor.cmd}";
|
||||
|
@ -8,8 +8,8 @@ in {
|
||||
id = "default";
|
||||
# fonts = [ "${thm.iconFont} Solid ${thm.microFontSize}" "${thm.fallbackIcon} ${thm.microFontSize}" "${thm.powerlineFont} SemiBold ${thm.microFontSize}" ];
|
||||
fonts = {
|
||||
names = [ "${thm.iconFont}" "${thm.fallbackIcon}" "${thm.powerlineFont}" ];
|
||||
style = "Solid Regular SemiBold";
|
||||
names = [ "${thm.powerlineFont}" "${thm.iconFont}" "${thm.fallbackIcon}" ];
|
||||
style = "Regular";
|
||||
# size = thm.microFontSize;
|
||||
size = 10.0;
|
||||
};
|
||||
@ -134,7 +134,7 @@ in {
|
||||
[[block]]
|
||||
block = "battery"
|
||||
interval = 10
|
||||
format = "{percentage}% {time}"
|
||||
format = "{percentage} {time}"
|
||||
|
||||
[[block]]
|
||||
block = "backlight"
|
||||
@ -161,7 +161,7 @@ in {
|
||||
[[block]]
|
||||
block = "cpu"
|
||||
interval = 1
|
||||
format = "{utilization}% {frequency}"
|
||||
format = "{utilization} {frequency}"
|
||||
|
||||
[[block]]
|
||||
block = "memory"
|
||||
|
@ -1,4 +1,4 @@
|
||||
{ iconfont, ... }: ''
|
||||
#!/usr/bin/env bash
|
||||
echo '<span font="${iconfont} Solid"></span>' `zfs list -o space | head -2 | tail -1 | awk '{printf "%s / %s", $3, $2}'`
|
||||
echo '<span font="${iconfont} Solid"></span>'
|
||||
''
|
||||
|
@ -1,135 +1,130 @@
|
||||
{ pkgs, lib, config, ... }:
|
||||
let
|
||||
thm = config.lib.base16.theme;
|
||||
in
|
||||
{
|
||||
# xdg.portal.enable = true;
|
||||
# services.dbus.packages = [
|
||||
# pkgs.systemd
|
||||
# pkgs.papirus-icon-theme
|
||||
# ];
|
||||
# services.udev.packages = [
|
||||
# pkgs.libmtp
|
||||
# pkgs.media-player-info
|
||||
# ];
|
||||
with config.lib.base16.theme; {
|
||||
xdg.portal.enable = true;
|
||||
services.dbus.packages =
|
||||
[ pkgs.systemd pkgs.papirus-icon-theme ];
|
||||
services.udev.packages = [ pkgs.libmtp pkgs.media-player-info ];
|
||||
|
||||
environment.sessionVariables = {
|
||||
# DESKTOP_SESSION = "kde";
|
||||
QT_XFT = "true";
|
||||
QT_SELECT = "5";
|
||||
KDE_SESSION_VERSION = "5";
|
||||
QT_SCALE_FACTOR = "1";
|
||||
QT_AUTO_SCREEN_SCALE_FACTOR = "0";
|
||||
# DE = "kde";
|
||||
QT_QPA_PLATFORMTHEME = "kde";
|
||||
KDEDIRS = "/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5";
|
||||
KDEDIRS =
|
||||
"/run/current-system/sw:/run/current-system/sw/share/kservices5:/run/current-system/sw/share/kservicetypes5:/run/current-system/sw/share/kxmlgui5";
|
||||
};
|
||||
home-manager.users.alukard = {
|
||||
services.kdeconnect.enable = true;
|
||||
|
||||
home-manager.users.alukard.xdg.configFile."kdeglobals".text = lib.generators.toINI {} {
|
||||
"Colors:Button" = {
|
||||
BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
|
||||
DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
|
||||
ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
|
||||
ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
|
||||
ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
|
||||
ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
|
||||
xdg.configFile."kdeglobals".text = lib.generators.toINI {} {
|
||||
"Colors:Button" = {
|
||||
BackgroundAlternate = base01-hex;
|
||||
BackgroundNormal = base01-hex;
|
||||
DecorationFocus = base02-hex;
|
||||
DecorationHover = base02-hex;
|
||||
ForegroundActive = base05-hex;
|
||||
ForegroundInactive = base01-hex;
|
||||
ForegroundLink = base0D-hex;
|
||||
ForegroundNegative = base08-hex;
|
||||
ForegroundNeutral = base09-hex;
|
||||
ForegroundNormal = base05-hex;
|
||||
ForegroundPositive = base0B-hex;
|
||||
ForegroundVisited = base03-hex;
|
||||
};
|
||||
"Colors:Complementary" = {
|
||||
BackgroundAlternate = base01-hex;
|
||||
BackgroundNormal = base03-hex;
|
||||
DecorationFocus = base02-hex;
|
||||
DecorationHover = base02-hex;
|
||||
ForegroundActive = base09-hex;
|
||||
ForegroundInactive = base01-hex;
|
||||
ForegroundLink = base0D-hex;
|
||||
ForegroundNegative = base08-hex;
|
||||
ForegroundNeutral = base0A-hex;
|
||||
ForegroundNormal = base05-hex;
|
||||
ForegroundPositive = base0B-hex;
|
||||
ForegroundVisited = base02-hex;
|
||||
};
|
||||
"Colors:Selection" = {
|
||||
BackgroundAlternate = base0D-hex;
|
||||
BackgroundNormal = base0D-hex;
|
||||
DecorationFocus = base0D-hex;
|
||||
DecorationHover = base0D-hex;
|
||||
ForegroundActive = base05-hex;
|
||||
ForegroundInactive = base05-hex;
|
||||
ForegroundLink = base0D-hex;
|
||||
ForegroundNegative = base08-hex;
|
||||
ForegroundNeutral = base09-hex;
|
||||
ForegroundNormal = base05-hex;
|
||||
ForegroundPositive = base0B-hex;
|
||||
ForegroundVisited = base02-hex;
|
||||
};
|
||||
"Colors:Tooltip" = {
|
||||
BackgroundAlternate = base01-hex;
|
||||
BackgroundNormal = base00-hex;
|
||||
DecorationFocus = base02-hex;
|
||||
DecorationHover = base02-hex;
|
||||
ForegroundActive = base02-hex;
|
||||
ForegroundInactive = base01-hex;
|
||||
ForegroundLink = base0D-hex;
|
||||
ForegroundNegative = base08-hex;
|
||||
ForegroundNeutral = base09-hex;
|
||||
ForegroundNormal = base05-hex;
|
||||
ForegroundPositive = base0B-hex;
|
||||
ForegroundVisited = base03-hex;
|
||||
};
|
||||
"Colors:View" = {
|
||||
BackgroundAlternate = base01-hex;
|
||||
BackgroundNormal = base00-hex;
|
||||
DecorationFocus = base02-hex;
|
||||
DecorationHover = base02-hex;
|
||||
ForegroundActive = base02-hex;
|
||||
ForegroundInactive = base01-hex;
|
||||
ForegroundLink = base0D-hex;
|
||||
ForegroundNegative = base08-hex;
|
||||
ForegroundNeutral = base09-hex;
|
||||
ForegroundNormal = base05-hex;
|
||||
ForegroundPositive = base0B-hex;
|
||||
ForegroundVisited = base03-hex;
|
||||
};
|
||||
"Colors:Window" = {
|
||||
BackgroundAlternate = base01-hex;
|
||||
BackgroundNormal = base00-hex;
|
||||
DecorationFocus = base02-hex;
|
||||
DecorationHover = base02-hex;
|
||||
ForegroundActive = base02-hex;
|
||||
ForegroundInactive = base01-hex;
|
||||
ForegroundLink = base0D-hex;
|
||||
ForegroundNegative = base08-hex;
|
||||
ForegroundNeutral = base09-hex;
|
||||
ForegroundNormal = base05-hex;
|
||||
ForegroundPositive = base0B-hex;
|
||||
ForegroundVisited = base03-hex;
|
||||
};
|
||||
General = {
|
||||
ColorScheme = "Generated";
|
||||
Name = "Generated";
|
||||
fixed = "${fontMono},${smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
font = "${font},${smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
menuFont = "${font},${smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
shadeSortColumn = true;
|
||||
smallestReadableFont =
|
||||
"${font},${minimalFontSize},-1,5,57,0,0,0,0,0,Medium";
|
||||
toolBarFont = "${font},${smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
};
|
||||
KDE = {
|
||||
DoubleClickInterval = 400;
|
||||
ShowDeleteCommand = true;
|
||||
SingleClick = false;
|
||||
StartDragDist = 4;
|
||||
StartDragTime = 500;
|
||||
WheelScrollLines = 3;
|
||||
contrast = 4;
|
||||
widgetStyle = "Breeze";
|
||||
};
|
||||
Icons = { Theme = "${iconTheme}"; };
|
||||
};
|
||||
"Colors:Complementary" = {
|
||||
BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
|
||||
DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundActive = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
|
||||
ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
|
||||
ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
|
||||
ForegroundNeutral = "${thm.base0A-rgb-r}, ${thm.base0A-rgb-g}, ${thm.base0A-rgb-b}";
|
||||
ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
|
||||
ForegroundVisited = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
};
|
||||
"Colors:Selection" = {
|
||||
BackgroundAlternate = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
BackgroundNormal = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundActive = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundInactive = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
|
||||
ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
|
||||
ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
|
||||
ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
|
||||
ForegroundVisited = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
};
|
||||
"Colors:Tooltip" = {
|
||||
BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
|
||||
DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
|
||||
ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
|
||||
ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
|
||||
ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
|
||||
ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
|
||||
};
|
||||
"Colors:View" = {
|
||||
BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
|
||||
DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
|
||||
ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
|
||||
ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
|
||||
ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
|
||||
ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
|
||||
};
|
||||
"Colors:Window" = {
|
||||
BackgroundAlternate = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
BackgroundNormal = "${thm.base00-rgb-r}, ${thm.base00-rgb-g}, ${thm.base00-rgb-b}";
|
||||
DecorationFocus = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
DecorationHover = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundActive = "${thm.base02-rgb-r}, ${thm.base02-rgb-g}, ${thm.base02-rgb-b}";
|
||||
ForegroundInactive = "${thm.base01-rgb-r}, ${thm.base01-rgb-g}, ${thm.base01-rgb-b}";
|
||||
ForegroundLink = "${thm.base0D-rgb-r}, ${thm.base0D-rgb-g}, ${thm.base0D-rgb-b}";
|
||||
ForegroundNegative = "${thm.base08-rgb-r}, ${thm.base08-rgb-g}, ${thm.base08-rgb-b}";
|
||||
ForegroundNeutral = "${thm.base09-rgb-r}, ${thm.base09-rgb-g}, ${thm.base09-rgb-b}";
|
||||
ForegroundNormal = "${thm.base05-rgb-r}, ${thm.base05-rgb-g}, ${thm.base05-rgb-b}";
|
||||
ForegroundPositive = "${thm.base0B-rgb-r}, ${thm.base0B-rgb-g}, ${thm.base0B-rgb-b}";
|
||||
ForegroundVisited = "${thm.base03-rgb-r}, ${thm.base03-rgb-g}, ${thm.base03-rgb-b}";
|
||||
};
|
||||
General = {
|
||||
ColorScheme = "Generated";
|
||||
Name = "Generated";
|
||||
fixed = "${thm.fontMono},${thm.smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
font = "${thm.font},${thm.smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
menuFont = "${thm.font},${thm.smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
shadeSortColumn = true;
|
||||
smallestReadableFont = "${thm.font},${thm.minimalFontSize},-1,5,57,0,0,0,0,0,Medium";
|
||||
toolBarFont = "${thm.font},${thm.smallFontSize},-1,5,50,0,0,0,0,0";
|
||||
};
|
||||
KDE = {
|
||||
DoubleClickInterval = 400;
|
||||
ShowDeleteCommand = true;
|
||||
SingleClick = false;
|
||||
StartDragDist = 4;
|
||||
StartDragTime = 500;
|
||||
WheelScrollLines = 3;
|
||||
contrast = 4;
|
||||
widgetStyle = "Breeze";
|
||||
};
|
||||
Icons = { Theme = "${thm.iconTheme}"; };
|
||||
};
|
||||
}
|
||||
|
@ -1,39 +1,20 @@
|
||||
{ pkgs, lib, config, ... }: {
|
||||
|
||||
environment.sessionVariables = config.home-manager.users.alukard.home.sessionVariables // {
|
||||
NIX_AUTO_RUN = "1";
|
||||
environment.sessionVariables = config.home-manager.users.alukard.home.sessionVariables // rec {
|
||||
LESS = "MR";
|
||||
LESSHISTFILE = "~/.local/share/lesshist";
|
||||
SYSTEMD_LESS = LESS;
|
||||
};
|
||||
|
||||
home-manager.users.alukard = {
|
||||
xdg.enable = true;
|
||||
|
||||
home.activation."mimeapps-remove" = {
|
||||
before = [ "linkGeneration" ];
|
||||
after = [ ];
|
||||
data = "rm -f /home/alukard/.config/mimeapps.list";
|
||||
};
|
||||
|
||||
services.udiskie.enable = true;
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
enableZshIntegration = true;
|
||||
# enable use_flake support
|
||||
stdlib = ''
|
||||
use_flake() {
|
||||
watch_file flake.nix
|
||||
watch_file flake.lock
|
||||
eval "$(nix print-dev-env)"
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
news.display = "silent";
|
||||
|
||||
systemd.user.startServices = true;
|
||||
};
|
||||
|
||||
home-manager.users.alukard.home.stateVersion = "20.09";
|
||||
home-manager.users.alukard.home.stateVersion = "21.11";
|
||||
system.stateVersion = "21.11";
|
||||
|
||||
system.stateVersion = "20.03";
|
||||
systemd.services.systemd-timesyncd.wantedBy = [ "multi-user.target" ];
|
||||
systemd.timers.systemd-timesyncd = { timerConfig.OnCalendar = "hourly"; };
|
||||
}
|
||||
|
12
modules/workspace/print-scan.nix
Normal file
12
modules/workspace/print-scan.nix
Normal file
@ -0,0 +1,12 @@
|
||||
{ pkgs, config, ... }:
|
||||
{
|
||||
services.printing = {
|
||||
enable = true;
|
||||
drivers = [ pkgs.samsungUnifiedLinuxDriver pkgs.gutenprint ];
|
||||
};
|
||||
|
||||
hardware.sane.enable = true;
|
||||
services.saned.enable = true;
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome3.simple-scan ];
|
||||
}
|
@ -16,25 +16,4 @@
|
||||
Match host * exec "gpg-connect-agent UPDATESTARTUPTTY /bye"
|
||||
'';
|
||||
};
|
||||
|
||||
# services.openssh = {
|
||||
# enable = true;
|
||||
# passwordAuthentication = false;
|
||||
# permitRootLogin = "yes";
|
||||
# forwardX11 = true;
|
||||
# ports = [ 22 ];
|
||||
# };
|
||||
# home-manager.users.alukard.programs.ssh = {
|
||||
# enable = true;
|
||||
# matchBlocks = {
|
||||
# "*" = {
|
||||
# compression = false;
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
|
||||
# users.users.alukard.openssh.authorizedKeys.keys = [
|
||||
# "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC+xd8ClJPvJuAdYC9HlNnjiubEtYfvnKjYr9ROV+UmPVvI3ZITF24OaMI+fxgR0EqGfcUzSGom8528IB53Q3aFMIAaA0vKjW+jrByyB2l/k/+ttpLbH75c9WyOpAcUDTen8BhHKPyXOHoJ1jLu7GFmtPZ+mZo8thFB/VIRrwECHd8DnF0drsSCorkRp1bZC7bAHgztaYHNBUoAVGgJ7nLwW7DotlgbUEDiPJHXOxd/c/ZlXIB/cfUUqF+L5ThbMPhMcwRMspLy+nQdmHhih9k6SkvYqJoNqHT5/XeShb0RkIzvUWT2CYTPop5kAY5mMnatVTOY1FZPhHzk3G8MhOQ3r/elM/ecZxmjL8uozMN9kRGf1IL4DgQZfVqQRILdNSQGb0tfeiyirNZe1RlDw9UvMnZJOw0EkiC9lSSRhBWXXxAmxRrbNFTPQSp+/kiIGDmp2AsGhD11CfTDEU3wcLEUPBUqp1FYSzHncJyEKGy2Dpa5xaUJ0cuyGL4W3WHDXa4sTfY+AIXbQTD88Ujdsbfzyd6lrikG4D/crCurXissrh7q9DuYKWRI24cp5bw9lG33U1EXisnZqFyZNwMAmSj2QEGsHCwSevn0FgyRa2WYXgpZ9hfgY4le+ZSMo2JTosQ6DjGyxMDyQAHJ/ismTTzL67Q2p6U+73toYm62Qqdspw== (none)"
|
||||
# ];
|
||||
# programs.ssh.askPassword = "${pkgs.plasma5.ksshaskpass}/bin/ksshaskpass";
|
||||
}
|
||||
|
16
modules/workspace/xdg.nix
Normal file
16
modules/workspace/xdg.nix
Normal file
@ -0,0 +1,16 @@
|
||||
{ config, pkgs, lib, ... }: {
|
||||
home-manager.users.alukard = {
|
||||
xdg.enable = true;
|
||||
xdg.userDirs.enable = true;
|
||||
|
||||
home.sessionVariables.XDG_DATA_DIRS = [
|
||||
"${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}"
|
||||
"${pkgs.gtk3}/share/gsettings-schemas/${pkgs.gtk3.name}"
|
||||
];
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
XDG_CURRENT_DESKTOP = "X-Generic";
|
||||
DE = "generic";
|
||||
};
|
||||
}
|
@ -28,6 +28,14 @@
|
||||
}
|
||||
];
|
||||
|
||||
dotDir = ".config/zsh";
|
||||
|
||||
history = rec {
|
||||
size = 1000000;
|
||||
save = size;
|
||||
path = "$HOME/.local/share/zsh/history";
|
||||
};
|
||||
|
||||
envExtra = ''
|
||||
SHELL="${pkgs.zsh}/bin/zsh";
|
||||
'';
|
||||
@ -92,6 +100,10 @@
|
||||
manix-fzf() {
|
||||
manix "" | grep '^# ' | sed 's/^# \(.*\) (.*/\1/;s/ (.*//;s/^# //' | fzf --preview="manix '{}'" | xargs manix
|
||||
}
|
||||
|
||||
source ${pkgs.nix-zsh-completions}/share/zsh/plugins/nix/nix-zsh-completions.plugin.zsh
|
||||
fpath=(${pkgs.nix-zsh-completions}/share/zsh/site-functions $fpath)
|
||||
autoload -U compinit && compinit
|
||||
'';
|
||||
};
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
imports = with inputs.self.nixosModules; [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
|
||||
applications
|
||||
# auto-run
|
||||
boot
|
||||
devices
|
||||
git
|
||||
@ -14,6 +16,7 @@
|
||||
secrets
|
||||
security
|
||||
ssh
|
||||
xdg
|
||||
zsh
|
||||
];
|
||||
}
|
||||
|
@ -3,10 +3,9 @@
|
||||
./base.nix
|
||||
inputs.base16.hmModule
|
||||
|
||||
applications
|
||||
applications-setup
|
||||
filesystems
|
||||
hardware
|
||||
power
|
||||
samba
|
||||
services
|
||||
sound
|
||||
@ -22,9 +21,11 @@
|
||||
rofi
|
||||
spotify
|
||||
urxvt
|
||||
vivaldi
|
||||
vscode
|
||||
|
||||
cursor
|
||||
direnv
|
||||
dunst
|
||||
fonts
|
||||
gtk
|
||||
@ -33,7 +34,7 @@
|
||||
kde
|
||||
light
|
||||
picom
|
||||
# pulseeffects
|
||||
print-scan
|
||||
xresources
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user