remove swaylock and some cleanup
This commit is contained in:
parent
4bc941f04c
commit
c8d1b42e97
7 changed files with 32 additions and 103 deletions
|
@ -1,4 +1,6 @@
|
||||||
{ lib, config, pkgs, ... }: {
|
{ lib, config, pkgs, ... }: let
|
||||||
|
inherit (lib) mkDefault;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./disks.nix
|
./disks.nix
|
||||||
./options.nix
|
./options.nix
|
||||||
|
@ -16,39 +18,16 @@
|
||||||
initrd = {
|
initrd = {
|
||||||
availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
|
availableKernelModules = [ "nvme" "xhci_pci" "thunderbolt" ];
|
||||||
luks.devices.root.device = "/dev/disk/by-uuid/${config.disks.crypt}";
|
luks.devices.root.device = "/dev/disk/by-uuid/${config.disks.crypt}";
|
||||||
postDeviceCommands = lib.mkAfter ''
|
|
||||||
mkdir /btrfs_tmp
|
|
||||||
mount /dev/disk/by-uuid/${config.disks.root} /btrfs_tmp
|
|
||||||
if [[ -e /btrfs_tmp/root ]]; then
|
|
||||||
mkdir -p /btrfs_tmp/old_roots
|
|
||||||
timestamp=$(date --date="@$(stat -c %Y /btrfs_tmp/root)" "+%Y-%m-%-d_%H:%M:%S")
|
|
||||||
mv /btrfs_tmp/root "/btrfs_tmp/old_roots/$timestamp"
|
|
||||||
fi
|
|
||||||
|
|
||||||
delete_subvolume_recursively() {
|
|
||||||
IFS=$'\n'
|
|
||||||
for i in $(btrfs subvolume list -o "$1" | cut -f 9- -d ' '); do
|
|
||||||
delete_subvolume_recursively "/btrfs_tmp/$i"
|
|
||||||
done
|
|
||||||
btrfs subvolume delete "$1"
|
|
||||||
}
|
|
||||||
|
|
||||||
for i in $(find /btrfs_tmp/old_roots/ -maxdepth 1 -mtime +30); do
|
|
||||||
delete_subvolume_recursively "$i"
|
|
||||||
done
|
|
||||||
|
|
||||||
btrfs subvolume create /btrfs_tmp/root
|
|
||||||
umount /btrfs_tmp
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
kernelModules = [ "kvm-amd" ];
|
kernelModules = [ "kvm-amd" ];
|
||||||
kernelPackages = pkgs.linuxPackages_zen;
|
kernelPackages = pkgs.linuxPackages_zen;
|
||||||
|
|
||||||
loader = {
|
loader = {
|
||||||
systemd-boot = {
|
systemd-boot = {
|
||||||
enable = true;
|
enable = mkDefault true;
|
||||||
|
editor = false;
|
||||||
};
|
};
|
||||||
|
timeout = 1;
|
||||||
efi.canTouchEfiVariables = true;
|
efi.canTouchEfiVariables = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -84,7 +63,6 @@
|
||||||
swapDevices = [ { device = "/swap/swapfile"; } ];
|
swapDevices = [ { device = "/swap/swapfile"; } ];
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
upower.enable = true;
|
|
||||||
fwupd.enable = true;
|
fwupd.enable = true;
|
||||||
power-profiles-daemon.enable = true;
|
power-profiles-daemon.enable = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
{ inputs, pkgs, lib, config, ... }: {
|
{ inputs, pkgs, lib, config, ... }:
|
||||||
|
let
|
||||||
|
inherit (lib) mkDefault;
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
./containers
|
./containers
|
||||||
./games
|
./games
|
||||||
|
@ -32,7 +35,7 @@
|
||||||
documentation.nixos.enable = false;
|
documentation.nixos.enable = false;
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
useDHCP = lib.mkDefault true;
|
useDHCP = mkDefault true;
|
||||||
wireless.iwd.enable = true;
|
wireless.iwd.enable = true;
|
||||||
extraHosts =
|
extraHosts =
|
||||||
''
|
''
|
||||||
|
@ -62,9 +65,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver = {
|
services = {
|
||||||
enable = true;
|
xserver = {
|
||||||
displayManager.gdm.enable = true;
|
enable = true;
|
||||||
|
displayManager.gdm.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users.${config.username}= {
|
users.users.${config.username}= {
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
inherit (lib) mkIf mkMerge;
|
inherit (lib) mkIf mkMerge;
|
||||||
in mkIf config.withGames (mkMerge [
|
in mkIf config.withGames (mkMerge [
|
||||||
(mkIf config.withImpermanence {
|
(mkIf config.withImpermanence {
|
||||||
users.${config.username}= {
|
environment.persistence."/persist".users.${config.username}= {
|
||||||
directories = [
|
directories = [
|
||||||
"Games"
|
"Games"
|
||||||
".steam"
|
".steam"
|
||||||
|
|
|
@ -44,12 +44,6 @@
|
||||||
borderRadius = 8;
|
borderRadius = 8;
|
||||||
icons = false;
|
icons = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.swaylock = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.swaylock-effects;
|
|
||||||
settings = import ./swaylock.conf.nix { lib = lib; config = config; };
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,7 +146,6 @@
|
||||||
"Mod+Shift+Ctrl+S".action.screenshot-window = [];
|
"Mod+Shift+Ctrl+S".action.screenshot-window = [];
|
||||||
"Print".action.screenshot-screen = [];
|
"Print".action.screenshot-screen = [];
|
||||||
|
|
||||||
"Mod+Shift+L".action.spawn = "swaylock";
|
|
||||||
"Mod+Shift+Q".action.quit = [];
|
"Mod+Shift+Q".action.quit = [];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
{ lib, config, ... }: {
|
|
||||||
ignore-empty-password = true;
|
|
||||||
screenshots = true;
|
|
||||||
clock = true;
|
|
||||||
submit-on-touch = true;
|
|
||||||
indicator = true;
|
|
||||||
indicator-caps-lock = true;
|
|
||||||
indicator-radius = 100;
|
|
||||||
indicator-thickness = 4;
|
|
||||||
inside-color = lib.strings.concatStrings [ config.theme.overlay "aa" ];
|
|
||||||
inside-clear-color = lib.strings.concatStrings [ config.theme.subtle "aa" ];
|
|
||||||
inside-caps-lock-color = lib.strings.concatStrings [ config.theme.rose "aa" ];
|
|
||||||
inside-ver-color = lib.strings.concatStrings [ config.theme.foam "aa" ];
|
|
||||||
inside-wrong-color = lib.strings.concatStrings [ config.theme.love "aa" ];
|
|
||||||
line-uses-inside = true;
|
|
||||||
ring-color = config.theme.surface;
|
|
||||||
ring-clear-color = config.theme.muted;
|
|
||||||
ring-caps-lock-color = config.theme.gold;
|
|
||||||
ring-ver-color = config.theme.pine;
|
|
||||||
ring-wrong-color = config.theme.love;
|
|
||||||
seperator-color = config.theme.base;
|
|
||||||
key-hl-color = config.theme.iris;
|
|
||||||
bs-hl-color = config.theme.love;
|
|
||||||
caps-lock-key-hl-color = config.theme.iris;
|
|
||||||
caps-lock-bs-hl-color = config.theme.love;
|
|
||||||
text-color = config.theme.text;
|
|
||||||
text-clear-color = config.theme.text;
|
|
||||||
text-caps-lock-color = config.theme.text;
|
|
||||||
text-ver-color = config.theme.text;
|
|
||||||
text-wrong-color = config.theme.text;
|
|
||||||
effect-blur = "30x10";
|
|
||||||
}
|
|
45
outputs.nix
45
outputs.nix
|
@ -1,4 +1,14 @@
|
||||||
{ nixpkgs, lix, home-manager, niri, impermanence, ... }@inputs: {
|
{ nixpkgs, lix, home-manager, niri, impermanence, ... }@inputs: let
|
||||||
|
modules = [
|
||||||
|
./modules
|
||||||
|
./options.nix
|
||||||
|
./colors.nix
|
||||||
|
niri.nixosModules.niri
|
||||||
|
home-manager.nixosModules.home-manager
|
||||||
|
lix.nixosModules.default
|
||||||
|
impermanence.nixosModules.impermanence
|
||||||
|
];
|
||||||
|
in {
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# AMD Ryzen 5600X
|
# AMD Ryzen 5600X
|
||||||
# Nvidia GeForce GTX 1060 (6GB)
|
# Nvidia GeForce GTX 1060 (6GB)
|
||||||
|
@ -10,13 +20,7 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./devices/ellaca
|
./devices/ellaca
|
||||||
./modules
|
] ++ modules;
|
||||||
./options.nix
|
|
||||||
./colors.nix
|
|
||||||
niri.nixosModules.niri
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
lix.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Zotac ZBOX-CI327NANO
|
# Zotac ZBOX-CI327NANO
|
||||||
|
@ -30,13 +34,7 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./devices/pleniscenta
|
./devices/pleniscenta
|
||||||
./modules
|
] ++ modules;
|
||||||
./options.nix
|
|
||||||
./colors.nix
|
|
||||||
niri.nixosModules.niri
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
lix.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Lenovo Thinkpad T540p
|
# Lenovo Thinkpad T540p
|
||||||
|
@ -49,13 +47,7 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./devices/inkvine
|
./devices/inkvine
|
||||||
./modules
|
] ++ modules;
|
||||||
./options.nix
|
|
||||||
./colors.nix
|
|
||||||
niri.nixosModules.niri
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
lix.nixosModules.default
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Framework Laptop 13
|
# Framework Laptop 13
|
||||||
|
@ -69,14 +61,7 @@
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./devices/tunyon
|
./devices/tunyon
|
||||||
./modules
|
] ++ modules;
|
||||||
./options.nix
|
|
||||||
./colors.nix
|
|
||||||
niri.nixosModules.niri
|
|
||||||
home-manager.nixosModules.home-manager
|
|
||||||
lix.nixosModules.default
|
|
||||||
impermanence.nixosModules.impermanence
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue