3 Tails::Persistence::Configuration::Presets - available configuration snippets
7 package Tails
::Persistence
::Configuration
::Presets
;
9 use MooseX
::Method
::Signatures
;
10 use MooseX
::Types
::Moose
qw( :all );
11 use MooseX
::Has
::Sugar
::Saccharin
;
15 with
'Tails::Role::HasEncoding';
18 use warnings FATAL
=> 'all';
20 use Tails
::Persistence
::Configuration
::Atom
;
24 setlocale
(LC_MESSAGES
, "");
25 textdomain
("tails-persistence-setup");
33 lazy_build ro
'ArrayRef[Tails::Persistence::Configuration::Atom]',
34 traits
=> [ 'Array' ],
45 method _build__presets
{
48 name
=> $self->encoding->decode(gettext
(q{Personal Data})),
49 description
=> $self->encoding->decode(gettext
(
50 q{Keep files stored in the `Persistent' directory}
52 destination
=> '/home/amnesia/Persistent',
54 options
=> [ 'source=Persistent' ],
55 icon_name
=> 'stock_folder',
58 name
=> $self->encoding->decode(gettext
(q{GnuPG})),
59 description
=> $self->encoding->decode(gettext
(
60 q{GnuPG keyrings and configuration}
62 destination
=> '/home/amnesia/.gnupg',
63 options
=> [ 'source=gnupg' ],
65 icon_name
=> 'seahorse-key',
68 name
=> $self->encoding->decode(gettext
(q{SSH Client})),
69 description
=> $self->encoding->decode(gettext
(
70 q{SSH keys, configuration and known hosts}
72 destination
=> '/home/amnesia/.ssh',
73 options
=> [ 'source=openssh-client'],
75 icon_name
=> 'seahorse-key-ssh',
78 name
=> $self->encoding->decode(gettext
(q{Pidgin})),
79 description
=> $self->encoding->decode(gettext
(
80 q{Pidgin profiles and OTR keyring}
82 destination
=> '/home/amnesia/.purple',
83 options
=> [ 'source=pidgin' ],
85 icon_name
=> 'pidgin',
88 name
=> $self->encoding->decode(gettext
(q{Thunderbird})),
89 description
=> $self->encoding->decode(gettext
(
90 q{Thunderbird profiles and locally stored email}
92 destination
=> '/home/amnesia/.thunderbird',
93 options
=> [ 'source=thunderbird' ],
95 icon_name
=> 'thunderbird',
98 name
=> $self->encoding->decode(gettext
(q{Network Connections})),
99 description
=> $self->encoding->decode(gettext
(
100 q{Configuration of network devices and connections}
102 destination
=> '/etc/NetworkManager/system-connections',
103 options
=> [ 'source=nm-system-connections' ],
105 icon_name
=> 'network-wired',
108 name
=> $self->encoding->decode(gettext
(q{Browser bookmarks})),
109 description
=> $self->encoding->decode(gettext
(
110 q{Bookmarks saved in the Tor Browser}
112 destination
=> '/home/amnesia/.mozilla/firefox/bookmarks',
113 options
=> [ 'source=bookmarks' ],
115 icon_name
=> 'user-bookmarks',
118 name
=> $self->encoding->decode(gettext
(q{Printers})),
119 description
=> $self->encoding->decode(gettext
(
120 q{Printers configuration}
122 destination
=> '/etc/cups',
123 options
=> [ 'source=cups-configuration' ],
125 icon_name
=> 'printer',
128 name
=> $self->encoding->decode(gettext
(q{Bitcoin client})),
129 description
=> $self->encoding->decode(gettext
(
130 q{Electrum's bitcoin wallet and configuration}
132 destination
=> '/home/amnesia/.electrum',
133 options
=> [ 'source=electrum' ],
135 icon_name
=> 'electrum',
138 name
=> $self->encoding->decode(gettext
(q{APT Packages})),
139 description
=> $self->encoding->decode(gettext
(
140 q{Packages downloaded by APT}
142 destination
=> '/var/cache/apt/archives',
143 options
=> [ 'source=apt/cache' ],
145 icon_name
=> 'package-x-generic',
148 name
=> $self->encoding->decode(gettext
(q{APT Lists})),
149 description
=> $self->encoding->decode(gettext
(
150 q{Lists downloaded by APT}
152 destination
=> '/var/lib/apt/lists',
153 options
=> [ 'source=apt/lists' ],
155 icon_name
=> 'package-x-generic',
158 name
=> $self->encoding->decode(gettext
(q{Dotfiles})),
159 description
=> $self->encoding->decode(gettext
(
160 q{Symlink into $HOME every file or directory found in the `dotfiles' directory}
162 destination => '/home/amnesia',
163 options => [ 'source=dotfiles', 'link' ],
165 icon_name => 'preferences-desktop',
170 map { Tails::Persistence::Configuration::Atom->new(%{$_}) } @presets
179 sub set_state_from_lines {
183 foreach my $atom ($self->all) {
184 $atom->enabled(1) if grep { $atom->equals_line($_) } @lines;