This commit is contained in:
teutat3s 2022-01-19 01:13:15 +01:00
parent 952e8389c5
commit 082e33c1ed
Signed by untrusted user: teutat3s
GPG key ID: 4FA1D3FA524F22C1
38 changed files with 414 additions and 338 deletions

12
.envrc
View file

@ -1,2 +1,10 @@
watch_file shell/* flake.nix # reload when these files change
use flake || use nix watch_file flake.nix
watch_file shell.nix
{
# shell gc root dir
mkdir -p "$(direnv_layout_dir)"
eval "$(nix print-dev-env --profile $(direnv_layout_dir)/flake-profile)"
} || use nix

View file

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1637793790, "lastModified": 1640802000,
"narHash": "sha256-oPXavjxETEWGXq8g7kQHyRLKUmLX2yPtGn+t3V0mrTY=", "narHash": "sha256-ZiI94Zv/IgW64fqKrtVaQqfUCkn9STvAjgfFmvtqcQ8=",
"owner": "ryantm", "owner": "ryantm",
"repo": "agenix", "repo": "agenix",
"rev": "f85eea0e29fa9a8924571d0e398215e175f80d55", "rev": "c5558c88b2941bf94886dfdede6926b1ba5f5629",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -23,10 +23,7 @@
"beautysh": { "beautysh": {
"inputs": { "inputs": {
"flake-utils": "flake-utils", "flake-utils": "flake-utils",
"nixpkgs": [ "nixpkgs": "nixpkgs",
"bud",
"nixpkgs"
],
"poetry2nix": "poetry2nix" "poetry2nix": "poetry2nix"
}, },
"locked": { "locked": {
@ -90,11 +87,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1634994402, "lastModified": 1640117230,
"narHash": "sha256-xmlCVVOYGpZoxgOqsDOVF0B0ASrnbNGVAEzID9qh2xo=", "narHash": "sha256-W7LXeJavyIzNfNaoEsK65sEaCGqE9MVWvK0xSzNR4ls=",
"owner": "LnL7", "owner": "LnL7",
"repo": "nix-darwin", "repo": "nix-darwin",
"rev": "44da835ac40dab5fd231298b59d83487382d2fab", "rev": "5851d9613edf8b2279746c7e5b9faac55ff17e8a",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -113,11 +110,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1637357482, "lastModified": 1639771334,
"narHash": "sha256-mMRxOlcQs3V9cZYsKGKWEjl+oqclhaH1SKT3QGeTQ0Q=", "narHash": "sha256-4hgZmsCPaL5QlcEijHmzaYYrEwHtUFqraCUrCqLGJOo=",
"owner": "input-output-hk", "owner": "input-output-hk",
"repo": "deploy-rs", "repo": "deploy-rs",
"rev": "5a6db26726ec8c7904aea5bcdf13589342386f9d", "rev": "7267eab9139ca4476fd8ed49e2e8652bba4c037f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -163,11 +160,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1640031018, "lastModified": 1640815524,
"narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=", "narHash": "sha256-ZzyS803XuCl99XE4581m0Suni+q1Hz+Mpw6A9bs7VKM=",
"owner": "divnix", "owner": "divnix",
"repo": "digga", "repo": "digga",
"rev": "3157889810e51a1ae03f82bf6bf6657ba8cf93c6", "rev": "5c9417495d8ab8813377d7b990680258b9eb4cff",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -178,15 +175,15 @@
}, },
"fenix": { "fenix": {
"inputs": { "inputs": {
"nixpkgs": "nixpkgs_2", "nixpkgs": "nixpkgs_3",
"rust-analyzer-src": "rust-analyzer-src" "rust-analyzer-src": "rust-analyzer-src"
}, },
"locked": { "locked": {
"lastModified": 1637303083, "lastModified": 1639117493,
"narHash": "sha256-e2A5JBjxYNpjoGd53K0oVUUaS9ojwOT5rnThyPNS46M=", "narHash": "sha256-67H9uXUdauaqMfkcKzpgHR3GeOKPAwOs6G3C1VpT67o=",
"owner": "nix-community", "owner": "nix-community",
"repo": "fenix", "repo": "fenix",
"rev": "8294ceadbbbe1a886640bfcc15f5a02a2b471955", "rev": "94b5686cad2ed210da106b0b7e1e212dab43fbf2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -307,11 +304,26 @@
}, },
"flake-utils_5": { "flake-utils_5": {
"locked": { "locked": {
"lastModified": 1631561581, "lastModified": 1638122382,
"narHash": "sha256-3VQMV5zvxaVLvqqUrNz3iJelLw30mIVSfZmAaauM3dA=", "narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "7e5bf3925f6fbdfaf50a2a7ca0be2879c4261d19", "rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"locked": {
"lastModified": 1638122382,
"narHash": "sha256-sQzZzAbvKEqN9s0bzWuYmRaA03v40gaJ4+iL1LXjaeI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "74f7e4319258e287b0f9cb95426c9853b282730b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -327,11 +339,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1637917557, "lastModified": 1639871969,
"narHash": "sha256-3u5bLyGn5NUG3RJA7/v1Bqa/QCFGqp/01Bh/4REf9m4=", "narHash": "sha256-6feWUnMygRzA9tzkrfAzpA5/NBYg75bkFxnqb1DtD7E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "4daff26495ca9ac67476cba8cf15c3e36d91ab18", "rev": "697cc8c68ed6a606296efbbe9614c32537078756",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -359,11 +371,11 @@
}, },
"latest_2": { "latest_2": {
"locked": { "locked": {
"lastModified": 1638198142, "lastModified": 1641887635,
"narHash": "sha256-plU9b8r4St6q4U7VHtG9V7oF8k9fIpfXl/KDaZLuY9k=", "narHash": "sha256-kDGpufwzVaiGe5e1sBUBPo9f1YN+nYHJlYqCaVpZTQQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8a308775674e178495767df90c419425474582a1", "rev": "b2737d4980a17cc2b7d600d7d0b32fd7333aca88",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -380,11 +392,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1638203339, "lastModified": 1639947939,
"narHash": "sha256-Sz3iCvbWrVWOD/XfYQeRJgP/7MVYL3/VKsNXvDeWBFc=", "narHash": "sha256-pGsM8haJadVP80GFq4xhnSpNitYNQpaXk4cnA796Cso=",
"owner": "nmattia", "owner": "nmattia",
"repo": "naersk", "repo": "naersk",
"rev": "c3e56b8a4ffb6d906cdfcfee034581f9a8ece571", "rev": "2fc8ce9d3c025d59fee349c1f80be9785049d653",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -393,6 +405,25 @@
"type": "github" "type": "github"
} }
}, },
"nix-dram": {
"inputs": {
"flake-utils": "flake-utils_5",
"nixpkgs": "nixpkgs_5"
},
"locked": {
"lastModified": 1639413393,
"narHash": "sha256-OcmY7yw6gu+fb3J8UT9Qmj1+eyP8HaOF133ojEx0aq8=",
"owner": "pub-solar",
"repo": "nix-dram",
"rev": "07881073fcaa0fb394dbf8ce9fd1483afc376d95",
"type": "github"
},
"original": {
"owner": "pub-solar",
"repo": "nix-dram",
"type": "github"
}
},
"nixlib": { "nixlib": {
"locked": { "locked": {
"lastModified": 1640478849, "lastModified": 1640478849,
@ -408,32 +439,13 @@
"type": "github" "type": "github"
} }
}, },
"nix-dram": {
"inputs": {
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1628492639,
"narHash": "sha256-ffF/oEhLs/stAsXXobruKHyH9jnMC2rt/SM3ASrs2U8=",
"owner": "dramforever",
"repo": "nix-dram",
"rev": "fba426108ea6bdeb1e362bac9da06cbd33726f41",
"type": "github"
},
"original": {
"owner": "dramforever",
"repo": "nix-dram",
"type": "github"
}
},
"nixos": { "nixos": {
"locked": { "locked": {
"lastModified": 1638231428, "lastModified": 1642068274,
"narHash": "sha256-Sm5loBKdeusSvIAC+LtzRT6I7tAcqZdIPnHcxZt7NaE=", "narHash": "sha256-uncr2I2z6Y2ghTdm0VDzTPjPtBsaGpsb17HgL/fGDdg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "393c5357a0071d51668bcdc69dfc25ddacbd5840", "rev": "00d17d8ddc4c12bae0cd750eb2bb51ee813a5301",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -446,7 +458,7 @@
"nixos-generators": { "nixos-generators": {
"inputs": { "inputs": {
"nixlib": "nixlib", "nixlib": "nixlib",
"nixpkgs": "nixpkgs_3" "nixpkgs": "nixpkgs_4"
}, },
"locked": { "locked": {
"lastModified": 1637655461, "lastModified": 1637655461,
@ -464,11 +476,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1638182287, "lastModified": 1640686209,
"narHash": "sha256-vBzf+hbTJz2ZdXV/DWirl6wOO7tjdqzTIU+0FANt65U=", "narHash": "sha256-6glXUlKRDhEhNuYx6r3fXU6KH2/Vq9mJZjB9oUpwrmc=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "6b3f79de09c3de7c91ab51e55e87879f61b6faec", "rev": "46df95ca81e7e4cf3458cdb4b7d1714b5fce9da5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -479,11 +491,27 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1640831728, "lastModified": 1640861606,
"narHash": "sha256-KK5SKqqfAt+ev3bHLrVXJ6i4zx9YQW6k19oUInY8T2M=", "narHash": "sha256-AQ+84X0wbu8TqijaVcfAgldnV8AIFkbzXlyILuqub8o=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "5d90841dd0179430db010dfc2c58b2a7de4371be", "rev": "c1792db42df222b0ec570bd774488f48aa0c91b1",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable-small",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1640897803,
"narHash": "sha256-FfBWDDz0/pgb+qtf6RGIkrsA1SW8lv77eUpm5xijTQQ=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "0e57783d3a9ff01d3ace41d9f75d84b865285746",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -492,13 +520,13 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_2": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1636976544, "lastModified": 1638986258,
"narHash": "sha256-9ZmdyoRz4Qu8bP5BKR1T10YbzcB9nvCeQjOEw2cRKR0=", "narHash": "sha256-OceRdctKZRSgqQxVRvvNB0MaEnFMzQqjUffecoDE9eI=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "931ab058daa7e4cd539533963f95e2bb0dbd41e6", "rev": "581d2d6c9cd5c289002203581d8aa0861963a933",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -508,7 +536,7 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_3": { "nixpkgs_4": {
"locked": { "locked": {
"lastModified": 1640418986, "lastModified": 1640418986,
"narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=", "narHash": "sha256-a8GGtxn2iL3WAkY5H+4E0s3Q7XJt6bTOvos9qqxT5OQ=",
@ -524,14 +552,29 @@
"type": "github" "type": "github"
} }
}, },
"nixpkgs_5": {
"locked": {
"lastModified": 1639399671,
"narHash": "sha256-KT+YqqPZsdzKNE4T8okeH8lV+a0vtFxD4w+P2CEZC40=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "c95b2e99529891b1d52e065c34dd50c136151bcb",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "release-21.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1638231901, "lastModified": 1626378135,
"narHash": "sha256-XzuvFTmsXULdWynQWzgaPHikepNhjEpK4o5WXfmRqek=", "narHash": "sha256-koC6DBYmLCrgXA+AMHVaODf1uHYPmvcFygHfy3eg6vI=",
"owner": "nix-community", "path": "/nix/store/6mfkswqi67m35qwv0vh7kpk8rypbl2rq-source",
"repo": "NUR", "rev": "00c2ec8f0bbdf0cfb2135bde55fbae5d6b64aa6d",
"rev": "4e68fb3d8f48e91196deb13f44bcfb421da25afb", "type": "path"
"type": "github"
}, },
"original": { "original": {
"id": "nur", "id": "nur",
@ -541,17 +584,17 @@
"nvfetcher": { "nvfetcher": {
"inputs": { "inputs": {
"flake-compat": "flake-compat_2", "flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_5", "flake-utils": "flake-utils_6",
"nixpkgs": [ "nixpkgs": [
"nixos" "nixos"
] ]
}, },
"locked": { "locked": {
"lastModified": 1634524567, "lastModified": 1640033174,
"narHash": "sha256-v9ZTZj1WNQaaVfs1P1mUPuh518mmwpqszj1EjdeGUmc=", "narHash": "sha256-b8w7NgobOYLlFV9j+XGbF+51LpOll0QeatxEGRv7uhg=",
"owner": "berberman", "owner": "berberman",
"repo": "nvfetcher", "repo": "nvfetcher",
"rev": "807513f4bbd0e3b5863f4c3b91f8ac846ed6da9b", "rev": "8bbf1921a36343f9a78c68e2bbc9798ab8f3b768",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -563,7 +606,7 @@
"poetry2nix": { "poetry2nix": {
"inputs": { "inputs": {
"flake-utils": "flake-utils_2", "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs_2"
}, },
"locked": { "locked": {
"lastModified": 1625240517, "lastModified": 1625240517,
@ -590,10 +633,6 @@
"latest": "latest_2", "latest": "latest_2",
"naersk": "naersk", "naersk": "naersk",
"nix-dram": "nix-dram", "nix-dram": "nix-dram",
"nixlib": [
"digga",
"nixlib"
],
"nixos": "nixos", "nixos": "nixos",
"nixos-hardware": "nixos-hardware", "nixos-hardware": "nixos-hardware",
"nur": "nur", "nur": "nur",
@ -603,11 +642,11 @@
"rust-analyzer-src": { "rust-analyzer-src": {
"flake": false, "flake": false,
"locked": { "locked": {
"lastModified": 1637268320, "lastModified": 1639071661,
"narHash": "sha256-lxB1r+7cmZisiGLx0tZ2LaC6X/EcQTbRIWZfnLIIgs4=", "narHash": "sha256-4YySLORuK0qGGIEJj78S7CZ4jy4GIHJ5ks17k5AWblo=",
"owner": "rust-analyzer", "owner": "rust-analyzer",
"repo": "rust-analyzer", "repo": "rust-analyzer",
"rev": "f0da9406bcbde1bc727242b481d8de825e84f59a", "rev": "2534b7db1a093543d5bd759b3a1ca9e34418fa31",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -41,7 +41,7 @@
nixos-hardware.url = "github:nixos/nixos-hardware"; nixos-hardware.url = "github:nixos/nixos-hardware";
# PubSolarOS additions # PubSolarOS additions
nix-dram.url = "github:dramforever/nix-dram"; nix-dram.url = "github:pub-solar/nix-dram";
}; };
outputs = outputs =
@ -108,6 +108,9 @@
hosts = { hosts = {
/* set host specific properties here */ /* set host specific properties here */
NixOS = { }; NixOS = { };
fae = {
system = "aarch64-linux";
};
}; };
importables = rec { importables = rec {
profiles = digga.lib.rakeLeaves ./profiles // { profiles = digga.lib.rakeLeaves ./profiles // {
@ -144,7 +147,15 @@
homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations; homeConfigurations = digga.lib.mkHomeConfigurations self.nixosConfigurations;
deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations { }; deploy.nodes = digga.lib.mkDeployNodes self.nixosConfigurations {
fae = {
profilesOrder = [ "system" "direnv" ];
profiles.direnv = {
user = "nixos";
path = deploy.lib.x86_64-linux.activate.home-manager self.homeConfigurationsPortable.x86_64-linux.nixos;
};
};
};
defaultTemplate = self.templates.bud; defaultTemplate = self.templates.bud;
templates.bud.path = ./.; templates.bud.path = ./.;

View file

@ -1,14 +0,0 @@
assign [app_id="firefox"] $ws2
# seahorse
for_window [title="seahorse"] floating enabled
# NetworkManager
for_window [title="Network Connections"] floating enabled
# thunderbird
for_window [title="New Task:*"] floating enabled
for_window [title="Edit Task:*"] floating enabled
for_window [title="New Event:*"] floating enabled
for_window [title="Edit Event:*"] floating enabled

View file

@ -1,6 +0,0 @@
# Autostart applications
#
# Example:
# exec swayidle
#exec qMasterPassword

View file

@ -1,5 +0,0 @@
# switch keyboard input language
bindsym $mod+tab exec swaymsg input "1:1:AT_Translated_Set_2_keyboard" xkb_switch_layout next
bindsym $mod+Shift+F2 exec chromium --enable-features=UseOzonePlatform --ozone-platform=wayland

View file

@ -1,35 +0,0 @@
### Input configuration
#
# You can get the names of your inputs by running: swaymsg -t get_inputs
# Read `man 5 sway-input` for more information about this section.
input "type:keyboard" {
xkb_layout us,de
xkb_model pc105
xkb_options altwin:swap_alt_win
}
input "type:touchpad" {
tap enabled
natural_scroll enabled
}
# Touchpad controls
#bindsym XF86TouchpadToggle exec $HOME/Workspace/ben/toggletouchpad.sh # toggle touchpad
# Screen brightness controls
bindsym XF86MonBrightnessUp exec "brightnessctl -d intel_backlight set +10%; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ {print $4}')"
bindsym XF86MonBrightnessDown exec "brightnessctl -d intel_backlight set 10%-; notify-send $(brightnessctl -d intel_backlight i | awk '/Current/ { print $4}')"
# Keyboard backlight brightness controls
bindsym XF86KbdBrightnessDown exec "brightnessctl -d smc::kbd_backlight set 10%-; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')"
bindsym XF86KbdBrightnessUp exec "brightnessctl -d smc::kbd_backlight set +10%; notify-send $(brightnessctl -d smc::kbd_backlight i | awk '/Current/ { print $4}')"
# Pulse Audio controls
bindsym XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. up' #increase sound volume
bindsym XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5%; exec pactl set-sink-mute @DEFAULT_SINK@ 0 && notify-send 'Vol. down' #decrease sound volume
bindsym XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle && notify-send 'Mute sound' # mute sound
# Media player controls
bindsym XF86AudioPlay exec "playerctl play-pause; notify-send 'Play/Pause'"
bindsym XF86AudioNext exec "playerctl next; notify-send 'Next'"
bindsym XF86AudioPrev exec "playerctl previous; notify-send 'Prev.'"

View file

@ -1,41 +0,0 @@
### Output configuration
#
# Example configuration:
#
# output HDMI-A-1 resolution 1920x1080 position 1920,0
#
# You can get the names of your outputs by running: swaymsg -t get_outputs
set $main_screen eDP-1
set $displayport DP-1
set $hmdi HDMI-A-1
output $main_screen
output $displayport scale 2
output $hdmi scale 1
output $main_screen pos 0 1080
output $displayport pos 0 0
output $hdmi pos 1920 0
#bindswitch lid:on output $main_screen disable
#bindswitch lid:off output $main_screen enable
bindsym $mod+Shift+x output $main_screen toggle
# TODO when using more monitors
## Manual management of external displays
# Set the shortcuts and what they do
#set $mode_display HDMI (i) top, (j) left, (k) bottom, (l) right, (o) off
#mode "$mode_display" {
# bindsym i output HDMI-A-1 enable; output HDMI-A-1 pos 0 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 1080, mode "default"
# bindsym j output HDMI-A-1 enable; output HDMI-A-1 pos 0 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 1920 0, mode "default"
# bindsym k output HDMI-A-1 enable; output HDMI-A-1 pos 0 900 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 0, mode "default"
# bindsym l output HDMI-A-1 enable; output HDMI-A-1 pos 1440 0 bg ~/Pictures/wallpapers/active.png fill; output eDP-1 pos 0 0, mode "default"
# bindsym o output HDMI-A-1 disable, mode "default"
#
# # back to normal: Enter or Escape
# bindsym Return mode "default"
# bindsym Escape mode "default"
#}
## Declare here the shortcut to bring the display selection menu
#bindsym $mod+x mode "$mode_display"

View file

@ -1,40 +0,0 @@
{ config, pkgs, lib, ... }:
with lib;
let
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
in
{
imports = [
./hardware-configuration.nix
];
config = {
pub-solar.x-os.keyfile = "/etc/nixos/hosts/con/secrets/keyfile.bin";
pub-solar.nextcloud.enable = mkForce false;
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.sessionVariables = {
DOCKER_BUILDKIT = "1";
};
# Custom device sway configs
xdg.configFile = mkIf psCfg.sway.enable {
"sway/config.d/10-applications.conf".source = ./.config/sway/config.d/applications.conf;
"sway/config.d/autostart.conf".source = ./.config/sway/config.d/autostart.conf;
"sway/config.d/10-custom-keybindings.conf".source = ./.config/sway/config.d/custom-keybindings.conf;
"sway/config.d/input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf;
"sway/config.d/screens.conf".source = ./.config/sway/config.d/screens.conf;
};
};
networking.hosts = {
"127.0.0.1" = [
"virtrex.test"
"api.virtrex.test"
"expo.test"
"proxy.test"
"dachfensterkonfigurator.test"
"handwerker.velux.test"
];
};
};
}

View file

@ -1,6 +0,0 @@
{ suites, ... }:
{
imports = [
./con.nix
] ++ suites.con;
}

View file

@ -1,34 +0,0 @@
# Do not modify this file! It was generated by nixos-generate-config
# and may be overwritten by future invocations. Please make changes
# to /etc/nixos/configuration.nix instead.
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "rtsx_pci_sdmmc" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/382ae29a-ed0d-4e18-99db-6efb6afaae64";
fsType = "ext4";
};
boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/fb2f9ace-ce72-4b0d-b8b5-a8792d374f3c";
fileSystems."/boot/efi" =
{
device = "/dev/disk/by-uuid/6BD6-50D2";
fsType = "vfat";
};
swapDevices = [ ];
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View file

