summaryrefslogtreecommitdiff
path: root/desktop.nix
blob: 7aa65f19e96291a451b1f6623a0bcc80b52850fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{ config, pkgs, ... }:

{
    hardware = {
        pulseaudio = {
            enable = true;
            # Stupid but need it to control sound from acpid
            # systemWide = true;

            # Enable bluetooth audio
            package = pkgs.pulseaudioFull;

            # Disable cork module
            configFile = pkgs.runCommand "default.pa" {} ''
                grep -v module-role-cork ${config.hardware.pulseaudio.package}/etc/pulse/default.pa > $out
            '';
        };

        bluetooth.enable = true;

        opengl.enable = true;
    };

    sound.enable = true;

    services = {
        xserver = {
            enable = true;
            layout = "us";
            xkbVariant = "altgr-intl";
            exportConfiguration = true;	

            windowManager = {
                i3 = {
                    enable = true;
                    package = pkgs.i3-gaps;
                };
            };

            displayManager = {
                defaultSession = "none+i3";
            };

            desktopManager = {
                xterm.enable = false;
            };

            # Touchpad studd
            libinput.enable = true;

            # Start dbus?
            # startDbusSession = true;
        };
        # Auto mounting
        gvfs.enable = true;

        # Evolution
        gnome3 = {
            gnome-keyring.enable = true;
            evolution-data-server.enable = true;
        };

        # Enable CUPS to print documents.
        printing.enable = true;

        postgresql = {
            enable = false;
            initialScript = pkgs.writeText "backend-initScript" ''
                CREATE ROLE julian WITH LOGIN PASSWORD 'hejmeddig' CREATEDB;
                CREATE DATABASE julian;
                GRANT ALL PRIVILEGES ON DATABASE julian TO julian;
            '';
        };

        blueman.enable = true;

        udev.packages = [ pkgs.yubikey-personalization ];
    };

    programs = {
        gnupg.agent = {
            enable = true;
            enableSSHSupport = true;
            pinentryFlavor = "gtk2";
        };

        dconf.enable = true;
    };

    # Define a user account. Don't forget to set a password with ‘passwd’.
    users.users.julian = {
        isNormalUser = true;
        shell = pkgs.zsh;
        extraGroups = [ "wheel" "video" "vboxusers" "cdrom" ];
    };

    virtualisation.virtualbox.host.enable = true;

    fonts.fonts = with pkgs; [
        noto-fonts noto-fonts-emoji liberation_ttf ubuntu_font_family cozette
    ];

    environment.systemPackages = with pkgs; [
        # General stuff
        gopass stow pass gnupg imagemagick acpi gdb sox

        # Nixos stuff
        nox nix-index patchelf

        # Network stuff
        networkmanagerapplet networkmanager-openconnect iw
        wirelesstools

        # Developing
        rustup gcc go clang-tools python38Packages.ipython

        # X stuff
        feh rofi xorg.xmodmap xss-lock xclip xorg.xkill
        acpilight xdotool dunst xcompmgr scrot libnotify i3lock
        xbindkeys

        # Gui applications
        firefox pavucontrol evince leafpad inkscape gimp 
        meld pinentry gnome3.gnome-system-monitor
        termite quasselClient wireshark spotify
        gnome3.file-roller gnome3.gnome-calculator 
        gnome3.simple-scan vlc mpv xorg.xev
        gnome3.evolution evolution-data-server vimHugeX
        (mumble.override { pulseSupport = true; })
        libreoffice-fresh liferea qutebrowser mate.caja
        audacity

        # Other stuff
        texlive.combined.scheme-medium biber
        youtube-dl sshpass python38Packages.pynvim
        aspell aspellDicts.da aspellDicts.en
        ffmpegthumbnailer tio
    ];
}