Commit cce0fc19e9fe
Changed files (24)
location
machine
profiles
service
hardware/dell-latitude-e6540.nix
@@ -1,17 +1,17 @@
{ config, pkgs, ... }:
{
- boot = {
- kernelParams = [
- # Kernel GPU Savings Options (NOTE i915 chipset only)
- "i915.enable_rc6=0" "i915.enable_fbc=1"
- "i915.lvds_use_ssc=0"
- "drm.debug=0" "drm.vblankoffdelay=1"
- ];
- blacklistedKernelModules = [
- # Kernel GPU Savings Options (NOTE i915 chipset only)
- "sierra_net" "cdc_mbim" "cdc_ncm"
- ];
- };
- services.acpid.enable = true;
+ boot = {
+ kernelParams = [
+ # Kernel GPU Savings Options (NOTE i915 chipset only)
+ "i915.enable_rc6=0" "i915.enable_fbc=1"
+ "i915.lvds_use_ssc=0"
+ "drm.debug=0" "drm.vblankoffdelay=1"
+ ];
+ blacklistedKernelModules = [
+ # Kernel GPU Savings Options (NOTE i915 chipset only)
+ "sierra_net" "cdc_mbim" "cdc_ncm"
+ ];
+ };
+ services.acpid.enable = true;
}
hardware/thinkpad-t460s.nix
@@ -1,21 +1,21 @@
{ config, pkgs, ... }:
{
- imports =
- [
- ./thinkpad.nix
- ];
- services = {
- acpid = {
- lidEventCommands = ''
+ imports =
+ [
+ ./thinkpad.nix
+ ];
+ ervices = {
+ acpid = {
+ lidEventCommands = ''
if grep -q closed /proc/acpi/button/lid/LID/state; then
- date >> /tmp/i3lock.log
- DISPLAY=":0.0" XAUTHORITY=/home/fadenb/.Xauthority ${pkgs.i3lock}/bin/i3lock &>> /tmp/i3lock.log
+ date >> /tmp/i3lock.log
+ DISPLAY=":0.0" XAUTHORITY=/home/fadenb/.Xauthority ${pkgs.i3lock}/bin/i3lock &>> /tmp/i3lock.log
fi
'';
- };
- tlp = {
- extraConfig = ''
+ };
+ tlp = {
+ extraConfig = ''
# CPU optimizations
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
@@ -39,15 +39,10 @@ DEVICES_TO_DISABLE_ON_DOCK="wifi"
DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
# Make sure it uses the right hard drive
DISK_DEVICES="nvme0n1p3"
- '';
- };
- };
- services.xserver = {
- dpi = 128;
- };
- #environment = {
- # variables.QT_DEVICE_PIXEL_RATIO = "2";
- # variables.GDK_SCALE = "2";
- # variables.GDK_DPI_SCALE = "0.75";
- #};
+'';
+ };
+ };
+ services.xserver = {
+ dpi = 128;
+ };
}
hardware/thinkpad-x220.nix
@@ -1,21 +1,20 @@
{ config, pkgs, ... }:
{
- imports =
- [
- ./thinkpad.nix
- ];
- services = {
- acpid = {
- lidEventCommands = ''
+ imports = [
+ ./thinkpad.nix
+ ];
+ services = {
+ acpid = {
+ lidEventCommands = ''
if grep -q closed /proc/acpi/button/lid/LID/state; then
- date >> /tmp/i3lock.log
- DISPLAY=":0.0" XAUTHORITY=/home/fadenb/.Xauthority ${pkgs.i3lock}/bin/i3lock &>> /tmp/i3lock.log
+ date >> /tmp/i3lock.log
+ DISPLAY=":0.0" XAUTHORITY=/home/fadenb/.Xauthority ${pkgs.i3lock}/bin/i3lock &>> /tmp/i3lock.log
fi
'';
- };
- tlp = {
- extraConfig = ''
+ };
+ tlp = {
+ extraConfig = ''
# CPU optimizations
CPU_SCALING_GOVERNOR_ON_AC=performance
CPU_SCALING_GOVERNOR_ON_BAT=powersave
@@ -33,8 +32,8 @@ DEVICES_TO_DISABLE_ON_WIFI_CONNECT=""
DEVICES_TO_DISABLE_ON_WWAN_CONNECT=""
DEVICES_TO_ENABLE_ON_LAN_DISCONNECT=""
DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
-DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
- '';
- };
- };
+DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
+'';
+ };
+ };
}
hardware/thinkpad.nix
@@ -57,7 +57,7 @@ Option "Ignore" "true"
wantedBy = [ "multi-user.target" ];
unitConfig.RequiresMountsFor = "/sys";
script = ''
- echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
+ echo '1500' > '/proc/sys/vm/dirty_writeback_centisecs'
'';
};
}
location/docker.nix
@@ -1,14 +1,14 @@
{ config, pkgs, ... }:
{
- imports =[
- <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
- ];
-
- hardware.sane = {
- brscan4.enable = true;
- brscan4.netDevices = {
- docker = { model = "MFC-9330CDW"; ip = "10.0.0.28"; };
- };
- };
+ imports =[
+ <nixpkgs/nixos/modules/services/hardware/sane_extra_backends/brscan4.nix>
+ ];
+
+ hardware.sane = {
+ brscan4.enable = true;
+ brscan4.netDevices = {
+ docker = { model = "MFC-9330CDW"; ip = "10.0.0.28"; };
+ };
+ };
}
machine/carthage.nix
@@ -1,42 +1,42 @@
{ config, pkgs, ... }: {
- imports = [
- ../hardware-configuration.nix
- ../cloud/digitalocean/networking.nix # generated at runtime by nixos-infect
- ../profiles/server.nix
- ../profiles/gitconfig.nix
- ];
+ imports = [
+ ../hardware-configuration.nix
+ ../cloud/digitalocean/networking.nix # generated at runtime by nixos-infect
+ ../profiles/server.nix
+ ../profiles/gitconfig.nix
+ ];
- environment = {
- systemPackages = with pkgs; [
- haskellPackages.git-annex
- ];
- };
+ environment = {
+ systemPackages = with pkgs; [
+ haskellPackages.git-annex
+ ];
+ };
- boot.cleanTmpDir = true;
- networking.firewall.allowPing = true;
- services.openssh.enable = true;
- users.users.root.openssh.authorizedKeys.keys = [
- "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCqaMAW+tsun4gRn/XZZ3evoEDlYOPKx+7h1O/PBzwbiJzrR+5XpP32p1n1krsbF1jHyxTK+3GO9BXfFq2ag/RoO6u6jbXJwzJX8+ZYlcRfhkPu/ixDkF0ADMTrtzw+OYiYU9uYnqY5bj2En2uOfZCIOtsvE4yHCgeXTR9Xo+owB5ci3d5lfF1URTg3dJNzQykBnM06Fu8fYth/5DBInEau4h5N8XrkWUU0K/zYdWl0ws6dAHZYo+JZoqmF+o/ptb00e9cegZHEtLfa/IXC/GwD4gcLrnIpETr+HQBHHJH5PXPuEnO73rDaRBVWHWAErkj1/3OoH/m71pyvc4rLPZs0N4B9vdCpblGj/IWivLLnQaZQFTNRPWe45WaqVpIR1VS5UpHElr0cjqroaqXI0RcBVQ8v6fMytITP1B9u2s0G07ScLMJLlWwA5GhySWULskzcYNqCLmbSnmEzsfFRzawDCHn0BWiwRdnMVo1HwbUwvAw7z2my5b83fauf45jrwuAElCSUBvibEeHHHmY84FeiJhAUIpeu9yXNpGnc1kSOibJQjZwlRH54bzMuiq5UvaaV+kH0gfNEQOvxHJBdf4r9gxb+JG4/VnurdgTLulBiGXDuDBvhOvCb3bPRpswZbm67EPgG5HMJtjeEdaLG/yV0mhZ7Jl6rk8dvh6IrXKkKew== vincent@honshu.local"
- ];
- time.timeZone = "Europe/Paris";
+ boot.cleanTmpDir = true;
+ networking.firewall.allowPing = true;
+ services.openssh.enable = true;
+ users.users.root.openssh.authorizedKeys.keys = [
+ "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCqaMAW+tsun4gRn/XZZ3evoEDlYOPKx+7h1O/PBzwbiJzrR+5XpP32p1n1krsbF1jHyxTK+3GO9BXfFq2ag/RoO6u6jbXJwzJX8+ZYlcRfhkPu/ixDkF0ADMTrtzw+OYiYU9uYnqY5bj2En2uOfZCIOtsvE4yHCgeXTR9Xo+owB5ci3d5lfF1URTg3dJNzQykBnM06Fu8fYth/5DBInEau4h5N8XrkWUU0K/zYdWl0ws6dAHZYo+JZoqmF+o/ptb00e9cegZHEtLfa/IXC/GwD4gcLrnIpETr+HQBHHJH5PXPuEnO73rDaRBVWHWAErkj1/3OoH/m71pyvc4rLPZs0N4B9vdCpblGj/IWivLLnQaZQFTNRPWe45WaqVpIR1VS5UpHElr0cjqroaqXI0RcBVQ8v6fMytITP1B9u2s0G07ScLMJLlWwA5GhySWULskzcYNqCLmbSnmEzsfFRzawDCHn0BWiwRdnMVo1HwbUwvAw7z2my5b83fauf45jrwuAElCSUBvibEeHHHmY84FeiJhAUIpeu9yXNpGnc1kSOibJQjZwlRH54bzMuiq5UvaaV+kH0gfNEQOvxHJBdf4r9gxb+JG4/VnurdgTLulBiGXDuDBvhOvCb3bPRpswZbm67EPgG5HMJtjeEdaLG/yV0mhZ7Jl6rk8dvh6IrXKkKew== vincent@honshu.local"
+ ];
+ time.timeZone = "Europe/Paris";
- # ape โ sync git mirrors
- systemd.user.services.ape = {
- description = "Ape - sync git mirrors";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- Type = "oneshot";
- ExecStart = "${pkgs.ape}/bin/ape up /home/vincent/mirrors/";
- Environment = "PATH=/run/current-system/sw/bin/";
- };
- };
- systemd.user.timers.ape = {
- description = "Ape hourly";
- wantedBy = [ "timers.target" ];
- timerConfig = {
- OnCalendar = "hourly";
- Persistent = "true";
- };
- };
- systemd.user.timers.ape.enable = true;
+ # ape โ sync git mirrors
+ systemd.user.services.ape = {
+ description = "Ape - sync git mirrors";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "${pkgs.ape}/bin/ape up /home/vincent/mirrors/";
+ Environment = "PATH=/run/current-system/sw/bin/";
+ };
+ };
+ systemd.user.timers.ape = {
+ description = "Ape hourly";
+ wantedBy = [ "timers.target" ];
+ timerConfig = {
+ OnCalendar = "hourly";
+ Persistent = "true";
+ };
+ };
+ systemd.user.timers.ape.enable = true;
}
machine/honshu.nix
@@ -3,16 +3,16 @@
{
imports =
[ # Include the results of the hardware scan.
- ../hardware-configuration.nix
- ../hardware/dell-latitude-e6540.nix
- ../profiles/server.nix
- ../profiles/gitconfig.nix
- ../profiles/fish.nix
- ../profiles/avahi.nix
- ../profiles/syncthing.nix
- ../service/ssh-tunnel.nix
- ../location/home.nix
- ];
+ ../hardware-configuration.nix
+ ../hardware/dell-latitude-e6540.nix
+ ../profiles/server.nix
+ ../profiles/gitconfig.nix
+ ../profiles/fish.nix
+ ../profiles/avahi.nix
+ ../profiles/syncthing.nix
+ ../service/ssh-tunnel.nix
+ ../location/home.nix
+ ];
time.timeZone = "Europe/Paris";
@@ -24,7 +24,7 @@
};
services = {
- logind.extraConfig = "HandleLidSwitch=ignore";
+ logind.extraConfig = "HandleLidSwitch=ignore";
ssh-tunnel = {
enable = true;
localUser = "vincent";
machine/shikoku.nix
@@ -1,39 +1,37 @@
{ config, pkgs, ... }:
{
- imports =
- [ # Include the results of the hardware scan.
- ../hardware-configuration.nix
- ../profiles/ssh.nix
- ../profiles/desktop.nix
- ../profiles/audio.nix
- ../profiles/dev.nix
- ../profiles/virtualization.nix
- #../profiles/dockerization.nix
- ../profiles/containerd.nix
- ../profiles/office.nix
- ../profiles/gaming.nix
- ../location/home.nix
- ../service/ssh-tunnel.nix
- ];
+ imports = [ # Include the results of the hardware scan.
+ ../hardware-configuration.nix
+ ../profiles/ssh.nix
+ ../profiles/desktop.nix
+ ../profiles/audio.nix
+ ../profiles/dev.nix
+ ../profiles/virtualization.nix
+ #../profiles/dockerization.nix
+ ../profiles/containerd.nix
+ ../profiles/gaming.nix
+ ../location/home.nix
+ ../service/ssh-tunnel.nix
+ ];
- time.timeZone = "Europe/Paris";
- boot.loader.systemd-boot.enable = true;
+ time.timeZone = "Europe/Paris";
+ boot.loader.systemd-boot.enable = true;
- services = {
- xserver = {
- videoDrivers = [ "nvidia" ];
- displayManager = {
- sessionCommands = ''
-xrandr --output DP-2 --auto --left-of DP-4 --output DP-4 --auto &
-'';
- slim.theme = pkgs.fetchurl {
- url = "https://github.com/vdemeester/slim-themes/raw/master/docker-nuage-theme-0.1.tar.xz";
- sha256 = "1ds7p3d8dn21bankgs68i53hqrj4d2abpk437h6dbjz36q1ys839";
- };
- };
- };
- };
+ services = {
+ xserver = {
+ videoDrivers = [ "nvidia" ];
+ displayManager = {
+ sessionCommands = ''
+ xrandr --output DP-2 --auto --left-of DP-4 --output DP-4 --auto &
+ '';
+ slim.theme = pkgs.fetchurl {
+ url = "https://github.com/vdemeester/slim-themes/raw/master/docker-nuage-theme-0.1.tar.xz";
+ sha256 = "1ds7p3d8dn21bankgs68i53hqrj4d2abpk437h6dbjz36q1ys839";
+ };
+ };
+ };
+ };
- hardware.bluetooth.enable = true;
+ hardware.bluetooth.enable = true;
}
machine/vm.nix
@@ -1,25 +1,25 @@
{ config, pkgs, ... }:
{
- imports =
- [ # Include the results of the hardware scan.
- ../hardware-configuration.nix
- ../profiles/desktop.nix
- ../profiles/ssh.nix
- ../profiles/dockerization.nix
- ];
+ imports =
+ [ # Include the results of the hardware scan.
+ ../hardware-configuration.nix
+ ../profiles/desktop.nix
+ ../profiles/ssh.nix
+ ../profiles/dockerization.nix
+ ];
- boot = {
- loader = {
- grub = {
- enable = true;
- device = "/dev/sda";
- };
- };
- initrd = {
- checkJournalingFS = false;
- };
- };
+ boot = {
+ loader = {
+ grub = {
+ enable = true;
+ device = "/dev/sda";
+ };
+ };
+ initrd = {
+ checkJournalingFS = false;
+ };
+ };
- virtualisation.virtualbox.guest.enable = true;
+ virtualisation.virtualbox.guest.enable = true;
}
profiles/audio.nix
@@ -20,7 +20,7 @@
};
};
sound.mediaKeys.enable = true;
-
+
# spotify & pulseaudio
networking.firewall = {
allowedTCPPorts = [ 57621 57622 4713 ];
profiles/desktop.nix
@@ -1,53 +1,53 @@
- # Common configuration for any desktop (not that laptop are a superset of desktop)
+{ configs, pkgs, ...}:
- { configs, pkgs, ...}:
+{
+ imports = [
+ ./default.nix
+ ./printing.nix
+ ./scanning.nix
+ ./avahi.nix
+ ./syncthing.nix
+ ./fish.nix
+ ];
- {
- imports = [
- ./default.nix
- ./printing.nix
- ./scanning.nix
- ./avahi.nix
- ./syncthing.nix
- ./fish.nix
- ];
+ programs = {
+ fish.enable = true;
+ };
- programs = {
- fish.enable = true;
- };
+ boot.loader.efi.canTouchEfiVariables = true;
+ boot.tmpOnTmpfs = true;
- boot.loader.efi.canTouchEfiVariables = true;
- boot.tmpOnTmpfs = true;
-
- environment.systemPackages = with pkgs; [
- cryptsetup
- nix-repl
- emacs
- xlibs.xmodmap
- xorg.xbacklight
- xorg.xdpyinfo
- xorg.xhost
- xorg.xinit
- xss-lock
- xorg.xmessage
- unzip
- gnupg
- pinentry
- ];
- hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
- networking.networkmanager.enable = true;
- networking.networkmanager.unmanaged = [ "interface-name:ve-*" "interface-name:veth*" ];
- services = {
- xserver = {
- enable = true;
- enableTCP = false;
- windowManager.twm.enable = true;
- libinput.enable = true;
- synaptics.enable = false;
- layout = "fr(bepo),fr";
- xkbVariant = "oss";
- xkbOptions = "grp:menu_toggle,grp_led:caps,compose:caps";
- inputClassSections = [
+ environment.systemPackages = with pkgs; [
+ cryptsetup
+ nix-repl
+ emacs
+ xlibs.xmodmap
+ xorg.xbacklight
+ xorg.xdpyinfo
+ xorg.xhost
+ xorg.xinit
+ xss-lock
+ xorg.xmessage
+ unzip
+ gnupg
+ pinentry
+ ];
+ hardware.opengl.extraPackages = [ pkgs.vaapiIntel ];
+ networking.networkmanager.enable = true;
+ networking.networkmanager.unmanaged = [
+ "interface-name:ve-*" "interface-name:veth*"
+ ];
+ services = {
+ xserver = {
+ enable = true;
+ enableTCP = false;
+ windowManager.twm.enable = true;
+ libinput.enable = true;
+ synaptics.enable = false;
+ layout = "fr(bepo),fr";
+ xkbVariant = "oss";
+ xkbOptions = "grp:menu_toggle,grp_led:caps,compose:caps";
+ inputClassSections = [
''
Identifier "TypeMatrix"
MatchIsKeyboard "on"
@@ -58,107 +58,100 @@
Option "XkbLayout" "fr"
Option "XkbVariant" "bepo"
''
- ''
- Identifier "ErgoDox"
- MatchIsKeyboard "on"
- #MatchVendor "ErgoDox_EZ"
- #MatchProduct "ErgoDox_EZ"
- MatchUSBID "feed:1307"
- Driver "evdev"
- Option "XkbLayout" "fr"
- Option "XkbVariant" "bepo"
- ''
- # ''
- #Identifier "evdev touchpad off"
- #MatchIsTouchpad "on"
- #MatchDevicePath "/dev/input/event*"
- #Driver "evdev"
- #Option "Ignore" "true"
- # ''
- ];
- displayManager = {
- slim = {
- enable = true;
- # Probably put this into users instead ?
- defaultUser = "vincent";
- };
+ ''
+ Identifier "ErgoDox"
+ MatchIsKeyboard "on"
+ #MatchVendor "ErgoDox_EZ"
+ #MatchProduct "ErgoDox_EZ"
+ MatchUSBID "feed:1307"
+ Driver "evdev"
+ Option "XkbLayout" "fr"
+ Option "XkbVariant" "bepo"
+ ''
+ ];
+ displayManager = {
+ slim = {
+ enable = true;
+ # Probably put this into users instead ?
+ defaultUser = "vincent";
};
};
};
- fonts = {
- enableFontDir = true;
- enableGhostscriptFonts = true;
- fonts = with pkgs; [
- corefonts
- inconsolata
- dejavu_fonts
- ubuntu_font_family
- unifont
- emojione
- symbola
- feh
- fira
- fira-code
- fira-code-symbols
- fira-mono
- font-droid
- iosevka
- hasklig
- source-code-pro
- font-droid
- ];
+ };
+ fonts = {
+ enableFontDir = true;
+ enableGhostscriptFonts = true;
+ fonts = with pkgs; [
+ corefonts
+ inconsolata
+ dejavu_fonts
+ ubuntu_font_family
+ unifont
+ emojione
+ symbola
+ feh
+ fira
+ fira-code
+ fira-code-symbols
+ fira-mono
+ font-droid
+ iosevka
+ hasklig
+ source-code-pro
+ font-droid
+ ];
+ };
+
+ # Polkit.
+ security.polkit.extraConfig = ''
+ polkit.addRule(function(action, subject) {
+ if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
+ action.id == "org.freedesktop.udisks2.encrypted-unlock-system"
+ ) &&
+ subject.local && subject.active && subject.isInGroup("users")) {
+ return polkit.Result.YES;
+ }
+ var YES = polkit.Result.YES;
+ var permission = {
+ // required for udisks1:
+ "org.freedesktop.udisks.filesystem-mount": YES,
+ "org.freedesktop.udisks.luks-unlock": YES,
+ "org.freedesktop.udisks.drive-eject": YES,
+ "org.freedesktop.udisks.drive-detach": YES,
+ // required for udisks2:
+ "org.freedesktop.udisks2.filesystem-mount": YES,
+ "org.freedesktop.udisks2.encrypted-unlock": YES,
+ "org.freedesktop.udisks2.eject-media": YES,
+ "org.freedesktop.udisks2.power-off-drive": YES,
+ // required for udisks2 if using udiskie from another seat (e.g. systemd):
+ "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
+ "org.freedesktop.udisks2.filesystem-unmount-others": YES,
+ "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
+ "org.freedesktop.udisks2.eject-media-other-seat": YES,
+ "org.freedesktop.udisks2.power-off-drive-other-seat": YES
};
-
- # Polkit.
- security.polkit.extraConfig = ''
- polkit.addRule(function(action, subject) {
- if ((action.id == "org.freedesktop.udisks2.filesystem-mount-system" ||
- action.id == "org.freedesktop.udisks2.encrypted-unlock-system"
- ) &&
- subject.local && subject.active && subject.isInGroup("users")) {
- return polkit.Result.YES;
- }
- var YES = polkit.Result.YES;
- var permission = {
- // required for udisks1:
- "org.freedesktop.udisks.filesystem-mount": YES,
- "org.freedesktop.udisks.luks-unlock": YES,
- "org.freedesktop.udisks.drive-eject": YES,
- "org.freedesktop.udisks.drive-detach": YES,
- // required for udisks2:
- "org.freedesktop.udisks2.filesystem-mount": YES,
- "org.freedesktop.udisks2.encrypted-unlock": YES,
- "org.freedesktop.udisks2.eject-media": YES,
- "org.freedesktop.udisks2.power-off-drive": YES,
- // required for udisks2 if using udiskie from another seat (e.g. systemd):
- "org.freedesktop.udisks2.filesystem-mount-other-seat": YES,
- "org.freedesktop.udisks2.filesystem-unmount-others": YES,
- "org.freedesktop.udisks2.encrypted-unlock-other-seat": YES,
- "org.freedesktop.udisks2.eject-media-other-seat": YES,
- "org.freedesktop.udisks2.power-off-drive-other-seat": YES
- };
- if (subject.isInGroup("wheel")) {
- return permission[action.id];
- }
- });
- '';
- # Auto refresh nix-channel each day
- systemd.user.services.channel-update = {
- description = "Update nix-channel daily";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- Type = "oneshot";
- ExecStart = "/run/current-system/sw/bin/nix-channel --update";
- Environment = "PATH=/run/current-system/sw/bin";
- };
+ if (subject.isInGroup("wheel")) {
+ return permission[action.id];
+ }
+ });
+ '';
+ # Auto refresh nix-channel each day
+ systemd.user.services.channel-update = {
+ description = "Update nix-channel daily";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ Type = "oneshot";
+ ExecStart = "/run/current-system/sw/bin/nix-channel --update";
+ Environment = "PATH=/run/current-system/sw/bin";
};
- systemd.user.timers.channel-update = {
- description = "Update nix-channel daily";
- wantedBy = [ "timers.target" ];
- timerConfig = {
- OnCalendar = "daily";
- Persistent = "true";
- };
+ };
+ systemd.user.timers.channel-update = {
+ description = "Update nix-channel daily";
+ wantedBy = [ "timers.target" ];
+ timerConfig = {
+ OnCalendar = "daily";
+ Persistent = "true";
};
- systemd.user.timers.channel-update.enable = true;
- }
+ };
+ systemd.user.timers.channel-update.enable = true;
+}
profiles/gaming.nix
@@ -1,15 +1,15 @@
{ config, pkgs, ... }:
{
- environment = {
- systemPackages = with pkgs; [
- steam
- discord
- ];
- };
- hardware = {
- opengl = {
- driSupport32Bit = true;
- };
- };
+ environment = {
+ systemPackages = with pkgs; [
+ steam
+ discord
+ ];
+ };
+ hardware = {
+ opengl = {
+ driSupport32Bit = true;
+ };
+ };
}
profiles/gitconfig.nix
@@ -5,7 +5,7 @@
git
gitAndTools.git-extras
];
- environment.etc."gitconfig" = rec { text = ''
+ environment.etc."gitconfig" = rec { text = ''
[alias]
co = checkout
st = status
@@ -52,5 +52,6 @@
[url "git@github.com:"]
pushInsteadOf = git://github.com/
- ''; };
+ '';
+ };
}
profiles/laptop.nix
@@ -1,16 +1,14 @@
-# Common configuration for any laptops
-
{ configs, pkgs, ...}:
{
- imports = [
- ./audio.nix
- ./desktop.nix
- ];
+ imports = [
+ ./audio.nix
+ ./desktop.nix
+ ];
- environment.systemPackages = with pkgs; [
- lm_sensors
- powertop
+ environment.systemPackages = with pkgs; [
+ lm_sensors
+ powertop
acpi
- ];
+ ];
}
profiles/office.nix
@@ -1,9 +1,9 @@
{ configs, pkgs, ...}:
{
- environment.systemPackages = with pkgs; [
- calibre
- libreoffice
- gimp
- ];
+ environment.systemPackages = with pkgs; [
+ calibre
+ libreoffice
+ gimp
+ ];
}
profiles/printing.nix
@@ -1,10 +1,10 @@
{ configs, pkgs, ...}:
{
- services = {
- printing = {
- enable = true;
- drivers = [ pkgs.gutenprint ];
- };
- };
+ services = {
+ printing = {
+ enable = true;
+ drivers = [ pkgs.gutenprint ];
+ };
+ };
}
profiles/scanning.nix
@@ -1,11 +1,11 @@
{ config, pkgs, ... }:
{
- environment.systemPackages = with pkgs; [
- saneFrontends
- simple-scan
- ];
- hardware.sane = {
- enable = true;
- };
+ environment.systemPackages = with pkgs; [
+ saneFrontends
+ simple-scan
+ ];
+ hardware.sane = {
+ enable = true;
+ };
}
profiles/server.nix
@@ -1,11 +1,9 @@
-# Common configuration for any server
-
{ configs, pkgs, ...}:
{
- imports = [
+ imports = [
./default.nix
- ./ssh.nix
- ];
- boot.loader.efi.canTouchEfiVariables = true;
+ ./ssh.nix
+ ];
+ boot.loader.efi.canTouchEfiVariables = true;
}
profiles/ssh.nix
@@ -1,5 +1,5 @@
{ config, pkgs, ... }:
{
- services.openssh.enable = true;
+ services.openssh.enable = true;
}
profiles/syncthing.nix
@@ -1,10 +1,10 @@
{ config, pkgs, ... }:
{
- services.syncthing = {
- enable = true;
- user = "vincent";
- dataDir = "/home/vincent/.syncthing";
- openDefaultPorts = true;
- };
+ services.syncthing = {
+ enable = true;
+ user = "vincent";
+ dataDir = "/home/vincent/.syncthing";
+ openDefaultPorts = true;
+ };
}
profiles/synergy-server.nix
@@ -1,20 +1,20 @@
{ config, pkgs, ... }:
{
- imports = [
- ./synergy.nix
- ];
- systemd.user.services.synergy = {
- description = "Synergy sharing server";
- wantedBy = [ "multi-user.target" ];
- serviceConfig = {
- RestartSec = 10;
- Restart = "on-failure";
- ExecStart = "${pkgs.synergy}/bin/synergys -c /etc/synergy-server.conf -f -a 0.0.0.0";
- Environment = "PATH=/run/current-system/sw/bin/";
- };
- };
- systemd.user.services.synergy.enable = true;
-
- networking.firewall.allowedTCPPorts = [ 24800 ];
+ imports = [
+ ./synergy.nix
+ ];
+ systemd.user.services.synergy = {
+ description = "Synergy sharing server";
+ wantedBy = [ "multi-user.target" ];
+ serviceConfig = {
+ RestartSec = 10;
+ Restart = "on-failure";
+ ExecStart = "${pkgs.synergy}/bin/synergys -c /etc/synergy-server.conf -f -a 0.0.0.0";
+ Environment = "PATH=/run/current-system/sw/bin/";
+ };
+ };
+ systemd.user.services.synergy.enable = true;
+
+ networking.firewall.allowedTCPPorts = [ 24800 ];
}
profiles/synergy.nix
@@ -1,9 +1,9 @@
{ config, pkgs, ... }:
{
- environment = {
- systemPackages = with pkgs; [
- synergy
- ];
- };
+ environment = {
+ systemPackages = with pkgs; [
+ synergy
+ ];
+ };
}
profiles/virtualization.vbox.nix
@@ -1,14 +1,14 @@
-# Virtualization configuration
{ config, pkgs, ... }:
{
- virtualisation = {
- virtualbox.host.enable = true;
- nixpkgs.config.virtualbox.enableExtensionPack = true;
- networking.firewall.trustedInterfaces = [ "vboxnet0" ];
- environment = {
- systemPackages = with pkgs; [
- vagrant
- ];
- };
+ virtualisation = {
+ virtualbox.host.enable = true;
+ nixpkgs.config.virtualbox.enableExtensionPack = true;
+ networking.firewall.trustedInterfaces = [ "vboxnet0" ];
+ environment = {
+ systemPackages = with pkgs; [
+ vagrant
+ ];
+ };
+ }
}
service/containerd.nix
@@ -90,6 +90,5 @@ in
SocketGroup = "root";
};
};
-
};
}