@ -18,11 +18,15 @@ in
pub-solar.virtualisation.enable = true; pub-solar.virtualisation.enable = true;
# fix backlight for keyboard and brightness, adjust function key binding # fix backlight for keyboard and brightness, adjust function key binding,
# intel_pstate for cpu schedutil, resume offset for swapfile, disable amdgpu driver
boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" "intel_pstate=passive" "resume_offset=47366144" ]; boot.kernelParams = [ "acpi_backlight=video" "hid_apple.fnmode=2" "intel_pstate=passive" "resume_offset=47366144" ];
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.resumeDevice = "/dev/mapper/cryptroot"; boot.resumeDevice = "/dev/mapper/cryptroot";
boot.kernelPackages = pkgs.linuxPackages_5_15;
boot.binfmt.emulatedSystems = [ "aarch64-linux" ];
systemd.sleep.extraConfig = '' systemd.sleep.extraConfig = ''
HibernateMode=shutdown HibernateMode=shutdown
''; '';
@ -43,8 +47,8 @@ in
# https://ubuntuforums.org/showthread.php?t=2409856 # https://ubuntuforums.org/showthread.php?t=2409856
services.cron.systemCronJobs = [ services.cron.systemCronJobs = [
"@reboot root ${pkgs.util-linux}/bin/rfkill block bluetooth" "@reboot root ${pkgs.util-linux}/bin/rfkill block bluetooth"
"@reboot root ${pkgs.coreutils}/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch" "@reboot root ${pkgs.coreutils}/bin/sleep 10; ${pkgs.coreutils}/bin/echo OFF > /sys/kernel/debug/vgaswitcheroo/switch"
"@reboot root ${pkgs.coreutils}/bin/echo 510 > /sys/class/backlight/gmux_backlight/brightness" "@reboot root ${pkgs.coreutils}/bin/sleep 11; ${pkgs.coreutils}/bin/echo 510 > /sys/class/backlight/gmux_backlight/brightness"
]; ];
# Increase console font size for HiDPI display # Increase console font size for HiDPI display
@ -116,7 +120,6 @@ in
hardware.firmware = with pkgs; [ wireless-regdb ]; hardware.firmware = with pkgs; [ wireless-regdb ];
boot.extraModprobeConfig = '' boot.extraModprobeConfig = ''
options cfg80211 ieee80211_regdom="DE" options cfg80211 ieee80211_regdom="DE"
blacklist amdgpu
''; '';
# This value determines the NixOS release from which the default # This value determines the NixOS release from which the default

View file

@ -30,13 +30,11 @@
forward-addr = [ forward-addr = [
"5.1.66.255@853#dot.ffmuc.net" "5.1.66.255@853#dot.ffmuc.net"
"185.150.99.255@853#dot.ffmuc.net" "185.150.99.255@853#dot.ffmuc.net"
"145.100.185.18@853#dnsovertls3.sinodun.com"
"89.233.43.71@853#unicast.censurfridns.dk" "89.233.43.71@853#unicast.censurfridns.dk"
"94.130.110.185@853#ns1.dnsprivacy.at" "94.130.110.185@853#ns1.dnsprivacy.at"
"2001:678:e68:f000::@853#dot.ffmuc.net" "2001:678:e68:f000::@853#dot.ffmuc.net"
"2001:678:ed0:f000::@853#dot.ffmuc.net" "2001:678:ed0:f000::@853#dot.ffmuc.net"
"2001:610:1:40ba:145:100:185:18@853#dnsovertls3.sinodun.com"
"2a01:3a0:53:53::0@853#unicast.censurfridns.dk" "2a01:3a0:53:53::0@853#unicast.censurfridns.dk"
"2a01:4f8:c0c:3c03::2@853#ns1.dnsprivacy.at" "2a01:4f8:c0c:3c03::2@853#ns1.dnsprivacy.at"
"2a01:4f8:c0c:3bfc::2@853#ns2.dnsprivacy.at" "2a01:4f8:c0c:3bfc::2@853#ns2.dnsprivacy.at"

59
hosts/fae.nix Normal file
View file

@ -0,0 +1,59 @@
{ config, lib, pkgs, profiles, ... }:
{
imports = [
# profiles.networking
#profiles.core
"${fetchTarball {
url = "https://github.com/NixOS/nixos-hardware/archive/8f1bf828d8606fe38a02df312cf14546ae200a72.tar.gz";
sha256 = "11milap153g3f63fcrcv4777vd64f7wlfkk9p3kpxi6dqd2sxvh4";
}
}/raspberry-pi/4"
profiles.users.root # make sure to configure ssh keys
profiles.users.nixos
];
config = {
pub-solar.x-os.iso-options.enable = true;
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXOS_SD";
fsType = "ext4";
options = [ "noatime" ];
};
};
networking = {
hostName = "fae";
};
environment.systemPackages = with pkgs; [ vim ];
services.openssh.enable = true;
#users = {
# mutableUsers = false;
# users."${user}" = {
# isNormalUser = true;
# password = password;
# extraGroups = [ "wheel" ];
# };
#};
security.sudo.extraConfig = lib.mkAfter ''
%wheel ALL=(ALL) NOPASSWD:ALL
'';
# Enable GPU acceleration
hardware.raspberry-pi."4".fkms-3d.enable = true;
#services.xserver = {
# enable = true;
# displayManager.lightdm.enable = true;
# desktopManager.xfce.enable = true;
#};
hardware.pulseaudio.enable = true;
};
}

