tidied home/
This commit is contained in:
parent
65210c758c
commit
aa9d9dfcaf
4 changed files with 60 additions and 99 deletions
|
|
@ -80,6 +80,11 @@ in {
|
||||||
recursive = true; # think this is important, icr
|
recursive = true; # think this is important, icr
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
nix.gc = {
|
||||||
|
automatic = true;
|
||||||
|
dates = "daily";
|
||||||
|
options = "--delete-older-than 1d";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -158,20 +158,64 @@ in {
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# GTK keyring for password prompts
|
services = {
|
||||||
services.gnome-keyring.enable = true;
|
|
||||||
|
|
||||||
## MOVE TO SYNC.nix
|
# GTK keyring for password prompts
|
||||||
services.kdeconnect = {
|
gnome-keyring.enable = true;
|
||||||
enable = false;
|
|
||||||
indicator = true;
|
# Phone <-> Desktop integration
|
||||||
|
kdeconnect = {
|
||||||
|
enable = false;
|
||||||
|
indicator = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# Syncthing program service
|
||||||
|
#syncthing = {
|
||||||
|
#enable = false;
|
||||||
|
#tray.enable = true;
|
||||||
|
#guiAddress = "home.syncthing:8384";
|
||||||
|
#};
|
||||||
|
|
||||||
|
# Disk automount service
|
||||||
|
udiskie = {
|
||||||
|
enable = true;
|
||||||
|
automount = true; # automatically mount new disk
|
||||||
|
notify = true; # sends notification on disk mount
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
## MOVE TO MORE SENSIBLE SPOT
|
## MOVE TO MORE SENSIBLE SPOT
|
||||||
nix.gc = {
|
#nix.gc = {
|
||||||
automatic = true;
|
#automatic = true;
|
||||||
dates = "daily";
|
#dates = "daily";
|
||||||
options = "--delete-older-than 1d";
|
#options = "--delete-older-than 1d";
|
||||||
};
|
#};
|
||||||
|
|
||||||
|
## ORGANISE THIS MESS
|
||||||
|
# https://mynixos.com/home-manager/options/home.file.%3Cname%3E
|
||||||
|
# https://nix-community.github.io/home-manager/options.xhtml#opt-home.file
|
||||||
|
# https://nix-community.github.io/home-manager/options.xhtml#opt-home.activation
|
||||||
|
# need option for `zfs set mountpoint=/myspecialfolder mypool`
|
||||||
|
# need to set up auto luks unlock with sops-nix
|
||||||
|
|
||||||
|
## Provides LUKS key for Asphodel
|
||||||
|
#environment.etc."crypttab".text = ''
|
||||||
|
#Asphodel /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.asphodelLuksPassword}
|
||||||
|
#'';
|
||||||
|
|
||||||
|
## Mounts Asphodel to typical media location
|
||||||
|
#fileSystems."/run/media/${user}/Asphodel".device =
|
||||||
|
#"/dev/mapper/Asphodel";
|
||||||
|
|
||||||
|
#home.file = { # Files and directories to copy to ${homeDirectory}
|
||||||
|
|
||||||
|
## Example format for home.file
|
||||||
|
#"Foo" = { # Name for the copied file
|
||||||
|
#source = ./Foo; # Source is relative to this file
|
||||||
|
#target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDirectory}
|
||||||
|
#recursive = true; # Unsure if necessary for most things
|
||||||
|
#};
|
||||||
|
|
||||||
|
#};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,58 +0,0 @@
|
||||||
# # https://mynixos.com/home-manager/options/home.file.%3Cname%3E
|
|
||||||
## https://nix-community.github.io/home-manager/options.xhtml#opt-home.file
|
|
||||||
## https://nix-community.github.io/home-manager/options.xhtml#opt-home.activation
|
|
||||||
|
|
||||||
{ inputs, outputs, pkgs, config, flakePath, user, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
imports = [ # inputs.sops-nix.nixosModules.sops
|
|
||||||
#./postActivation.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# need option for `zfs set mountpoint=/myspecialfolder mypool`
|
|
||||||
# need to set up auto luks unlock with sops-nix
|
|
||||||
|
|
||||||
## Provides LUKS key for Asphodel
|
|
||||||
#environment.etc."crypttab".text = ''
|
|
||||||
#Asphodel /dev/disk/by-uuid/45f5f6ad-a676-4bc1-ad4b-e3e26b5697f4 ${config.sops.secrets.asphodelLuksPassword}
|
|
||||||
#'';
|
|
||||||
|
|
||||||
## Mounts Asphodel to typical media location
|
|
||||||
#fileSystems."/run/media/${user}/Asphodel".device =
|
|
||||||
#"/dev/mapper/Asphodel";
|
|
||||||
|
|
||||||
#home.file = { # Files and directories to copy to ${homeDirectory}
|
|
||||||
|
|
||||||
## Example format for home.file
|
|
||||||
#"Foo" = { # Name for the copied file
|
|
||||||
#source = ./Foo; # Source is relative to this file
|
|
||||||
#target = "Desired/Path/To/Foo"; # Target path for Foo within ${homeDirectory}
|
|
||||||
#recursive = true; # Unsure if necessary for most things
|
|
||||||
#};
|
|
||||||
|
|
||||||
#};
|
|
||||||
|
|
||||||
## Related services
|
|
||||||
services = {
|
|
||||||
|
|
||||||
## Udiskie/automount program
|
|
||||||
udiskie = {
|
|
||||||
enable = true;
|
|
||||||
automount = true; # automounts newly registered disks
|
|
||||||
notify = true; # sends a notification on disk mount
|
|
||||||
#tray = "auto"; # enables the tray applet only when a device is available
|
|
||||||
#settings = {
|
|
||||||
#};
|
|
||||||
};
|
|
||||||
|
|
||||||
## Syncthing program service
|
|
||||||
#syncthing = {
|
|
||||||
#enable = false;
|
|
||||||
#tray.enable = true;
|
|
||||||
#guiAddress = "home.syncthing:8384";
|
|
||||||
#};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
||||||
{ inputs, outputs, lib, config, pkgs, user, homeDirectory, flakePath, disksPath
|
|
||||||
, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
|
|
||||||
## Work in progress - to fix/configure:
|
|
||||||
## - automatically copy flake repo to desired path
|
|
||||||
## - automatically copy sync directories to to desired paths
|
|
||||||
## - expand script with a try/catch block to provide output for failed links
|
|
||||||
## - expand script to only run if desired directories are NOT already linked
|
|
||||||
|
|
||||||
## To utilise this script place the following option into some system-level module
|
|
||||||
#imports = [ ./path/to/postActivation.nix ];
|
|
||||||
|
|
||||||
## Runs after using `sudo nixos-rebuild switch --flake .#<hostname>`
|
|
||||||
system.activationScripts.disksLink = {
|
|
||||||
supportsDryActivation = false;
|
|
||||||
## Prints status of run commmand with a cute message if successful
|
|
||||||
text = ''
|
|
||||||
cd ~ && ln -s Disks /run/media/${user}/*
|
|
||||||
echo "Current variables required are:"
|
|
||||||
echo "primaryUser - ${user}"
|
|
||||||
echo "homeDir - ${homeDirectory}"
|
|
||||||
echo "current paths linked are:"
|
|
||||||
echo "flakePath - ${flakePath}"
|
|
||||||
echo "<3"
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue