dev.fron.io rc / 323a53b
meta: push Tony Olagbaiye a month ago
9 changed file(s) with 605 addition(s) and 20 deletion(s). Raw diff Collapse all Expand all
3636 output HDMI-A-1 pos 3840 0
3737 output DVI-D-1 pos 5760 0
3838
39 exec /nix/store/48yicr0bf14bwsjzgxxy2iwfj8r1qhpx-wayvnc-0.4.0/bin/wayvnc 0.0.0.0 5901 -o HDMI-A-2
40 exec /nix/store/48yicr0bf14bwsjzgxxy2iwfj8r1qhpx-wayvnc-0.4.0/bin/wayvnc 0.0.0.0 5902 -o DP-2
41 exec /nix/store/48yicr0bf14bwsjzgxxy2iwfj8r1qhpx-wayvnc-0.4.0/bin/wayvnc 0.0.0.0 5903 -o HDMI-A-1
42 exec /nix/store/48yicr0bf14bwsjzgxxy2iwfj8r1qhpx-wayvnc-0.4.0/bin/wayvnc 0.0.0.0 5904 -o DVI-D-1
39 exec wayvnc '[::]' 5901 -o HDMI-A-2
40 exec wayvnc '[::]' 5902 -o DP-2
41 exec wayvnc '[::]' 5903 -o HDMI-A-1
42 exec wayvnc '[::]' 5904 -o DVI-D-1
4343
4444 output * bg #222222 solid_color
4545
145145 }) [
146146 {
147147 description = "nixos/anbox: use mainline drivers when available";
148 id = 102341; hash = "rHKK1id+DHug+4drCfNuPBcGNT3bhQ/bvqYZxf+TVuI=";
148 id = 102341; hash = "VEN7vAN79tjSK1AqId7oEZNEUPLPO+CFzAKayGT+D1w=";
149149 }
150150 {
151151 description = "nixos/nat: substitute iptables for compat under nftables";
0 diff --git a/cmd/yggdrasil/main.go b/cmd/yggdrasil/main.go
1 index 813e950..08d35cc 100644
2 --- a/cmd/yggdrasil/main.go
3 +++ b/cmd/yggdrasil/main.go
4 @@ -40,11 +40,12 @@ type node struct {
5 admin *admin.AdminSocket
6 }
7
8 -func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf bool) *config.NodeConfig {
9 +func readConfig(log *log.Logger, useconf bool, useconffile string, extraconffile string, normaliseconf bool) *config.NodeConfig {
10 // Use a configuration file. If -useconf, the configuration will be read
11 // from stdin. If -useconffile, the configuration will be read from the
12 // filesystem.
13 var conf []byte
14 + var extraconf []byte
15 var err error
16 if useconffile != "" {
17 // Read the file from the filesystem
18 @@ -56,6 +57,21 @@ func readConfig(useconf *bool, useconffile *string, normaliseconf *bool) *config
19 if err != nil {
20 panic(err)
21 }
22 + if extraconffile != "" {
23 + extraconf, err = ioutil.ReadFile(extraconffile);
24 + }
25 + if err != nil {
26 + panic(err)
27 + }
28 + // Generate a new configuration - this gives us a set of sane defaults -
29 + // then parse the configuration we loaded above on top of it. The effect
30 + // of this is that any configuration item that is missing from the provided
31 + // configuration will use a sane default.
32 + cfg := defaults.GenerateConfig()
33 + var confs [2][]byte
34 + confs[0]=conf
35 + confs[1]=extraconf
36 + for _, conf := range confs { if len(conf)>0 {
37 // If there's a byte order mark - which Windows 10 is now incredibly fond of
38 // throwing everywhere when it's converting things into UTF-16 for the hell
39 // of it - remove it and decode back down into UTF-8. This is necessary
40 @@ -69,11 +85,6 @@ func readConfig(log *log.Logger, useconf bool, useconffile string, normaliseconf bool) *config
41 panic(err)
42 }
43 }
44 - // Generate a new configuration - this gives us a set of sane defaults -
45 - // then parse the configuration we loaded above on top of it. The effect
46 - // of this is that any configuration item that is missing from the provided
47 - // configuration will use a sane default.
48 - cfg := defaults.GenerateConfig()
49 var dat map[string]interface{}
50 if err := hjson.Unmarshal(conf, &dat); err != nil {
51 panic(err)
52 @@ -112,6 +123,7 @@ func readConfig(log *log.Logger, useconf *bool, useconffile *string, normaliseconf *bool) *config
53 if err = mapstructure.Decode(dat, &cfg); err != nil {
54 panic(err)
55 }
56 + }}
57 return cfg
58 }
59
60 @@ -185,6 +197,7 @@ func main() {
61 genconf bool
62 useconf bool
63 useconffile string
64 + extraconffile string
65 normaliseconf bool
66 confjson bool
67 autoconf bool
68 @@ -164,6 +176,7 @@ func main() {
69 genconf := flag.Bool("genconf", false, "print a new config to stdout")
70 useconf := flag.Bool("useconf", false, "read HJSON/JSON config from stdin")
71 useconffile := flag.String("useconffile", "", "read HJSON/JSON config from specified file path")
72 + extraconffile := flag.String("extraconffile", "", "extra (usually private) HJSON/JSON config from specified file path")
73 normaliseconf := flag.Bool("normaliseconf", false, "use in combination with either -useconf or -useconffile, outputs your configuration normalised")
74 confjson := flag.Bool("json", false, "print configuration from -genconf or -normaliseconf as JSON instead of HJSON")
75 autoconf := flag.Bool("autoconf", false, "automatic mode (dynamic IP, peer with IPv6 neighbors)")
76 @@ -212,6 +225,7 @@ func main() {
77 genconf: *genconf,
78 useconf: *useconf,
79 useconffile: *useconffile,
80 + extraconffile: *extraconffile,
81 normaliseconf: *normaliseconf,
82 confjson: *confjson,
83 autoconf: *autoconf,
84 @@ -187,7 +200,7 @@ func main() {
85 cfg = defaults.GenerateConfig()
86 case args.useconffile != "" || args.useconf:
87 // Read the configuration from either stdin or from the filesystem
88 - cfg = readConfig(logger, args.useconf, args.useconffile, args.normaliseconf)
89 + cfg = readConfig(logger, args.useconf, args.useconffile, args.extraconffile, args.normaliseconf)
90 // If the -normaliseconf option was specified then remarshal the above
91 // configuration and print it back to stdout. This lets the user update
92 // their configuration file with newly mapped names (like above) or to
5555 (package emacs-pgtk-native-comp)
5656 ;(package (inferior-package->package (delayed 'emacs) #:license #f))
5757 (elisp-packages (list
58 (melpa weechat)
58 ;(melpa weechat)
5959 emacs-ace-window ; ace-window.nix
6060 ;emacs-ahg ; ahg.nix
6161 emacs-all-the-icons ; all-the-icons.nix
6363 #:use-module (rc packages minecraft)
6464 #:use-module (rc packages pipewire)
6565 #:use-module (rc packages font-twitter-emoji)
66 #:use-module (rc packages wayvnc)
6667 #:use-module ((rc packages zsh) #:prefix zsh-)
6768 #:export (env))
6869
118119 ncurses termite alacritty st dvtm-custom abduco-custom tmate
119120 alsa-utils pavucontrol pulsemixer cantata mpv
120121 taskwarrior mako adb fastboot password-store execline direnv
121 fontmanager flatpak steam multimc aria2))
122 fontmanager flatpak steam multimc aria2 wayvnc))
122123 (services
123124 (cons*
124125 (service home-bash-service-type
195196 (zlogout (list))))
196197 ;(service home-zsh-autosuggestions-service-type)
197198
199 (simple-service 'make-guix-aware-of-guix-home-subcomand
200 home-environment-variables-service-type
201 '(("GUILE_LOAD_PATH" .
202 "$XDG_CONFIG_HOME/guix/current/share/guile/site/3.0:$GUILE_LOAD_PATH")
203 ("GUILE_LOAD_COMPILED_PATH" .
204 "$XDG_CONFIG_HOME/guix/current/lib/guile/3.0/site-ccache:$GUILE_LOAD_COMPILED_PATH")))
205
198206 (simple-service 'add-imperative-profile
199207 home-shell-profile-service-type
200208 (list "GUIX_PROFILE=$HOME/.guix-profile"
247255 . "unix:path=$XDG_RUNTIME_DIR/dbus.sock")))
248256 ;; ("RTC_USE_PIPEWIRE" . "true")
249257
250 ;(simple-service 'sway-set-env
251 ; home-environment-variables-service-type
252 ; '(("SWAYSOCK" . "$XDG_RUNTIME_DIR/dbus.sock")))
258 ;(simple-service 'sway-set-env
259 ; home-environment-variables-service-type
260 ; '(("SWAYSOCK" . "$XDG_RUNTIME_DIR/dbus.sock")))
253261
254262 (simple-service 'dbus-shepherd-daemon
255263 home-shepherd-service-type
392400 (simple-service 'sway-reload-config-on-change
393401 home-run-on-change-service-type
394402 `(("files/config/sway/config"
395 ,#~(system* #$(file-append sway "/bin/swaymsg") "reload"))))
403 ,#~(system* #$(file-append sway "/bin/swaymsg") "reload"))))
396404 (simple-service 'packages-for-sway
397405 home-profile-service-type
398406 (list wofi qtwayland
0 (define-module (rc packages wayvnc)
1 #:use-module (rc packages)
2 #:use-module (guix gexp)
3 #:use-module (guix packages)
4 #:use-module (guix download)
5 #:use-module (guix git-download)
6 #:use-module ((guix licenses) #:prefix license:)
7 #:use-module (guix build-system meson)
8 #:use-module (gnu packages xdisorg)
9 #:use-module (gnu packages freedesktop)
10 #:use-module (gnu packages compression)
11 #:use-module (gnu packages image)
12 #:use-module (gnu packages tls)
13 #:use-module (gnu packages python)
14 #:use-module (gnu packages man)
15 #:use-module (gnu packages xorg)
16 #:use-module (gnu packages linux)
17 #:use-module (gnu packages pkg-config)
18 #:export (wayvnc))
19
20 (define aml
21 (package
22 (name "aml")
23 (version "0.2.0")
24 (source
25 (origin
26 (method git-fetch)
27 (uri (git-reference
28 (url "https://github.com/any1/aml.git")
29 (commit "1d8185ec15c68074cec1fd252c01c5ecad877b73")))
30 (sha256
31 (base32
32 "0mxmzlhiv88hm4sf8kyawyrml8qy1xis019hdyb5skl9g95z9yyf"))))
33 (build-system meson-build-system)
34 (native-inputs `())
35 (inputs `(("pkg-config" ,pkg-config)))
36 (home-page "https://github.com/any1/aml")
37 (synopsis "Another main loop")
38 (description "Another main loop")
39 (license license:isc)))
40
41 (define libneatvnc
42 (package
43 (name "libneatvnc")
44 (version "0.4.0")
45 (source
46 (origin
47 (method git-fetch)
48 (uri (git-reference
49 (url "https://github.com/any1/neatvnc.git")
50 (commit "b1d32694d0a310e36da1cf84420c827bbf665755")))
51 (sha256
52 (base32
53 "1wpq1vyjqra877vwc3n4i0c1dyhmabyn993cslf1k142ikyc0a8w"))))
54 (build-system meson-build-system)
55 (native-inputs `(("pkg-config" ,pkg-config)))
56 (inputs `(("pixman" ,pixman)
57 ("aml" ,aml)
58 ("zlib" ,zlib)
59 ("libdrm" ,libdrm)
60 ("libjpeg-turbo" ,libjpeg-turbo) ;?
61 ("gnutls" ,gnutls) ;?
62 ("pkg-config" ,pkg-config)))
63 (home-page "https://github.com/any1/aml")
64 (synopsis "A VNC server library")
65 (description "
66 This is a liberally licensed VNC server library that's intended to be
67 fast and neat. Goals:
68 - Speed
69 - Clean interface
70 - Interoperability with the Freedesktop.org ecosystem
71 ")
72 (license license:isc)))
73
74 (define wayvnc
75 (package
76 (name "wayvnc")
77 (version "0.4.0")
78 (source
79 (origin
80 (method git-fetch)
81 (uri (git-reference
82 (url "https://github.com/any1/wayvnc.git")
83 (commit "13323a742f1449355852b2501b25d8df804cefee")))
84 (sha256
85 (base32
86 "0q48fgh6gf3jicy4bk3kq18h9lhqfq9qz32ri6j9ffvbb8mcw64s"))))
87 (build-system meson-build-system)
88 (native-inputs `(("pkg-config" ,pkg-config)
89 ("scdoc" ,scdoc)
90 ("wayland" ,wayland)))
91 (inputs `(("pixman" ,pixman)
92 ("libdrm" ,libdrm)
93 ("libxkbcommon" ,libxkbcommon)
94 ("wayland" ,wayland)
95 ("aml" ,aml)
96 ("libneatvnc" ,libneatvnc)
97 ("zlib" ,zlib)
98 ("libjpeg-turbo" ,libjpeg-turbo)
99 ("gnutls" ,gnutls)
100 ("libx11" ,libx11)
101 ("linux-pam" ,linux-pam)
102 ("python" ,python)
103 ("python-wrapper" ,python-wrapper)))
104 (home-page "https://github.com/any1/wayvnc")
105 (synopsis "A VNC server for wlroots based Wayland compositors")
106 (description "
107 This is a VNC server for wlroots based Wayland compositors. It attaches
108 to a running Wayland session, creates virtual input devices and exposes a
109 single display via the RFB protocol. The Wayland session may be a
110 headless one, so it is also possible to run wayvnc without a physical
111 display attached.
112 ")
113 (license license:isc)))
114
115 wayvnc
0 (define-module (rc packages yggdrasil)
1 #:use-module (rc packages)
2 #:use-module (guix gexp)
3 #:use-module (guix packages)
4 #:use-module (guix download)
5 #:use-module (guix git-download)
6 #:use-module ((guix licenses) #:prefix license:)
7 #:use-module (guix build-system go)
8 #:use-module (gnu packages golang)
9 #:use-module (gnu packages linux)
10 #:use-module ((gnu packages networking) #:prefix gnu:)
11 #:export (yggdrasil))
12
13 (define-public go-github-com-arceliar-ironwood
14 (package
15 (name "go-github-com-arceliar-ironwood")
16 (version "0.0.0-20210912013146-c2bc55bb349c")
17 (source
18 (origin
19 (method git-fetch)
20 (uri (git-reference
21 (url "https://github.com/Arceliar/ironwood")
22 (commit (go-version->git-ref version))))
23 (file-name (git-file-name name version))
24 (sha256
25 (base32
26 "1dfkqnkfxwlwcsk8g9r1pv84lfzgn8r1vam13zlmk81cgan2r6fx"))))
27 (build-system go-build-system)
28 (arguments
29 '(#:import-path "github.com/Arceliar/ironwood"
30 #:tests? #f
31 #:phases
32 (modify-phases %standard-phases
33 ;; Source-only package
34 (delete 'build))))
35 (propagated-inputs
36 `(("go-golang-org-x-crypto"
37 ,go-golang-org-x-crypto)
38 ("go-github-com-arceliar-phony"
39 ,go-github-com-arceliar-phony)))
40 (home-page
41 "https://github.com/Arceliar/ironwood")
42 (synopsis "Ironwood")
43 (description
44 "Ironwood is a routing library with a @code{net.PacketConn}-compatible interface using @code{ed25519.PublicKey}s as addresses. Basically, you use it when you want to communicate with some other nodes in a network, but you can't guarantee that you can directly connect to every node in that network. It was written to test improvements to / replace the routing logic in @url{https://github.com/yggdrasil-network/yggdrasil-go,Yggdrasil}, but it may be useful for other network applications.")
45 (license license:mpl2.0)))
46
47 (define-public go-github-com-vividcortex-ewma
48 (package
49 (name "go-github-com-vividcortex-ewma")
50 (version "1.2.0")
51 (source
52 (origin
53 (method git-fetch)
54 (uri (git-reference
55 (url "https://github.com/VividCortex/ewma")
56 (commit (string-append "v" version))))
57 (file-name (git-file-name name version))
58 (sha256
59 (base32
60 "0whx516l9nm4n41spagb605ry7kfnz1qha96mcshnfjlahhnnylq"))))
61 (build-system go-build-system)
62 (arguments
63 '(#:import-path "github.com/VividCortex/ewma"))
64 (home-page "https://github.com/VividCortex/ewma")
65 (synopsis "EWMA")
66 (description
67 "Package ewma implements exponentially weighted moving averages.
68 ")
69 (license license:expat)))
70
71 (define-public go-github-com-cheggaaa-pb-v3
72 (package
73 (name "go-github-com-cheggaaa-pb-v3")
74 (version "3.0.8")
75 (source
76 (origin
77 (method git-fetch)
78 (uri (git-reference
79 (url "https://github.com/cheggaaa/pb")
80 (commit (string-append "v" version))))
81 (file-name (git-file-name name version))
82 (sha256
83 (base32
84 "0d701s2niy39r650d1phjw19h4l27b1yfc2ih6s31f56b3zzqspx"))))
85 (build-system go-build-system)
86 (arguments
87 '(#:import-path "github.com/cheggaaa/pb"))
88 (propagated-inputs
89 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)
90 ("go-github-com-rivo-uniseg"
91 ,go-github-com-rivo-uniseg)
92 ("go-github-com-mattn-go-runewidth"
93 ,go-github-com-mattn-go-runewidth)
94 ("go-github-com-mattn-go-isatty"
95 ,go-github-com-mattn-go-isatty)
96 ("go-github-com-mattn-go-colorable"
97 ,go-github-com-mattn-go-colorable)
98 ("go-github-com-fatih-color"
99 ,go-github-com-fatih-color)
100 ("go-github-com-vividcortex-ewma"
101 ,go-github-com-vividcortex-ewma)))
102 (home-page "https://github.com/cheggaaa/pb")
103 (synopsis "Terminal progress bar for Go")
104 (description #f)
105 (license license:bsd-3)))
106
107 (define-public go-github-com-rivo-uniseg
108 (package
109 (name "go-github-com-rivo-uniseg")
110 (version "0.2.0")
111 (source
112 (origin
113 (method git-fetch)
114 (uri (git-reference
115 (url "https://github.com/rivo/uniseg")
116 (commit (string-append "v" version))))
117 (file-name (git-file-name name version))
118 (sha256
119 (base32
120 "0j7h22vfmjj562vr8gpsyrkrwp1pq9ayh5fylv24skxb467g9f0q"))))
121 (build-system go-build-system)
122 (arguments
123 '(#:import-path "github.com/rivo/uniseg"))
124 (home-page "https://github.com/rivo/uniseg")
125 (synopsis "Unicode Text Segmentation for Go")
126 (description
127 "Package uniseg implements Unicode Text Segmentation according to Unicode
128 Standard Annex #29 (@url{http://unicode.org/reports/tr29/,http://unicode.org/reports/tr29/}).
129 ")
130 (license license:expat)))
131
132 (define-public go-github-com-mattn-go-runewidth
133 (package
134 (name "go-github-com-mattn-go-runewidth")
135 (version "0.0.13")
136 (source
137 (origin
138 (method git-fetch)
139 (uri (git-reference
140 (url "https://github.com/mattn/go-runewidth")
141 (commit (string-append "v" version))))
142 (file-name (git-file-name name version))
143 (sha256
144 (base32
145 "1yir0f3wc5z5hnkwhvx5qb6nmpfb05zp2gvfjvna63s8kmla1rrn"))))
146 (build-system go-build-system)
147 (arguments
148 '(#:import-path "github.com/mattn/go-runewidth"))
149 (propagated-inputs
150 `(("go-github-com-rivo-uniseg"
151 ,go-github-com-rivo-uniseg)))
152 (home-page
153 "https://github.com/mattn/go-runewidth")
154 (synopsis "go-runewidth")
155 (description
156 "This package provides functions to get fixed width of the character or string.")
157 (license license:expat)))
158
159 (define-public go-github-com-vishvananda-netlink
160 (package
161 (name "go-github-com-vishvananda-netlink")
162 (version "1.1.0")
163 (source
164 (origin
165 (method git-fetch)
166 (uri (git-reference
167 (url "https://github.com/vishvananda/netlink")
168 (commit (string-append "v" version))))
169 (file-name (git-file-name name version))
170 (sha256
171 (base32
172 "1vhl30p1gx636a088ls4h6a0l8jjyfvz79fr5w0qzdrg4qg9h08h"))))
173 (build-system go-build-system)
174 (arguments
175 '(#:import-path "github.com/vishvananda/netlink"
176 #:tests? #f))
177 (propagated-inputs
178 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)
179 ("go-github-com-vishvananda-netns"
180 ,go-github-com-vishvananda-netns)))
181 (home-page
182 "https://github.com/vishvananda/netlink")
183 (synopsis "netlink - netlink library for go")
184 (description
185 "Package netlink provides a simple library for netlink. Netlink is
186 the interface a user-space program in linux uses to communicate with
187 the kernel. It can be used to add and remove interfaces, set up ip
188 addresses and routes, and confiugre ipsec. Netlink communication
189 requires elevated privileges, so in most cases this code needs to
190 be run as root. The low level primitives for netlink are contained
191 in the nl subpackage. This package attempts to provide a high-level
192 interface that is loosly modeled on the iproute2 cli.
193 ")
194 (license license:asl2.0)))
195
196 (define-public go-github-com-vishvananda-netns
197 (package
198 (name "go-github-com-vishvananda-netns")
199 (version "0.0.0-20210104183010-2eb08e3e575f")
200 (source
201 (origin
202 (method git-fetch)
203 (uri (git-reference
204 (url "https://github.com/vishvananda/netns")
205 (commit (go-version->git-ref version))))
206 (file-name (git-file-name name version))
207 (sha256
208 (base32
209 "0d5f1dvcps51rkfn3s2xzcqjz45ljvj2w1r8y4zz5zwf8y461ksw"))))
210 (build-system go-build-system)
211 (arguments
212 '(#:import-path "github.com/vishvananda/netns"
213 #:tests? #f))
214 (propagated-inputs
215 `(("go-golang-org-x-sys" ,go-golang-org-x-sys)))
216 (home-page
217 "https://github.com/vishvananda/netns")
218 (synopsis "netns - network namespaces in go")
219 (description
220 "Package netns allows ultra-simple network namespace handling. NsHandles
221 can be retrieved and set. Note that the current namespace is thread
222 local so actions that set and reset namespaces should use LockOSThread
223 to make sure the namespace doesn't change due to a goroutine switch.
224 It is best to close NsHandles when you are done with them. This can be
225 accomplished via a `defer ns.Close()` on the handle. Changing namespaces
226 requires elevated privileges, so in most cases this code needs to be run
227 as root.
228 ")
229 (license license:asl2.0)))
230
231 (define-public yggdrasil
232 (package
233 (inherit gnu:yggdrasil)
234 (name (package-name gnu:yggdrasil))
235 (version "0.4.0")
236 (source
237 (origin
238 (method git-fetch)
239 (uri
240 (git-reference
241 (url "https://github.com/yggdrasil-network/yggdrasil-go")
242 (commit (string-append "v" version))
243 (recursive? #t)))
244 (file-name (git-file-name name version))
245 (sha256
246 (base32 "0mmqw6w5a6ph49xd1yzb7i70xg466k9pi5sdvplhb66x68wipixh"))
247 (patches (search-patches "yggdrasil-extra-config.new.patch"))))
248 (propagated-inputs
249 `(;("go-golang-zx2c4-com-wireguard-windows"
250 ; ,go-golang-zx2c4-com-wireguard-windows)
251 ("go-golang-zx2c4-com-wireguard"
252 ,go-golang-zx2c4-com-wireguard)
253 ("go-golang-org-x-text" ,go-golang-org-x-text)
254 ("go-golang-org-x-sys" ,go-golang-org-x-sys)
255 ("go-golang-org-x-net" ,go-golang-org-x-net)
256 ("go-golang-org-x-crypto"
257 ,go-golang-org-x-crypto)
258 ("go-github-com-vishvananda-netns"
259 ,go-github-com-vishvananda-netns)
260 ("go-github-com-vishvananda-netlink"
261 ,go-github-com-vishvananda-netlink)
262 ("go-github-com-mitchellh-mapstructure"
263 ,go-github-com-mitchellh-mapstructure)
264 ("go-github-com-mattn-go-runewidth"
265 ,go-github-com-mattn-go-runewidth)
266 ("go-github-com-mattn-go-isatty"
267 ,go-github-com-mattn-go-isatty)
268 ("go-github-com-kardianos-minwinsvc"
269 ,go-github-com-kardianos-minwinsvc)
270 ("go-github-com-hjson-hjson-go"
271 ,go-github-com-hjson-hjson-go)
272 ("go-github-com-hashicorp-go-syslog"
273 ,go-github-com-hashicorp-go-syslog)
274 ("go-github-com-gologme-log"
275 ,go-github-com-gologme-log)
276 ("go-github-com-fatih-color"
277 ,go-github-com-fatih-color)
278 ("go-github-com-cheggaaa-pb-v3"
279 ,go-github-com-cheggaaa-pb-v3)
280 ("go-github-com-vividcortex-ewma"
281 ,go-github-com-vividcortex-ewma)
282 ("go-github-com-arceliar-phony"
283 ,go-github-com-arceliar-phony)
284 ("go-github-com-arceliar-ironwood"
285 ,go-github-com-arceliar-ironwood)))
286 ))
287
288 yggdrasil
00 (define-module (rc system delta)
1 #:use-module (rc utils)
12 #:use-module (srfi srfi-1)
23 #:use-module (gcrypt pk-crypto)
34 #:use-module (guix packages)
4142 #:use-module (gnu packages linux)
4243 #:use-module (gnu packages networking)
4344 #:use-module (gnu packages python)
45 #:use-module (gnu packages radio)
4446 #:use-module (gnu packages rsync)
4547 #:use-module (gnu packages rust-apps)
4648 #:use-module (gnu packages screen)
4749 #:use-module (gnu packages shells)
50 #:use-module (gnu packages skarnet)
4851 #:use-module (gnu packages ssh)
4952 #:use-module (gnu packages tmux)
5053 #:use-module (gnu packages version-control)
5154 #:use-module (gnu packages vim)
55 #:use-module (gnu packages virtualization)
5256 #:use-module (gnu packages vpn)
5357 #:use-module (gnu packages web)
5458 #:use-module (gnu packages wm)
6266 #:use-module (rc packages nix)
6367 #:use-module (rc packages pipewire)
6468 #:use-module (rc packages xmpppy)
69 #:use-module (rc packages yggdrasil)
6570 #:export (os))
6671
6772 (define* (os #:rest home-envs)
7479
7580 (bootloader (bootloader-configuration
7681 (bootloader grub-efi-bootloader)
77 (target "/boot/EFI")
82 (targets '("/boot/EFI"))
7883 (terminal-outputs '(gfxterm vga_text console))
7984 (keyboard-layout keyboard-layout)))
8085
8388 ;; CONFIG_IKCONFIG_PROC=y
8489 (kernel-arguments (cons*;"nomodeset"
8590 "i915.modeset=0"
86 "modprobe.blacklist=pcspkr"
91 "modprobe.blacklist=pcspkr,dvb_usb_rtl28xxu"
8792 (delete "quiet" %default-kernel-arguments)))
8893 (initrd microcode-initrd)
8994 (initrd-modules (cons*;"amdgpu"
158163 (shell (file-append zsh "/bin/zsh"))
159164 (supplementary-groups '("wheel" "stem"
160165 "audio" "video" "kvm"
161 "adbusers" "netdev")))
166 "adbusers" "netdev" "yggdrasil")))
162167 (user-account
163168 (name "python")
164169 (group "python")
170175 (name "minecraft")
171176 (group "games")
172177 (home-directory "/var/lib/minecraft")
173 (system? #t))
178 (system? #t))
174179 (user-account
175 (name "biboumi")
176 (group "biboumi")
177 (system? #t))
180 (name "biboumi")
181 (group "biboumi")
182 (system? #t))
178183 %base-user-accounts))
179184
180185 (groups (cons* (user-group
271276 "SSL_CERT_DIR=/etc/ssl/certs")
272277 (environ))))
273278 (stop #~(make-kill-destructor))
274 (respawn? #t))))
279 (respawn? #f))))
275280 ;(service wpa-supplicant-service-type
276281 ; (wpa-supplicant-configuration
277282 ; (interface "wlo1")
323328 (public-key "kccZA+GAc0VStb28A+Kr0z8iPCWsiuRMfwHW391Qrko=")
324329 (allowed-ips '("10.0.0.4/32"))
325330 (keep-alive 10))))))
331 (service yggdrasil-service-type
332 (yggdrasil-configuration
333 (package yggdrasil)
334 (log-level 'debug)))
335 (extra-special-file "/etc/yggdrasil.conf" "/etc/yggdrasil-private.conf")
326336 (service iwd-service-type)
327337 (service bluetooth-service-type)
328338 (service biboumi-service-type
357367 pipewire-0.3)
358368 (udev-rules-service 'android-add-udev-rules
359369 android-udev-rules)
370 (udev-rules-service 'rtl-sdr rtl-sdr)
360371 (simple-service 'icecast-server shepherd-root-service-type
361372 (list (shepherd-service
362373 (documentation "Icecast2 service.")
404415 (lambda _ (display "0000:04:00.0"))))
405416 #t))
406417 (one-shot? #t))))
418 (simple-service 'fhs-shepherd-service shepherd-root-service-type
419 (list (shepherd-service
420 (documentation "S6 Container")
421 (provision '(fhs))
422 (requirement '())
423 (start #~(make-forkexec-constructor
424 (list #$(program-file "fhs-start"
425 #~(let ((info-fd (open-fdes "/var/lib/containers/s6.json"
426 (logior O_WRITEONLY O_CREAT))))
427 (fcntl info-fd F_SETFL (logior O_NONBLOCK
428 (fcntl info-fd F_GETFL)))
429 (execlp
430 #$(file-append bubblewrap "/bin/bwrap")
431 "--bind" "/var/lib/containers/s6" "/"
432 "--dev" "/dev"
433 "--proc" "/proc"
434 "--bind" "/tmp" "/tmp"
435 "--ro-bind" "/sys" "/sys"
436 "--ro-bind" "/etc/resolv.conf" "/etc/resolv.conf"
437 "--bind" "/home/leaf" "/home/leaf"
438 "--bind" "/srv" "/srv"
439 "--bind" "/run" "/run"
440 "--ro-bind" "/gnu" "/gnu"
441 "--ro-bind" "/var/guix" "/var/guix"
442 "--ro-bind" "/nix" "/nix"
443 "--unshare-all" "--share-net" "--as-pid-1"
444 "--info-fd" (number->string info-fd)
445 "--lock-file" "/var/lib/containers/s6.lock"
446 "--die-with-parent" "--chdir" "/"
447 "/usr/bin/env" "PATH=/bin:/sbin:$PATH"
448 "/etc/s6-linux-init/bin/init" "default"))))
449 #:log-file "/var/log/s6.log"))
450 (stop #~(make-kill-destructor)))))
451 (simple-service 'fhs-profile-service profile-service-type
452 (list
453 (file->package
454 (program-file
455 "fhs"
456 #~(let ((args (cdr (command-line))))
457 (setenv "PATH" (string-append "/bin:/sbin:" (getenv "PATH")))
458 (apply execlp
459 (cons* #$(file-append bubblewrap "/bin/bwrap") "bwrap"
460 "--bind" "/var/lib/containers/s6" "/"
461 "--dev" "/dev"
462 "--proc" "/proc"
463 "--bind" "/tmp" "/tmp"
464 "--ro-bind" "/sys" "/sys"
465 "--ro-bind" "/etc/resolv.conf" "/etc/resolv.conf"
466 "--bind" "/home/leaf" "/home/leaf"
467 "--bind" "/srv" "/srv"
468 "--bind" "/run" "/run"
469 "--ro-bind" "/gnu" "/gnu"
470 "--ro-bind" "/var/guix" "/var/guix"
471 "--ro-bind" "/nix" "/nix"
472 args))
473 #t))
474 "fhs" "0" #t)))
407475 (fold (lambda (a b) (apply a (list b)))
408476 (modify-services
409477 %desktop-services
77 #:use-module (gnu packages)
88 #:export (list-directory
99 file->package
10 program-package
1011 inferior-package->package))
1112
1213 (define (list-directory path)
2223 (define* (file->package file
2324 #:optional (name "file")
2425 (version "0")
26 (bin #f)
2527 #:key (synopsis "Generated file")
2628 (home-page "")
2729 (license #f))
3840 (srfi srfi-26))
3941 (copy-file
4042 (assoc-ref %build-inputs "source")
41 (assoc-ref %outputs "out"))
43 (if ,bin
44 (let ((bindir (string-append (assoc-ref %outputs "out") "/bin")))
45 (mkdir-p bindir)
46 (string-append bindir "/" ,name))
47 (assoc-ref %outputs "out")))
4248 #t)))
4349 (synopsis synopsis)
4450 (description (format #f "~A" file))
4551 (home-page home-page)
4652 (license license)))
53
54 (define (program-package name gexp)
55 (file->package
56 (program-file name gexp)
57 name "0" #t))
4758
4859 (define* (inferior-package->package inferior
4960 #:key