View file

@ -74,6 +74,6 @@ in
services.blueman.enable = true; services.blueman.enable = true;
# Enable audio server & client # Enable audio server & client
services.mopidy = import ./mopidy.nix pkgs; #services.mopidy = import ./mopidy.nix pkgs;
}; };
} }

View file

@ -92,6 +92,7 @@ in
gnome3.adwaita-icon-theme gnome3.adwaita-icon-theme
gnome.eog gnome.eog
gnome3.nautilus gnome3.nautilus
gnome.yelp
wine wine

View file

@ -12,10 +12,9 @@ in
config = mkIf cfg.enable { config = mkIf cfg.enable {
home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = with pkgs; pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = [ home.packages = [
#mySignalDesktop
signal-desktop signal-desktop
tdesktop tdesktop
element-desktop-wayland element-desktop-search-fixed
irssi irssi
]; ];
}; };

View file

@ -32,7 +32,17 @@ in
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk xdg-desktop-portal-wlr ]; wlr = {
enable = true;
settings = {
screencast = {
max_fps = 30;
chooser_type = "simple";
chooser_cmd = "${pkgs.slurp}/bin/slurp -f %o -or";
};
};
};
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
gtkUsePortal = true; gtkUsePortal = true;
}; };

View file

@ -18,7 +18,6 @@ in
environment.shells = with pkgs; [ environment.shells = with pkgs; [
zsh zsh
]; ];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
screen screen
]; ];

