Remove the GNOME Keyring persistent feature (Closes: #15275).
[tails-persistence-setup.git] / lib / Tails / Persistence / Configuration / Presets.pm
blobb37c2e95d79ee24fe8962058f34a84d59310a8d5
1 =head1 NAME
3 Tails::Persistence::Configuration::Presets - available configuration snippets
5 =cut
7 package Tails::Persistence::Configuration::Presets;
8 use Moose;
9 use MooseX::Method::Signatures;
10 use MooseX::Types::Moose qw( :all );
11 use MooseX::Has::Sugar::Saccharin;
15 with 'Tails::Role::HasEncoding';
17 use autodie qw(:all);
18 use warnings FATAL => 'all';
19 use Carp;
20 use Tails::Persistence::Configuration::Atom;
22 use Locale::gettext;
23 use POSIX;
24 setlocale(LC_MESSAGES, "");
25 textdomain("tails-persistence-setup");
28 =head1 ATTRIBUTES
30 =cut
32 has '_presets' =>
33 lazy_build ro 'ArrayRef[Tails::Persistence::Configuration::Atom]',
34 traits => [ 'Array' ],
35 handles => {
36 count => 'count',
37 all => 'elements',
41 =head1 CONSTRUCTORS
43 =cut
45 method _build__presets {
46 my @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}
51 )),
52 destination => '/home/amnesia/Persistent',
53 enabled => 1,
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}
61 )),
62 destination => '/home/amnesia/.gnupg',
63 options => [ 'source=gnupg' ],
64 enabled => 0,
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}
71 )),
72 destination => '/home/amnesia/.ssh',
73 options => [ 'source=openssh-client'],
74 enabled => 0,
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}
81 )),
82 destination => '/home/amnesia/.purple',
83 options => [ 'source=pidgin' ],
84 enabled => 0,
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}
91 )),
92 destination => '/home/amnesia/.thunderbird',
93 options => [ 'source=thunderbird' ],
94 enabled => 0,
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' ],
104 enabled => 0,
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' ],
114 enabled => 0,
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' ],
124 enabled => 0,
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' ],
134 enabled => 0,
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' ],
144 enabled => 0,
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' ],
154 enabled => 0,
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' ],
164 enabled => 0,
165 icon_name => 'preferences-desktop',
169 return [
170 map { Tails::Persistence::Configuration::Atom->new(%{$_}) } @presets
175 =head1 METHODS
177 =cut
179 sub set_state_from_lines {
180 my $self = shift;
181 my @lines = @_;
183 foreach my $atom ($self->all) {
184 $atom->enabled(1) if grep { $atom->equals_line($_) } @lines;
188 no Moose;