View file

@ -74,9 +74,7 @@ in
nodePackages.typescript-language-server nodePackages.typescript-language-server
nodePackages.vim-language-server nodePackages.vim-language-server
nodePackages.vue-language-server nodePackages.vue-language-server
nodePackages.vscode-css-languageserver-bin nodePackages.vscode-langservers-extracted
nodePackages.vscode-html-languageserver-bin
nodePackages.vscode-json-languageserver-bin
nodePackages.yaml-language-server nodePackages.yaml-language-server
python39Packages.python-lsp-server python39Packages.python-lsp-server
python3Full python3Full
@ -131,6 +129,7 @@ in
vim-go vim-go
vim-javascript vim-javascript
vim-json vim-json
SchemaStore-nvim
vim-markdown vim-markdown
vim-nix vim-nix
vim-ruby vim-ruby

View file

@ -33,24 +33,26 @@ lua <<EOF
buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts) buf_set_keymap('n', 'K', '<cmd>lua vim.lsp.buf.hover()<CR>', opts)
buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts) buf_set_keymap('n', 'gi', '<cmd>lua vim.lsp.buf.implementation()<CR>', opts)
buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts) buf_set_keymap('n', '<C-k>', '<cmd>lua vim.lsp.buf.signature_help()<CR>', opts)
buf_set_keymap('n', '<space>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts) buf_set_keymap('n', '<leader>wa', '<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<space>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts) buf_set_keymap('n', '<leader>wr', '<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>', opts)
buf_set_keymap('n', '<space>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts) buf_set_keymap('n', '<leader>wl', '<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>', opts)
buf_set_keymap('n', '<space>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts) buf_set_keymap('n', '<leader>D', '<cmd>lua vim.lsp.buf.type_definition()<CR>', opts)
buf_set_keymap('n', '<space>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts) buf_set_keymap('n', '<leader>rn', '<cmd>lua vim.lsp.buf.rename()<CR>', opts)
buf_set_keymap('n', '<space>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts) buf_set_keymap('n', '<leader>ca', '<cmd>lua vim.lsp.buf.code_action()<CR>', opts)
buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts) buf_set_keymap('n', 'gr', '<cmd>lua vim.lsp.buf.references()<CR>', opts)
buf_set_keymap('n', '<space>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts) buf_set_keymap('n', '<leader>e', '<cmd>lua vim.lsp.diagnostic.show_line_diagnostics()<CR>', opts)
buf_set_keymap('n', '[d', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts) buf_set_keymap('n', '<leader>dp', '<cmd>lua vim.lsp.diagnostic.goto_prev()<CR>', opts)
buf_set_keymap('n', ']d', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts) buf_set_keymap('n', '<leader>dn', '<cmd>lua vim.lsp.diagnostic.goto_next()<CR>', opts)
buf_set_keymap('n', '<space>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts) buf_set_keymap('n', '<leader>q', '<cmd>lua vim.lsp.diagnostic.set_loclist()<CR>', opts)
buf_set_keymap('n', '<space>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts) buf_set_keymap('n', '<leader>f', '<cmd>lua vim.lsp.buf.formatting()<CR>', opts)
end end
-- Add additional capabilities supported by nvim-cmp -- Add additional capabilities supported by nvim-cmp
local capabilities = vim.lsp.protocol.make_client_capabilities() local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities) capabilities = require('cmp_nvim_lsp').update_capabilities(capabilities)
-- vscode HTML lsp needs this https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#html
capabilities.textDocument.completion.completionItem.snippetSupport = true
for lsp_key, lsp_settings in pairs({ for lsp_key, lsp_settings in pairs({
'bashls', ------------------------------- Bash 'bashls', ------------------------------- Bash
@ -76,10 +78,14 @@ lua <<EOF
} }
}, },
['jsonls'] = { -------------------------- JSON ['jsonls'] = { -------------------------- JSON
['cmd'] = {"json-languageserver", "--stdio"} ['settings'] = {
['json'] = {
['schemas' ] = require('schemastore').json.schemas()
}
}
}, },
'phpactor', ----------------------------- PHP 'phpactor', ----------------------------- PHP
'pylsp', --------------------------------- Python 'pylsp', -------------------------------- Python
'rnix', --------------------------------- Nix 'rnix', --------------------------------- Nix
'solargraph', --------------------------- Ruby 'solargraph', --------------------------- Ruby
'rust_analyzer', ------------------------ Rust 'rust_analyzer', ------------------------ Rust
@ -90,7 +96,6 @@ lua <<EOF
['filetypes'] = { "terraform", "hcl", "tf" } ['filetypes'] = { "terraform", "hcl", "tf" }
}, },
'tsserver', ----------------------------- Typescript / JavaScript 'tsserver', ----------------------------- Typescript / JavaScript
'angularls', ---------------------------- Angular
'vuels', -------------------------------- Vue 'vuels', -------------------------------- Vue
'svelte', ------------------------------- Svelte 'svelte', ------------------------------- Svelte
['yamlls'] = { -------------------------- YAML ['yamlls'] = { -------------------------- YAML
@ -101,6 +106,7 @@ lua <<EOF
['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}', ['https://json.schemastore.org/github-action'] = '.github/action.{yml,yaml}',
['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}', ['https://json.schemastore.org/ansible-stable-2.9'] = 'roles/tasks/*.{yml,yaml}',
['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}', ['https://json.schemastore.org/drone'] = '*.drone.{yml,yaml}',
['https://json.schemastore.org/swagger-2.0'] = 'swagger.{yml,yaml}',
} }
} }
} }
@ -116,7 +122,7 @@ lua <<EOF
capabilities = capabilities, capabilities = capabilities,
} }
else -- Use the LSP's configuration. else -- Use the LSP's configuration.
local on_attach_setting = lsp_settings.on_attach local on_attach_setting = on_attach
lsp_settings.on_attach = function() lsp_settings.on_attach = function()
if on_attach_setting then on_attach_setting() end if on_attach_setting then on_attach_setting() end

View file

@ -5,8 +5,10 @@ autocmd FileType yaml setlocal ts=2 sts=2 sw=2 expandtab
let g:gutentags_file_list_command = 'git ls-files' let g:gutentags_file_list_command = 'git ls-files'
" Golang " Golang
" Go test shortcut " Go test, Def, Decls shortcut
nmap <Leader>got :GoTest<CR>:botright copen<CR> nmap <Leader>got :GoTest<CR>:botright copen<CR>
autocmd FileType go nmap gd :GoDef<CR>
autocmd FileType go nmap gD :GoDecls<CR>
" Go formatting " Go formatting
autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist autocmd FileType go setlocal noexpandtab shiftwidth=4 tabstop=4 softtabstop=4 nolist

View file

@ -22,7 +22,6 @@ in
[ "$(tty)" = "/dev/tty1" ] && exec sway [ "$(tty)" = "/dev/tty1" ] && exec sway
''; '';
shellAliases = { shellAliases = {
nano = "nvim"; nano = "nvim";
vi = "nvim"; vi = "nvim";
@ -71,13 +70,14 @@ in
bindkey '^R' fzf-history-widget bindkey '^R' fzf-history-widget
# ArrowUp/Down start searching history with current input # ArrowUp/Down start searching history with current input
autoload -U history-search-end autoload -U up-line-or-beginning-search
zle -N history-beginning-search-backward-end history-search-end autoload -U down-line-or-beginning-search
zle -N history-beginning-search-forward-end history-search-end zle -N up-line-or-beginning-search
bindkey "^[[A" history-beginning-search-backward-end zle -N down-line-or-beginning-search
bindkey "^[[B" history-beginning-search-forward-end bindkey "^[[A" up-line-or-beginning-search
bindkey "^P" history-beginning-search-backward-end bindkey "^[[B" down-line-or-beginning-search
bindkey "^N" history-beginning-search-forward-end bindkey "^P" up-line-or-beginning-search
bindkey "^N" down-line-or-beginning-search
# MAKE CTRL+S WORK IN VIM # MAKE CTRL+S WORK IN VIM
stty -ixon stty -ixon

View file

@ -19,7 +19,7 @@ in
virtualisation.libvirtd = { virtualisation.libvirtd = {
enable = true; enable = true;
qemuOvmf = true; qemu.ovmf.enable = true;
}; };
users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] { users.users = pkgs.lib.setAttrByPath [ psCfg.user.name ] {
extraGroups = [ "libvirtd" ]; extraGroups = [ "libvirtd" ];

View file

@ -1,16 +1,22 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }:
with lib;
let let
cfg = config.pub-solar.x-os; cfg = config.pub-solar.x-os;
in in
{ {
options.pub-solar.x-os.iso-options.enable = mkOption {
type = types.bool;
default = false;
description = "Feature flag for iso builds";
};
config = { config = {
# Enable plymouth for better experience of booting # Enable plymouth for better experience of booting
boot.plymouth.enable = true; boot.plymouth.enable = true;
# Mount / luks device in initrd # Mount / luks device in initrd
# Allow fstrim to work on it. # Allow fstrim to work on it.
boot.initrd = { # The ! makes this enabled by default
boot.initrd = mkIf (!cfg.iso-options.enable) {
luks.devices."cryptroot" = { luks.devices."cryptroot" = {
allowDiscards = true; allowDiscards = true;
}; };

View file

@ -0,0 +1,8 @@
final: prev: {
element-desktop-search-fixed = prev.element-desktop-wayland.overrideAttrs (oldAttrs: {
fixupPhase = ''
wrapProgram $out/bin/element-desktop \
--prefix LD_PRELOAD : ${prev.sqlcipher}/lib/libsqlcipher.so
'';
});
}

View file

@ -4,33 +4,28 @@ channels: final: prev: {
inherit (channels.latest) inherit (channels.latest)
cachix cachix
deploy-rs
docker
docker-compose_2
dhall dhall
discord discord
element-desktop element-desktop
rage rage
nixpkgs-fmt nixpkgs-fmt
nomad qutebrowser
rage
signal-desktop signal-desktop
starship starship
deploy-rs deploy-rs
thunderbird
firefox-wayland
element-desktop-wayland element-desktop-wayland
neovim-unwrapped nomad
tdesktop tdesktop
xdg-desktop-portal
xdg-desktop-portal-gtk
xdg-desktop-portal-wlr
obs-studio obs-studio
obs-studio-plugins obs-studio-plugins
looking-glass-client looking-glass-client
; ;
# nix is set to 2.3 in 21.11 # nix is set to 2.3 in 21.11
nix-direnv = prev.nix-direnv.override { nix = prev.nixUnstable; }; nix-direnv = prev.nix-direnv.override { nix_2_4 = true; };
haskellPackages = prev.haskellPackages.override haskellPackages = prev.haskellPackages.override
(old: { (old: {
@ -43,4 +38,7 @@ channels: final: prev: {
haskell-language-server; haskell-language-server;
}); });
}); });
# Example to override node package
# nodePackages = prev.nodePackages // { inherit (channels.latest.nodePackages) manta; };
} }

View file

@ -3,6 +3,7 @@ with final; {
# keep sources this first # keep sources this first
sources = prev.callPackage (import ./_sources/generated.nix) { }; sources = prev.callPackage (import ./_sources/generated.nix) { };
# then, call packages with `final.callPackage` # then, call packages with `final.callPackage`
gpu-switch = writeShellScriptBin "gpu-switch" (import ./gpu-switch.nix final);
import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.nix final); import-gtk-settings = writeShellScriptBin "import-gtk-settings" (import ./import-gtk-settings.nix final);
lgcl = writeShellScriptBin "lgcl" (import ./lgcl.nix final); lgcl = writeShellScriptBin "lgcl" (import ./lgcl.nix final);
mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final); mailto-mutt = writeShellScriptBin "mailto-mutt" (import ./mailto-mutt.nix final);

69
pkgs/gpu-switch.nix Normal file
View file

@ -0,0 +1,69 @@
self: with self; ''
# Copyright (c) 2014-2015 Bruno Bierbaumer, Andreas Heider
readonly sysfs_efi_vars='/sys/firmware/efi/efivars'
readonly efi_gpu='gpu-power-prefs-fa4ce28d-b62f-4c99-9cc3-6815686e30f9'
usage(){
cat <<EOF
Usage:
$(basename $0) --integrated # Switch to the integrated GPU
$(basename $0) --dedicated # Switch to the dedicated GPU
$(basename $0) --help # Show this message
Switches between the integrated and dedicated graphics cards of a dual-GPU
MacBook Pro for the next reboot.
Arguments:
-i, --integrated
-d, --dedicated
-h, --help
Tested hardware:
MacBook Pro 5,2 (Early 2009, Non-Retina)
MacBook Pro 5,3 (Mid 2009, Non-Retina)
MacBook Pro 8,2 (Late 2011, Non-Retina)
MacBook Pro 9,1 (Mid 2012, Non-Retina)
MacBook Pro 10,1 (Mid 2012, Retina)
MacBook Pro 11,3 (Late 2013, Retina)
MacBook Pro 11,5 (Mid 2015, Retina)
EOF
}
switch_gpu(){
if ! [ -d /sys/firmware/efi ]; then
printf "Fatal: $(basename $0) has to be run in EFI mode.\n" 1>&2
exit 1
fi
if ! mount | grep -q $sysfs_efi_vars; then
if ! mount -t efivarfs none $sysfs_efi_vars; then
printf "Fatal: Couldn't mount ''${sysfs_efi_vars}.\n" 1>&2
exit 1
fi
fi
chattr -i "''${sysfs_efi_vars}/''${efi_gpu}" 2> /dev/null
printf "\x07\x00\x00\x00\x''${1}\x00\x00\x00" > "''${sysfs_efi_vars}/''${efi_gpu}"
}
if [ $# -ne 1 ]; then
usage 1>&2
exit 1
fi
case "$1" in
-i|--integrated)
switch_gpu 1
;;
-d|--dedicated)
switch_gpu 0
;;
-h|--help)
usage
;;
*)
usage 1>&2
exit 1
;;
esac
''

View file

@ -1,20 +1,20 @@
self: with self; self: with self;
let let
websocket-client = python38.pkgs.buildPythonPackage rec { websocket-client = python39.pkgs.buildPythonPackage rec {
pname = "websocket-client"; pname = "websocket-client";
version = "1.0.0"; version = "1.2.1";
doCheck = false; doCheck = false;
src = python38.pkgs.fetchPypi { src = python39.pkgs.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-UFGzii9MJ/vXygd+uyPsaWWmJt7VqVY382vhs1tsT4E="; sha256 = "sha256-jftxXYqZL1cS//jIQ62ulOIrIqmbLF5rDsShqYHMTg0=";
}; };
}; };
in in
python38.pkgs.buildPythonPackage rec { python39.pkgs.buildPythonPackage rec {
pname = "Mopidy-Jellyfin"; pname = "Mopidy-Jellyfin";
version = "1.0.2"; version = "1.0.2";
doCheck = false; doCheck = false;
propagatedBuildInputs = with python38.pkgs; [ propagatedBuildInputs = with python39.pkgs; [
unidecode unidecode
websocket-client websocket-client
requests requests
@ -22,7 +22,7 @@ python38.pkgs.buildPythonPackage rec {
pykka pykka
mopidy mopidy
]; ];
src = python38.pkgs.fetchPypi { src = python39.pkgs.fetchPypi {
inherit pname version; inherit pname version;
sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g="; sha256 = "sha256-5XimIIQSpvNyQbSOFtSTkA0jhA0V68BbyQEQNnov+0g=";
}; };

View file

@ -4,7 +4,7 @@
"height": 26, // Waybar height "height": 26, // Waybar height
"modules-left": ["sway/workspaces", "sway/mode"], "modules-left": ["sway/workspaces", "sway/mode"],
"modules-center": ["mpd"], //"modules-center": ["mpd"],
"modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"], "modules-right": ["sway/language", "pulseaudio", "network", "idle_inhibitor", "battery", "clock", "tray"],
"sway/workspaces": { "sway/workspaces": {
"disable-scroll": true "disable-scroll": true

View file

@ -1,7 +1,7 @@
{ pkgs, lib, budUtils, ... }: { { pkgs, lib, budUtils, ... }: {
bud.cmds = with pkgs; { bud.cmds = with pkgs; {
get = { get = {
writer = budUtils.writeBashWithPaths [ nixUnstable git coreutils ]; writer = budUtils.writeBashWithPaths [ nixFlakes git coreutils ];
synopsis = "get [DEST]"; synopsis = "get [DEST]";
help = "Copy the desired template to DEST"; help = "Copy the desired template to DEST";
script = ./get.bash; script = ./get.bash;

View file

@ -15,6 +15,9 @@ in
imports = [ "${extraModulesPath}/git/hooks.nix" ]; imports = [ "${extraModulesPath}/git/hooks.nix" ];
git = { inherit hooks; }; git = { inherit hooks; };
# override for our own welcome
devshell.name = pkgs.lib.mkForce "PubSolarOS";
# tempfix: remove when merged https://github.com/numtide/devshell/pull/123 # tempfix: remove when merged https://github.com/numtide/devshell/pull/123
devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry '' devshell.startup.load_profiles = pkgs.lib.mkForce (pkgs.lib.noDepEntry ''
# PATH is devshell's exorbitant privilige: # PATH is devshell's exorbitant privilige:
@ -31,7 +34,7 @@ in
''); '');
commands = with pkgs; [ commands = with pkgs; [
(devos nixUnstable) (devos nixFlakes)
(devos agenix) (devos agenix)
{ {
category = "devos"; category = "devos";

View file

@ -1,7 +1,13 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
let let
in in
pkgs.lib.mkAfter ''[includeIf "gitdir:~/CodeRoom/greenbaum.cloud/"] pkgs.lib.mkAfter ''[sendemail]
smtpserver = smtp.mailbox.org
smtpuser = jhonas@mailbox.org
smtpencryption = tls
smtpserverport = 587
[includeIf "gitdir:~/CodeRoom/greenbaum.cloud/"]
path = ~/.config/git/config_greenbaum.cloud path = ~/.config/git/config_greenbaum.cloud
[includeIf "gitdir:~/CodeRoom/git.b12f.io/"] [includeIf "gitdir:~/CodeRoom/git.b12f.io/"]

View file

@ -0,0 +1,29 @@
{ config, pkgs, ... }:
let
in
''# Watson configuration
# showing defaults commented out
# not implemented yet as of 2.0.1
#[backend]
#url = https://api.crick.fr
#token = yourapitoken
[options]
#options.confirm_new_project = false
#options.confirm_new_tag = false
date_format = %d.%m.%Y
#log_current = false
#pager = true
#report_current = false
#reverse_log = true
stop_on_start = true
#stop_on_restart = false
time_format = %H:%M%z
#week_start = monday
#[default_tags]
#project-name = tag1 tag2
#python101 = teaching python
#voyager2 = nasa 'space mission'
''

View file

@ -15,17 +15,19 @@ in
{ key = "V"; mods = "Control|Super"; action = "Paste"; } { key = "V"; mods = "Control|Super"; action = "Paste"; }
{ key = "C"; mods = "Control|Super"; action = "Copy"; } { key = "C"; mods = "Control|Super"; action = "Copy"; }
]; ];
services.kbfs.enable = false; services.kbfs.enable = true;
services.keybase.enable = false; services.keybase.enable = true;
services.yubikey-agent.enable = true; services.yubikey-agent.enable = true;
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config".text = import ./.config/git/config.nix { inherit config; inherit pkgs; };
xdg.configFile."git/config_greenbaum.cloud".text = import ./.config/git/config_greenbaum.cloud.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config_greenbaum.cloud".text = import ./.config/git/config_greenbaum.cloud.nix { inherit config; inherit pkgs; };
xdg.configFile."git/config_git.b12f.io".text = import ./.config/git/config_git.b12f.io.nix { inherit config; inherit pkgs; }; xdg.configFile."git/config_git.b12f.io".text = import ./.config/git/config_git.b12f.io.nix { inherit config; inherit pkgs; };
xdg.configFile."watson/config".text = import ./.config/watson/config.nix { inherit config; inherit pkgs; };
home.packages = with pkgs; [ home.packages = with pkgs; [
AusweisApp2 AusweisApp2
consul consul
gpu-switch
ifmetric ifmetric
ipmitool ipmitool
keybase-gui keybase-gui
@ -67,7 +69,7 @@ in
}; };
programs.zsh = { programs.zsh = {
initExtra = import ./zshrc.nix pkgs; initExtra = import ./zshrc.nix { inherit config; inherit pkgs; };
}; };
# xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg; # xdg.configFile."wallpaper.jpg".source = ./assets/wallpaper.jpg;

View file

@ -7,6 +7,7 @@ in
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.sessionVariables = { home.sessionVariables = {
DRONE_SERVER = "https://ci.b12f.io"; DRONE_SERVER = "https://ci.b12f.io";
GOPATH = "/home/${psCfg.user.name}/CodeRoom/go";
}; };
}; };
} }

View file

@ -1,4 +1,4 @@
pkgs: { config, pkgs, ... }:
'' ''
bindkey "^[[1;3D" backward-word bindkey "^[[1;3D" backward-word
bindkey "^[[1;3C" forward-word bindkey "^[[1;3C" forward-word
@ -83,5 +83,5 @@ pkgs:
complete -o nospace -C ${pkgs.waypoint}/bin/waypoint waypoint complete -o nospace -C ${pkgs.waypoint}/bin/waypoint waypoint
complete -C '${pkgs.awscli2}/bin/aws_completer' ${pkgs.awscli2}/bin/aws complete -C '${pkgs.awscli2}/bin/aws_completer' ${pkgs.awscli2}/bin/aws
source /run/secrets/environment-secrets source ${config.age.secrets.environment-secrets.path}
'' ''